14 #include <dqm/analysis/modules/DQMHistAnalysisRunNr.h>
16 #include <TPaveText.h>
30 DQMHistAnalysisRunNrModule::DQMHistAnalysisRunNrModule()
40 B2DEBUG(99,
"DQMHistAnalysisRunNr: Constructor done.");
60 B2DEBUG(99,
"DQMHistAnalysisRunNr: initialized.");
65 B2DEBUG(99,
"DQMHistAnalysisRunNr: beginRun called.");
86 auto leg =
new TPaveText(0.6, 0.6, 0.95, 0.95,
"NDC");
87 leg->SetFillColor(kWhite);
95 hh1->SetStats(kFALSE);
97 mean = hh1->GetMean();
98 if (hh1->GetEntries() > 0) {
99 leg->AddText(
"Contains Run: Entries");
102 for (
int i = 0; i <= hh1->GetXaxis()->GetNbins() + 1; i++) {
104 if (hh1->GetBinContent(i) > 0) {
107 tmp.Form(
"%ld: %ld", (
long int)hh1->GetXaxis()->GetBinCenter(i), (
long int)hh1->GetBinContent(i));
115 }
else if (nfilled == 1) {
124 m_cRunNr->Pad()->SetFillColor(kGray);
125 leg->AddText(
"No data yet");
126 }
else if (status == 2) {
128 m_cRunNr->Pad()->SetFillColor(kGreen);
131 m_cRunNr->Pad()->SetFillColor(kRed);
145 B2DEBUG(99,
"DQMHistAnalysisRunNr: terminate called");
The base class for the histogram analysis module.
int registerEpicsPV(std::string pvname, std::string keyname="", bool update_pvs=true)
EPICS related Functions.
static TH1 * findHist(const std::string &histname, bool onlyIfUpdated=false)
Get histogram from list (no other search).
void setEpicsPV(std::string keyname, double value)
Write value to a EPICS PV.
static MonitoringObject * getMonitoringObject(const std::string &histname)
Get MonitoringObject with given name (new object is created if non-existing)
void terminate(void) override final
This method is called at the end of the event processing.
~DQMHistAnalysisRunNrModule()
Destructor.
TCanvas * m_cRunNr
Final Canvas.
void initialize(void) override final
Initializer.
std::string m_prefix
HLT/ERECO prefix for EPICS PVs.
MonitoringObject * m_monObj
Monitoring Object.
std::string m_histogramDirectoryName
name of histogram directory
void beginRun(void) override final
Called when entering a new run.
void event(void) override final
This method is called for each event.
void setDescription(const std::string &description)
Sets the description of the module.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.