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);
59 B2DEBUG(20,
"mean " << m_f->GetParameter(1));
60 B2DEBUG(20,
"sigma" << m_f->GetParameter(2));
62 B2DEBUG(20,
"Histo " << m_histoname <<
" not found");
66 void DQMHistAnalysisExampleModule::endRun()
68 B2DEBUG(20,
"DQMHistAnalysisExample : endRun called");
72 void DQMHistAnalysisExampleModule::terminate()
74 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.