Belle II Software  release-05-01-25
DQMHistAnalysisOutput.cc
1 //+
2 // File : DQMHistAnalysisOutput.cc
3 // Description :
4 //
5 // Author : Tomoyuki Konno, Tokyo Metropolitan Univerisity
6 // Date : 25 - Dec - 2015
7 //-
8 
9 
10 #include <dqm/analysis/modules/DQMHistAnalysisOutput.h>
11 
12 #include <daq/slc/base/StringUtil.h>
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 //-----------------------------------------------------------------
18 // Register the Module
19 //-----------------------------------------------------------------
20 REG_MODULE(DQMHistAnalysisOutput)
21 
22 //-----------------------------------------------------------------
23 // Implementation
24 //-----------------------------------------------------------------
25 
27 {
28  //Parameter definition
29  B2DEBUG(20, "DQMHistAnalysisOutput: Constructor done.");
30 }
31 
32 
33 DQMHistAnalysisOutputModule::~DQMHistAnalysisOutputModule() { }
34 
35 void DQMHistAnalysisOutputModule::initialize()
36 {
37  ParamTypeList& parnames(getParNames());
38  for (ParamTypeList::iterator i = parnames.begin(); i != parnames.end(); ++i) {
39  std::string pname = i->first;
40  B2DEBUG(20, "Adding : " << pname);
41  }
42  B2DEBUG(20, "DQMHistAnalysisOutput: initialized.");
43 }
44 
45 
46 void DQMHistAnalysisOutputModule::beginRun()
47 {
48  B2DEBUG(20, "DQMHistAnalysisOutput: beginRun called.");
49 }
50 
51 void DQMHistAnalysisOutputModule::event()
52 {
53  ParamTypeList& parnames(getParNames());
54  const IntValueList& vints(getIntValues());
55  const FloatValueList& vfloats(getFloatValues());
56  const TextList& texts(getTexts());
57  for (ParamTypeList::iterator i = parnames.begin(); i != parnames.end(); ++i) {
58  std::string pname = i->first;
59  std::string vname = StringUtil::tolower(StringUtil::replace(pname, "/", "."));
60  switch (i->second) {
61  case c_ParamINT:
62  B2DEBUG(20, vname << " " << vints.at(pname));
63  break;
64  case c_ParamFLOAT:
65  B2DEBUG(20, vname << " " << vfloats.at(pname));
66  break;
67  case c_ParamTEXT:
68  B2DEBUG(20, vname << " " << texts.at(pname));
69  break;
70  }
71  }
72 }
73 
74 void DQMHistAnalysisOutputModule::endRun()
75 {
76  B2DEBUG(20, "DQMHistAnalysisOutput : endRun called");
77 }
78 
79 
80 void DQMHistAnalysisOutputModule::terminate()
81 {
82  B2DEBUG(20, "terminate called");
83 }
84 
Belle2::DQMHistAnalysisOutputModule
Class definition for the output module of Sequential ROOT I/O.
Definition: DQMHistAnalysisOutput.h:20
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::DQMHistAnalysisModule::TextList
std::map< std::string, std::string > TextList
The type of list of string module parameter.
Definition: DQMHistAnalysis.h:62
Belle2::DQMHistAnalysisModule::IntValueList
std::map< std::string, int > IntValueList
The type of list of integer module parameter.
Definition: DQMHistAnalysis.h:54
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::DQMHistAnalysisModule::FloatValueList
std::map< std::string, float > FloatValueList
The type of list of float module parameter.
Definition: DQMHistAnalysis.h:58
Belle2::DQMHistAnalysisModule::ParamTypeList
std::map< std::string, EParamType > ParamTypeList
The type of list of module parameter types.
Definition: DQMHistAnalysis.h:50
Belle2::DQMHistAnalysisModule
The base class for the histogram analysis module.
Definition: DQMHistAnalysis.h:27