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.");
69 auto leg =
new TPaveText(0.6, 0.6, 0.95, 0.95,
"NDC");
70 leg->SetFillColor(kWhite);
71 leg->AddText(
"No data yet");
86 auto leg =
new TPaveText(0.6, 0.6, 0.95, 0.95,
"NDC");
87 leg->SetFillColor(kWhite);
96 hist->SetStats(kFALSE);
98 mean = hist->GetMean();
99 if (hist->GetEntries() > 0) {
100 leg->AddText(
"Contains Run: Entries");
103 for (
int i = 0; i <= hist->GetXaxis()->GetNbins() + 1; i++) {
105 if (hist->GetBinContent(i) > 0) {
108 tmp.Form(
"%ld: %ld", (
long int)hist->GetXaxis()->GetBinCenter(i), (
long int)hist->GetBinContent(i));
116 }
else if (nfilled == 1) {
125 leg->AddText(
"No data yet");
147 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).
@ c_ColorError
Analysis result: Severe issue found.
@ c_ColorTooFew
Not enough entries/event to judge.
@ c_ColorGood
Analysis result: Good.
void setEpicsPV(std::string keyname, double value)
Write value to a EPICS PV.
@ c_StatusTooFew
Not enough entries/event to judge.
@ c_StatusError
Analysis result: Severe issue found.
@ c_StatusGood
Analysis result: Good.
void UpdateCanvas(std::string name, bool updated=true)
Mark canvas as updated (or not)
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.