Belle II Software  release-05-02-19
EKLMADCModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2013 Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Kirill Chilikin *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 /* KLM headers. */
14 #include <klm/dbobjects/KLMScintillatorDigitizationParameters.h>
15 
16 /* Belle 2 headers. */
17 #include <framework/core/Module.h>
18 #include <framework/database/DBObjPtr.h>
19 
20 /* ROOT headers. */
21 #include <TFile.h>
22 
23 namespace Belle2 {
34  class EKLMADCModule : public Module {
35 
36  public:
37 
41  EKLMADCModule();
42 
47 
51  void initialize() override;
52 
56  void beginRun() override;
57 
61  void event() override;
62 
66  void endRun() override;
67 
71  void terminate() override;
72 
73  private:
74 
82  void generateHistogram(const char* name, double l, double d, int npe);
83 
85  std::string m_mode;
86 
88  std::string m_out;
89 
91  TFile* m_fout;
92 
95 
98 
100  float* m_hDir;
101 
103  float* m_hRef;
104 
105  };
106 
108 }
Belle2::EKLMADCModule::m_hDir
float * m_hDir
Direct histogram.
Definition: EKLMADCModule.h:108
Belle2::EKLMADCModule::m_mode
std::string m_mode
Operation mode.
Definition: EKLMADCModule.h:93
Belle2::EKLMADCModule::m_fout
TFile * m_fout
Output file.
Definition: EKLMADCModule.h:99
Belle2::EKLMADCModule::m_out
std::string m_out
Name of output file.
Definition: EKLMADCModule.h:96
Belle2::EKLMADCModule::beginRun
void beginRun() override
Called when entering a new run.
Definition: EKLMADCModule.cc:120
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::EKLMADCModule::event
void event() override
This method is called for each event.
Definition: EKLMADCModule.cc:124
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::KLMScintillatorDigitizationParameters
Class to store KLM scintillator simulation parameters in the database.
Definition: KLMScintillatorDigitizationParameters.h:33
Belle2::EKLMADCModule::EKLMADCModule
EKLMADCModule()
Constructor.
Definition: EKLMADCModule.cc:30
Belle2::EKLMADCModule::m_SciSimPar
KLMScintillatorDigitizationParameters * m_SciSimPar
Scintillator simulation parameters.
Definition: EKLMADCModule.h:105
Belle2::EKLMADCModule::m_SciSimParDatabase
DBObjPtr< KLMScintillatorDigitizationParameters > m_SciSimParDatabase
Scintillator simulation parameters.
Definition: EKLMADCModule.h:102
Belle2::EKLMADCModule::generateHistogram
void generateHistogram(const char *name, double l, double d, int npe)
Generate output histogram.
Definition: EKLMADCModule.cc:48
Belle2::EKLMADCModule::terminate
void terminate() override
This method is called at the end of the event processing.
Definition: EKLMADCModule.cc:132
Belle2::EKLMADCModule::~EKLMADCModule
~EKLMADCModule()
Destructor.
Definition: EKLMADCModule.cc:44
Belle2::EKLMADCModule::endRun
void endRun() override
This method is called if the current run ends.
Definition: EKLMADCModule.cc:128
Belle2::EKLMADCModule::initialize
void initialize() override
Initializer.
Definition: EKLMADCModule.cc:78
Belle2::EKLMADCModule::m_hRef
float * m_hRef
Reflected histogram.
Definition: EKLMADCModule.h:111