Belle II Software  release-08-01-10
SimulateEventLevelTriggerTimeInfoModule.cc
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 
9 #include <simulation/modules/SimulateEventLevelTriggerTimeInfoModule.h>
10 
11 using namespace Belle2;
12 
13 REG_MODULE(SimulateEventLevelTriggerTimeInfo);
14 
16 {
17  setDescription("Simple module that registers the EventLevelTriggerTimeInfo if not yet present");
19 }
20 
21 
23 {
24  // If EventLevelTriggerTimeInfo already exists we'd like to keep it (typically from BG Overlay)
25  if (!m_eventLevelTriggerTimeInfo.isOptional()) {
26  m_createNewObj = true;
28  }
29 }
30 
31 
33 {
34  // Simply create a new object
35  // (default constructor without arguments sets flag that stored data is invalid)
36  if (m_createNewObj) {
38  }
39 }
40 
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition: DataStore.h:72
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
void initialize() override
Declare required StoreObjPtr (if not existing)
void event() override
Event processing, create obj (if not existing)
bool m_createNewObj
Used to check if the object already exists (typically from BG Overlay)
StoreObjPtr< EventLevelTriggerTimeInfo > m_eventLevelTriggerTimeInfo
StoreObject to access the EventLevelTriggerTimeInfo.
REG_MODULE(arichBtest)
Register the Module.
Abstract base class for different kinds of events.