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