Belle II Software  release-08-01-10
EventInfoSetterModule.h
1 #pragma once
2 /**************************************************************************
3  * basf2 (Belle II Analysis Software Framework) *
4  * Author: The Belle II Collaboration *
5  * *
6  * See git log for contributors and copyright holders. *
7  * This file is licensed under LGPL-3.0, see LICENSE.md. *
8  **************************************************************************/
9 
10 #include <framework/core/Module.h>
11 #include <framework/datastore/StoreObjPtr.h>
12 #include <framework/dataobjects/EventMetaData.h>
13 
14 #include <vector>
15 
16 namespace Belle2 {
34  class EventInfoSetterModule : public Module {
35 
36  public:
37 
43 
46 
52  virtual void initialize() override;
53 
55  bool advanceEventCounter();
56 
65  virtual void event() override;
66 
67 
68  protected:
69 
70 
71  private:
72 
75  unsigned int m_evtNumber{1};
76  unsigned int m_eventsToSkip{0u};
77  int m_colIndex{0};
78  int m_production{0};
80  std::vector<int> m_expList{0};
81  std::vector<int> m_runList{0};
82  std::vector<unsigned int> m_evtNumList{1u};
83  std::vector<int> m_skipToEvent;
84  };
86 }
Module to set event, run, experiment numbers.
std::vector< unsigned int > m_evtNumList
The list (column) of the number of events which should be processed.
virtual void initialize() override
Initializes the Module.
std::vector< int > m_runList
The list (column) of runs.
virtual void event() override
Stores the event meta data into the DataStore.
virtual ~EventInfoSetterModule()
Destructor.
unsigned int m_evtNumber
The current event number.
int m_production
The production number.
unsigned int m_eventsToSkip
skip this many events before starting.
StoreObjPtr< EventMetaData > m_eventMetaDataPtr
Output object.
std::vector< int > m_skipToEvent
The (expNo, runNo, evtNo) tuple to skip to, empty if not used.
std::vector< int > m_expList
The list (column) of experiments.
bool advanceEventCounter()
Advances member variables to the next event (which is given by m_evtNumber).
int m_colIndex
The current index for the exp and run lists.
Base class for Modules.
Definition: Module.h:72
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.