10#include <framework/core/Module.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/dataobjects/EventMetaData.h>
13#include <framework/database/DBObjPtr.h>
14#include <framework/dbobjects/EventLimit.h>
40 virtual void event()
override;
bool m_loadFromDB
If true, load event limits from the ConditionsDB.
virtual void initialize() override
Initialization states required data objects (EventMetaData)
bool m_returnValue
Flag that will be returned by the module.
OptionalDBObjPtr< EventLimit > m_eventLimitFromDB
DB object to get event limit from the conditions database.
virtual void event() override
Checks if we've reached the maximum number of events yet and sets the return value to False if we hav...
virtual ~EventLimiterModule()
Destructor of the module.
StoreObjPtr< EventMetaData > m_eventMetaData
Datastore pointers.
int m_runEvents
How many events processed for the current run so far, stops counting up once max is hit Only used/inc...
virtual void beginRun() override
Resets our event counter to zero and return value to True.
EventLimiterModule()
Constructor: Sets the description, the properties and the parameters of the module.
int m_maxEventsPerRun
Maximum number of events to be collected at the start of each run (-1 = no maximum)
Optional DBObjPtr: This class behaves the same as the DBObjPtr except that it will not raise errors w...
Type-safe access to single objects in the data store.
Abstract base class for different kinds of events.