Belle II Software light-2406-ragdoll
EventLimiterModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10#include <framework/core/Module.h>
11#include <framework/datastore/StoreObjPtr.h>
12#include <framework/dataobjects/EventMetaData.h>
13
14namespace Belle2 {
28 class EventLimiterModule : public Module {
29
30 public:
33
35 virtual ~EventLimiterModule() {};
36
38 virtual void initialize() override;
39
41 virtual void event() override;
42
44 virtual void beginRun() override;
45
46 private:
49
52
55 bool m_returnValue = true;
56
59 int m_runEvents = 0;
60 };
62}
The EventLimiter module.
virtual void initialize() override
Initialization states required data objects (EventMetaData)
bool m_returnValue
Flag that will be returned by the module.
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)
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.
Definition: ClusterUtils.h:24