Belle II Software development
TRGGDLModule.h
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#ifndef TRGGDLModule_H
10#define TRGGDLModule_H
11
12#include <string>
13// #include "framework/core/Module.h"
14#include <framework/core/HistoModule.h>
15#include <framework/datastore/StoreObjPtr.h>
16#include <mdst/dataobjects/TRGSummary.h>
17#include <trg/grl/dataobjects/TRGGRLInfo.h>
18#include "trg/gdl/TRGGDL.h"
19#include <simulation/dataobjects/SimClockState.h>
20#include <TDirectory.h>
21#include <TH1I.h>
22
23namespace Belle2 {
32
33//class TRGGDLModule : public Module {
34 class TRGGDLModule : public HistoModule {
35
36 public:
37
40// TRGGDLModule(const std::string & type);
41
43 virtual ~TRGGDLModule();
44
46 virtual void initialize() override;
47
49 virtual void beginRun() override;
50
52 virtual void event() override;
53
55 virtual void endRun() override;
56
58 virtual void terminate() override;
59
61 virtual void defineHisto() override;
62
63 public:
64
66 std::string version(void) const;
67
68 private: // Parameters
69
72
74 StoreObjPtr<TRGSummary> m_TRGSummary;
75
78
80 std::string _configFilename;
81
85
89
92
95
96 // Phase
97 std::string _Phase;
98
99 // Path to algorithm file
100 std::string _algFilePath;
101
104
107
110 private:
111
113 static TRGGDL* _gdl;
114
117 protected:
118
119 TDirectory* oldDir = nullptr;
120 TDirectory* newDir = nullptr;
121
122 TH1I* h_inp = nullptr;
123 TH1I* h_ftd = nullptr;
124 TH1I* h_psn = nullptr;
125
126 };
127
129} // namespace Belle2
130
131#endif // TRGGDLModule_H
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
A module to simulate the Global Decision Logic.
Definition: TRGGDLModule.h:34
StoreObjPtr< TRGGRLInfo > m_TRGGRLInfo
< required input for TRGGRLInfo
Definition: TRGGDLModule.h:71
std::string _configFilename
Config. file name.
Definition: TRGGDLModule.h:80
bool _algFromDB
Switch for algorithm source. False when using local .alg file.
Definition: TRGGDLModule.h:94
int _debugLevel
Debug level.
Definition: TRGGDLModule.h:77
double _timquality_threshold_sfin
Threshold to determine timing quality flag with MC truth: super fine.
Definition: TRGGDLModule.h:103
int _simulationMode
Mode for TRGGDL simulation.
Definition: TRGGDLModule.h:84
bool m_simulateT0Jitter
if True, L1 jitter is simulated by EventT0Generator
Definition: TRGGDLModule.h:108
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
Definition: TRGGDLModule.h:91
double _timquality_threshold_fine
Threshold to determine timing quality flag with MC truth: fine.
Definition: TRGGDLModule.h:106
int _fastSimulationMode
Switch for the fast simulation.
Definition: TRGGDLModule.h:88
StoreObjPtr< SimClockState > m_simClockState
generated hardware clock state
Definition: TRGGDLModule.h:115
The instance of TRGGDL is a singleton.
Definition: TRGGDL.h:44
virtual void initialize() override
Initilizes 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;.
Definition: TRGGDLModule.h:113
virtual void beginRun() override
Called when new run started.
TRGGDLModule()
Constructor.
Definition: TRGGDLModule.cc:37
std::string version(void) const
returns version of TRGGDLModule.
Definition: TRGGDLModule.cc:32
virtual void defineHisto() override
Define Histogram.
Abstract base class for different kinds of events.