Belle II Software development
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#include <mdst/dataobjects/EventLevelTriggerTimeInfo.h>
11
12using namespace Belle2;
13
14REG_MODULE(SimulateEventLevelTriggerTimeInfo);
15
17{
18 setDescription("Simple module that registers the EventLevelTriggerTimeInfo if not yet present");
20}
21
22
24{
25 // If EventLevelTriggerTimeInfo already exists we'd like to keep it (typically from BG Overlay)
26 if (!m_eventLevelTriggerTimeInfo.isOptional()) {
27 m_createNewObj = true;
29 }
30}
31
32
34{
35 // Simply create a new object
36 // (default constructor without arguments sets flag that stored data is invalid)
37 if (m_createNewObj) {
39 }
40}
41
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
Definition DataStore.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
Module()
Constructor.
Definition Module.cc:30
@ 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.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
Abstract base class for different kinds of events.