9 #include <dqm/analysis/modules/DQMHistAnalysisExample.h>
27 addParam(
"HistoName", m_histoname,
"Name of Histogram (incl dir)", std::string(
""));
28 addParam(
"Function", m_function,
"Fit function definition", std::string(
"gaus"));
29 B2DEBUG(20,
"DQMHistAnalysisExample: Constructor done.");
33 DQMHistAnalysisExampleModule::~DQMHistAnalysisExampleModule() { }
35 void DQMHistAnalysisExampleModule::initialize()
37 B2DEBUG(20,
"DQMHistAnalysisExample: initialized.");
38 TString a = m_histoname;
39 a.ReplaceAll(
"/",
"_");
40 m_c =
new TCanvas(
"c_" + a);
41 m_f =
new TF1(
"f_" + a, TString(m_function), -100, 100);
45 void DQMHistAnalysisExampleModule::beginRun()
50 void DQMHistAnalysisExampleModule::event()
52 TH1* h = findHist(m_histoname);
58 TString a = m_histoname;
59 a.ReplaceAll(
"/",
".");
60 std::string vname = a.Data();
61 setFloatValue(vname +
".mean", m_f->GetParameter(1));
62 setFloatValue(vname +
".sigma", m_f->GetParameter(2));
64 B2DEBUG(20,
"Histo " << m_histoname <<
" not found");
68 void DQMHistAnalysisExampleModule::endRun()
70 B2DEBUG(20,
"DQMHistAnalysisExample : endRun called");
74 void DQMHistAnalysisExampleModule::terminate()
76 B2DEBUG(20,
"terminate called");
Class definition for the output module of Sequential ROOT I/O.
The base class for the histogram analysis module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.