 |
Belle II Software
release-05-02-19
|
14 #define TRGGDL_SHORT_NAMES
18 #include "trg/trg/Debug.h"
19 #include "trg/gdl/modules/trggdl/TRGGDLModule.h"
21 #include <framework/logging/Logger.h>
34 TRGGDLModule::_gdl = 0;
37 TRGGDLModule::version()
const
39 return string(
"TRGGDLModule 0.00");
46 _configFilename(
"TRGGDLConfig.dat"),
48 _fastSimulationMode(0),
49 _firmwareSimulationMode(0),
51 _algFilePath(
"ftd.alg")
54 string desc =
"TRGGDLModule(" +
version() +
")";
59 addParam(
"Belle2Phase", _Phase,
"Phase2 or Phase3", _Phase);
62 "The filename of CDC trigger config file",
66 "TRGGDL simulation switch",
70 "TRGGDL fast simulation mode",
74 "TRGGDL firmware simulation mode",
79 "Set false when alg is taken from local file.",
87 B2DEBUG(100,
"TRGGDLModule ... created");
94 B2DEBUG(100,
"good-bye");
96 B2DEBUG(100,
"TRGGDLModule ... destructed ");
104 oldDir->mkdir(
"TRGGDLModule");
105 newDir->cd(
"TRGGDLModule");
107 h_inp =
new TH1I(
"hTRGGDL_inp",
"input bits from TRGGDLModule", 200, 0, 200);
108 h_ftd =
new TH1I(
"hTRGGDL_ftd",
"ftdl bits from TRGGDLModule", 200, 0, 200);
109 h_psn =
new TH1I(
"hTRGGDL_psn",
"psnm bits from TRGGDLModule", 200, 0, 200);
125 B2INFO(
"TRGGDLModule::initialize. simulationMode=" <<
_simulationMode);
129 m_TRGSummary.registerInDataStore();
159 if (
_debugLevel > 9) printf(
"TRGGDLModule::beginRun() ends.\n");
161 B2DEBUG(100,
"TRGGDLModule ... beginRun called configFile = " << cfn);
168 if (
_debugLevel > 9) printf(
"TRGGDLModule::event() starts.\n");
180 int result_summary = 0;
182 result_summary = m_TRGSummary->getTRGSummary(0);
184 B2WARNING(
"TRGGDLModule.cc: TRGSummary not found. Check it!!!!");
194 B2DEBUG(200,
"TRGGDLModule ... endRun called ");
203 B2DEBUG(100,
"TRGGDLModule ... terminate called ");
std::string configFile(void) const
returns configuration file name.
int _simulationMode
Mode for TRGGDL simulation.
StoreObjPtr< TRGGRLInfo > m_TRGGRLInfo
< required input for TRGGRLInfo
void setDescription(const std::string &description)
Sets the description of the module.
static int level(void)
returns the debug level.
void accumulatePsn(TH1I *)
Accumulate bit info in histogram.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void accumulateInp(TH1I *)
Accumulate bit info in histogram.
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
void simulate(void)
fast trigger simulation.
bool _algFromDB
Switch for algorithm source. False when using local .alg file.
virtual ~TRGGDLModule()
Destructor.
std::string version(void) const
returns version of TRGGDLModule.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
void update(bool mcAnalysis=true)
updates TRGGDL information.
virtual void initialize() override
Initilizes TRGGDLModule.
virtual void defineHisto() override
Define Histogram.
virtual void terminate() override
Called when processing ended.
Abstract base class for different kinds of events.
static TRGGDL * _gdl
A pointer to a TRGGDL;.
void setReturnValue(int value)
Sets the return value for this module as integer.
virtual void endRun() override
Called when run ended.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
static TRGGDL * getTRGGDL(void)
returns TRGGDL object.
int _fastSimulationMode
Switch for the fast simulation.
void accumulateFtd(TH1I *)
Accumulate bit info in histogram.
void terminate(void)
terminates when run is finished
virtual void beginRun() override
Called when new run started.
std::string _configFilename
Config. file name.
virtual void event() override
Called event by event.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
int _debugLevel
Debug level.