10#include <hlt/modules/onlineEventT0/OnlineEventT0CreatorModule.h>
13#include <framework/core/Environment.h>
14#include <framework/logging/LogConfig.h>
22 setDescription(
"Module to write the EventT0s computed on the online systems (HLT). "
23 "By default, this module is run only on the online systems unless the user "
24 "specifically requires to execute it.");
26 "Execute this module: if True, this module is executed durig the reconstruction, otherwise not.",
false);
46 B2DEBUG(20,
"OnlineEventT0 is not executed as requested");
50 B2DEBUG(20,
"EventT0 object not created, cannot write OnlineEventT0");
54 B2DEBUG(20,
"OnlineEventT0 object already present, do nothing");
58 const auto bestECLHypo =
m_eventT0->getBestECLTemporaryEventT0();
59 if (not bestECLHypo) {
60 B2DEBUG(20,
"No ECL EventT0 available");
62 m_onlineEventT0.appendNew(bestECLHypo->eventT0, bestECLHypo->eventT0Uncertainty, Const::EDetector::ECL);
65 const auto bestCDCHypo =
m_eventT0->getBestCDCTemporaryEventT0();
66 if (not bestCDCHypo) {
67 B2DEBUG(20,
"No CDC EventT0 available");
69 m_onlineEventT0.appendNew(bestCDCHypo->eventT0, bestCDCHypo->eventT0Uncertainty, Const::EDetector::CDC);
72 const auto bestTOPHypo =
m_eventT0->getBestTOPTemporaryEventT0();
73 if (not bestTOPHypo) {
74 B2DEBUG(20,
"No TOP EventT0 available");
76 m_onlineEventT0.appendNew(bestTOPHypo->eventT0, bestTOPHypo->eventT0Uncertainty, Const::EDetector::TOP);
79 const auto bestSVDHypo =
m_eventT0->getBestSVDTemporaryEventT0();
80 if (not bestSVDHypo) {
81 B2DEBUG(20,
"No SVD EventT0 available");
83 m_onlineEventT0.appendNew(bestSVDHypo->eventT0, bestSVDHypo->eventT0Uncertainty, Const::EDetector::SVD);
static Environment & Instance()
Static method to get a reference to the Environment instance.
LogConfig::ELogRealm getRealm() const
Get the basf2 execution realm.
ELogRealm
Definition of the supported execution realms.
@ c_Online
Online data taking.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
StoreObjPtr< EventT0 > m_eventT0
StoreArray of EventT0.
void initialize() override
Initialize: check DataStore content.
bool m_executeThisModule
Module parameter for executing the module or not.
void event() override
This method is called for each event.
OnlineEventT0CreatorModule()
Default constructor.
StoreArray< OnlineEventT0 > m_onlineEventT0
StoreArray of OnlineEventT0.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.