9#define TRGGDL_SHORT_NAMES
13#include "trg/trg/Debug.h"
14#include "trg/gdl/modules/trggdl/TRGGDLModule.h"
16#include <framework/logging/Logger.h>
34 return string(
"TRGGDLModule 0.00");
49 string desc =
"TRGGDLModule(" +
version() +
")";
57 "The filename of CDC trigger config file",
61 "TRGGDL simulation switch",
65 "TRGGDL fast simulation mode",
69 "TRGGDL firmware simulation mode",
74 "Set false when alg is taken from local file.",
82 addParam(
"timquality_threshold_sfin",
84 "Threshold to determine timing quality flag with MC truth: superfine",
87 addParam(
"timquality_threshold_fine",
89 "Threshold to determine timing quality flag with MC truth: fine",
94 "if True, L1 jitter is simulated by EventT0Generator.",
97 B2DEBUG(100,
"TRGGDLModule ... created");
104 B2DEBUG(100,
"good-bye");
106 B2DEBUG(100,
"TRGGDLModule ... destructed ");
114 oldDir->mkdir(
"TRGGDLModule");
115 newDir->cd(
"TRGGDLModule");
117 h_inp =
new TH1I(
"hTRGGDL_inp",
"input bits from TRGGDLModule", 200, 0, 200);
118 h_ftd =
new TH1I(
"hTRGGDL_ftd",
"ftdl bits from TRGGDLModule", 200, 0, 200);
119 h_psn =
new TH1I(
"hTRGGDL_psn",
"psnm bits from TRGGDLModule", 200, 0, 200);
135 B2INFO(
"TRGGDLModule::initialize. simulationMode=" <<
_simulationMode);
165 }
else if (cfn !=
_gdl->configFile()) {
177 if (
_debugLevel > 9) printf(
"TRGGDLModule::beginRun() ends.\n");
179 _gdl->checkDatabase();
181 B2DEBUG(100,
"TRGGDLModule ... beginRun called configFile = " << cfn);
188 if (
_debugLevel > 9) printf(
"TRGGDLModule::event() starts.\n");
195 _gdl->accumulateInp(h_inp);
196 _gdl->accumulateFtd(h_ftd);
197 _gdl->accumulatePsn(h_psn);
200 bool result_summary =
false;
204 B2WARNING(
"TRGGDLModule.cc: TRGSummary not found. Check it!!!!");
214 B2DEBUG(200,
"TRGGDLModule ... endRun called ");
223 B2DEBUG(100,
"TRGGDLModule ... terminate called ");
HistoModule()
Constructor.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
void setReturnValue(int value)
Sets the return value for this module as integer.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
StoreObjPtr< TRGGRLInfo > m_TRGGRLInfo
required input for TRGGRLInfo
std::string _configFilename
Config. file name.
bool _algFromDB
Switch for algorithm source. False when using local .alg file.
int _debugLevel
Debug level.
double _timquality_threshold_sfin
Threshold to determine timing quality flag with MC truth: super fine.
std::string _algFilePath
Path to algorithm file.
int _simulationMode
Mode for TRGGDL simulation.
bool m_simulateT0Jitter
if True, L1 jitter is simulated by EventT0Generator
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
double _timquality_threshold_fine
Threshold to determine timing quality flag with MC truth: fine.
int _fastSimulationMode
Switch for the fast simulation.
StoreObjPtr< TRGSummary > m_TRGSummary
output for TRGSummary
StoreObjPtr< SimClockState > m_simClockState
generated hardware clock state
The instance of TRGGDL is a singleton.
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.
virtual void initialize() override
Initializes TRGGDLModule.
virtual void event() override
Called event by event.
virtual void endRun() override
Called when run ended.
virtual ~TRGGDLModule()
Destructor.
virtual void terminate() override
Called when processing ended.
static TRGGDL * _gdl
A pointer to a TRGGDL;.
virtual void beginRun() override
Called when new run started.
TRGGDLModule()
Constructor.
std::string version(void) const
returns version of TRGGDLModule.
virtual void defineHisto() override
Define Histogram.
static TRGGDL * getTRGGDL(void)
returns TRGGDL object.
static int level(void)
returns the debug level.
Abstract base class for different kinds of events.