Belle II Software  release-06-00-14
EKLMADCModule.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 #pragma once
10 
11 /* KLM headers. */
12 #include <klm/dbobjects/KLMScintillatorDigitizationParameters.h>
13 
14 /* Belle 2 headers. */
15 #include <framework/core/Module.h>
16 #include <framework/database/DBObjPtr.h>
17 #include <framework/dbobjects/HardwareClockSettings.h>
18 
19 /* ROOT headers. */
20 #include <TFile.h>
21 
22 namespace Belle2 {
33  class EKLMADCModule : public Module {
34 
35  public:
36 
40  EKLMADCModule();
41 
46 
50  void initialize() override;
51 
55  void beginRun() override;
56 
60  void event() override;
61 
65  void endRun() override;
66 
70  void terminate() override;
71 
72  private:
73 
81  void generateHistogram(const char* name, double l, double d, int npe);
82 
84  std::string m_mode;
85 
87  std::string m_out;
88 
90  TFile* m_fout;
91 
94 
97 
100 
102  float* m_hDir;
103 
105  float* m_hRef;
106 
107  };
108 
110 }
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
Module EKLMADCModule.
Definition: EKLMADCModule.h:33
void generateHistogram(const char *name, double l, double d, int npe)
Generate output histogram.
~EKLMADCModule()
Destructor.
void initialize() override
Initializer.
float * m_hRef
Reflected histogram.
void event() override
This method is called for each event.
TFile * m_fout
Output file.
Definition: EKLMADCModule.h:90
void endRun() override
This method is called if the current run ends.
void terminate() override
This method is called at the end of the event processing.
EKLMADCModule()
Constructor.
KLMScintillatorDigitizationParameters * m_SciSimPar
Scintillator simulation parameters.
Definition: EKLMADCModule.h:96
float * m_hDir
Direct histogram.
void beginRun() override
Called when entering a new run.
std::string m_out
Name of output file.
Definition: EKLMADCModule.h:87
DBObjPtr< HardwareClockSettings > m_HardwareClockSettings
Hardware clock settings.
Definition: EKLMADCModule.h:99
DBObjPtr< KLMScintillatorDigitizationParameters > m_SciSimParDatabase
Scintillator simulation parameters.
Definition: EKLMADCModule.h:93
std::string m_mode
Operation mode.
Definition: EKLMADCModule.h:84
Class to store KLM scintillator simulation parameters in the database.
Base class for Modules.
Definition: Module.h:72
Abstract base class for different kinds of events.