23 int mode) : valueLastTimeSlot(0),
25 theLSPrescale(lsPrescale),
30 histo = dbe->get(dbe->pwd() +
"/" +
name);
31 nBookedBins =
histo->getNbinsX();
86 int mode) : valueLastTimeSlot(0),
88 theLSPrescale(lsPrescale),
93 if(sliding) nBookedBins++;
94 if(!sliding && theMode == 0)
95 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
96 <<
"[DTTimeEvolutionHisto]***Error: wrong configuration" << endl;
99 stringstream realTitle; realTitle << title <<
"/" << theLSPrescale <<
" LS";
102 histo = dbe->book1D(name, realTitle.str(), nBookedBins, (float)theFirstLS, nBookedBins+1.);
106 histo->setBinLabel(1,
"avg. previous",1);
109 for(
int bin =1;
bin != nBookedBins+1; ++
bin) {
111 if(theLSPrescale > 1) {
112 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS <<
"-" <<
bin*theLSPrescale+theFirstLS;
114 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS;
131 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
132 <<
"[DTTimeEvolutionHisto] Retrieve ME with name: " << name << endl;
133 histo = dbe->get(name);
193 for (;nEventsIt!=nEventsEnd;++nEventsIt)
194 nEvents+=nEventsIt->second;
196 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
198 <<
" # events: " << nEvents << endl;
213 for (;nLumiTrIt!=nLumiTrEnd;++nLumiTrIt)
214 nLumiTr+=nLumiTrIt->second;
219 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
223 stringstream binLabel;
224 binLabel <<
"LS " << firstLSinTimeSlot;
226 binLabel <<
"-" << lastLSinTimeSlot;
238 int binN = (int)ls-(
theFirstLS-1)/(int)theLSPrescale;
248 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
249 <<
"[DTTimeEvolutionHisto] Update time-slot: "<< binN <<
" with value: " << value << endl;
259 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
260 <<
"[DTTimeEvolutionHisto]***Error: pointer to ME is NULL" << endl;
265 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
266 <<
"[DTTimeEvolutionHisto]***Error: normalizing histos with != # of bins" << endl;
272 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
274 <<
" = " << normValue << endl;
void setBinContent(int binx, double content)
set content of bin (1-D)
void accumulateValueTimeSlot(float value)
std::map< int, int > nLumiTrInLastTimeSlot
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
DTTimeEvolutionHisto(DQMStore *dbe, const std::string &name, const std::string &title, int nbins, int lsPrescale, bool sliding, int mode=0)
void setTimeSlotValue(float value, int timeSlot)
std::map< int, int > nEventsInLastTimeSlot
virtual ~DTTimeEvolutionHisto()
Destructor.
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
TH1F * getTH1F(void) const
void normalizeTo(const MonitorElement *histForNorm)
void updateTimeSlot(int ls, int nEventsInLS)
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX(void) const
get # of bins in X-axis
volatile std::atomic< bool > shutdown_flag false