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.");
25 addParam(
"executeThisModule", m_executeThisModule,
26 "Execute this module: if True, this module is executed durig the reconstruction, otherwise not.",
false);
27 setPropertyFlags(c_ParallelProcessingCertified);
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 auto eclHypos =
m_eventT0->getTemporaryEventT0s(Const::EDetector::ECL);
59 if (eclHypos.size() == 0) {
60 B2DEBUG(20,
"No ECL EventT0 available");
65 m_onlineEventT0.appendNew(eclBestT0->eventT0, eclBestT0->eventT0Uncertainty, Const::EDetector::ECL);
68 auto cdcHypos =
m_eventT0->getTemporaryEventT0s(Const::EDetector::CDC);
69 if (cdcHypos.size() == 0) {
70 B2DEBUG(20,
"No CDC EventT0 available");
73 const auto& cdcBestT0 = cdcHypos.back();
74 m_onlineEventT0.appendNew(cdcBestT0.eventT0, cdcBestT0.eventT0Uncertainty, Const::EDetector::CDC);
77 auto topHypos =
m_eventT0->getTemporaryEventT0s(Const::EDetector::TOP);
78 if (topHypos.size() == 0) {
79 B2DEBUG(20,
"No TOP EventT0 available");
82 const auto& topBestT0 = topHypos.back();
83 m_onlineEventT0.appendNew(topBestT0.eventT0, topBestT0.eventT0Uncertainty, Const::EDetector::TOP);
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.
Module to write the EventT0s computed on the online systems (HLT).
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.
StoreArray< OnlineEventT0 > m_onlineEventT0
StoreArray of OnlineEventT0.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.
Structure for storing the extracted event t0s together with its detector and its uncertainty.