10 #include <dqm/analysis/modules/DQMHistAnalysisMonObj.h>
13 #include <dqm/analysis/modules/DQMHistAnalysis.h>
26 DQMHistAnalysisMonObjModule::DQMHistAnalysisMonObjModule()
30 setDescription(
"Example module for making MonitoringObject in DQMHistAnalysis module");
67 TH1* hits =
findHist(
"ARICH/hitsPerEvent");
74 if (hits) hits->Draw();
76 if (bits) bits->Draw();
80 m_monObj->
setVariable(
"hitsPerEvent", hits ? hits->GetMean() : 0, hits ? hits->GetMeanError() : -1);
88 B2DEBUG(20,
"DQMHistAnalysisMonObj : endRun called");
94 B2DEBUG(20,
"terminate called");
The base class for the histogram analysis module.
static TH1 * findHist(const std::string &histname)
Find histogram.
static MonitoringObject * getMonitoringObject(const std::string &histname)
Get MonitoringObject with given name (new object is created if non-existing)
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
virtual void endRun() override
End-of-run action.
virtual void terminate() override
Termination action.
MonitoringObject * m_monObj
MonitoringObject to be produced by this module.
TCanvas * m_c_mask
Canvas with histograms related to channel masking.
virtual void beginRun() override
Begin run function.
TCanvas * m_c_main
Canvas with main run summary histograms.
virtual ~DQMHistAnalysisMonObjModule()
Destructor.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
void setVariable(const std::string &var, float val, float upErr=-1., float dwErr=-1)
set value to float variable (new variable is made if not yet existing)
void addCanvas(TCanvas *canv)
Add Canvas to monitoring object.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.