Belle II Software  release-05-02-19
TRGGDLModule.h
1 //-----------------------------------------------------------------------------
2 // $Id$
3 //-----------------------------------------------------------------------------
4 // Filename : TRGGDLModule.h
5 // Section : TRG GDL
6 // Owner : Yoshihito Iwasaki
7 // Email : yoshihito.iwasaki@kek.jp
8 //-----------------------------------------------------------------------------
9 // Description : A trigger module for GDL
10 //-----------------------------------------------------------------------------
11 // 0.00 : 2013/12/13 : First version
12 //-----------------------------------------------------------------------------
13 
14 #ifndef TRGGDLModule_H
15 #define TRGGDLModule_H
16 
17 #include <string>
18 // #include "framework/core/Module.h"
19 #include <framework/core/HistoModule.h>
20 #include <framework/datastore/StoreObjPtr.h>
21 #include <mdst/dataobjects/TRGSummary.h>
22 #include <trg/grl/dataobjects/TRGGRLInfo.h>
23 #include "trg/gdl/TRGGDL.h"
24 #include <TDirectory.h>
25 #include <TH1I.h>
26 
27 namespace Belle2 {
33 
37 //class TRGGDLModule : public Module {
38  class TRGGDLModule : public HistoModule {
39 
40  public:
41 
43  TRGGDLModule();
44 // TRGGDLModule(const std::string & type);
45 
47  virtual ~TRGGDLModule();
48 
50  virtual void initialize() override;
51 
53  virtual void beginRun() override;
54 
56  virtual void event() override;
57 
59  virtual void endRun() override;
60 
62  virtual void terminate() override;
63 
65  virtual void defineHisto() override;
66 
67  public:
68 
70  std::string version(void) const;
71 
72  private: // Parameters
73 
76 
78  StoreObjPtr<TRGSummary> m_TRGSummary;
79 
82 
84  std::string _configFilename;
85 
89 
93 
96 
98  bool _algFromDB;
99 
100  // Phase
101  std::string _Phase;
102 
103  // Path to algorithm file
104  std::string _algFilePath;
105 
106  private:
107 
109  static TRGGDL* _gdl;
110 
111  protected:
112 
113  TDirectory* oldDir = nullptr;
114  TDirectory* newDir = nullptr;
115 
116  TH1I* h_inp = nullptr;
117  TH1I* h_ftd = nullptr;
118  TH1I* h_psn = nullptr;
119 
120  };
121 
123 } // namespace Belle2
124 
125 #endif // TRGGDLModule_H
Belle2::TRGGDLModule::_simulationMode
int _simulationMode
Mode for TRGGDL simulation.
Definition: TRGGDLModule.h:88
Belle2::TRGGDLModule::m_TRGGRLInfo
StoreObjPtr< TRGGRLInfo > m_TRGGRLInfo
< required input for TRGGRLInfo
Definition: TRGGDLModule.h:75
Belle2::TRGGDLModule::_firmwareSimulationMode
int _firmwareSimulationMode
Switch for the firmware simulation. 0:do nothing, 1:do everything.
Definition: TRGGDLModule.h:95
Belle2::TRGGDLModule
A module to simulate the Global Decision Logic.
Definition: TRGGDLModule.h:38
Belle2::TRGGDL
The instance of TRGGDL is a singleton.
Definition: TRGGDL.h:48
Belle2::TRGGDLModule::_algFromDB
bool _algFromDB
Switch for algorithm source. False when using local .alg file.
Definition: TRGGDLModule.h:98
Belle2::TRGGDLModule::~TRGGDLModule
virtual ~TRGGDLModule()
Destructor.
Definition: TRGGDLModule.cc:90
Belle2::TRGGDLModule::TRGGDLModule
TRGGDLModule()
Constructor.
Definition: TRGGDLModule.cc:42
Belle2::TRGGDLModule::version
std::string version(void) const
returns version of TRGGDLModule.
Definition: TRGGDLModule.cc:37
Belle2::TRGGDLModule::initialize
virtual void initialize() override
Initilizes TRGGDLModule.
Definition: TRGGDLModule.cc:116
Belle2::TRGGDLModule::defineHisto
virtual void defineHisto() override
Define Histogram.
Definition: TRGGDLModule.cc:99
Belle2::TRGGDLModule::terminate
virtual void terminate() override
Called when processing ended.
Definition: TRGGDLModule.cc:198
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StoreObjPtr
Type-safe access to single objects in the data store.
Definition: ParticleList.h:33
Belle2::TRGGDLModule::_gdl
static TRGGDL * _gdl
A pointer to a TRGGDL;.
Definition: TRGGDLModule.h:109
Belle2::TRGGDLModule::endRun
virtual void endRun() override
Called when run ended.
Definition: TRGGDLModule.cc:192
Belle2::TRGGDLModule::_fastSimulationMode
int _fastSimulationMode
Switch for the fast simulation.
Definition: TRGGDLModule.h:92
Belle2::TRGGDLModule::beginRun
virtual void beginRun() override
Called when new run started.
Definition: TRGGDLModule.cc:133
Belle2::TRGGDLModule::_configFilename
std::string _configFilename
Config. file name.
Definition: TRGGDLModule.h:84
Belle2::TRGGDLModule::event
virtual void event() override
Called event by event.
Definition: TRGGDLModule.cc:165
Belle2::HistoModule
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
Belle2::TRGGDLModule::_debugLevel
int _debugLevel
Debug level.
Definition: TRGGDLModule.h:81