26 nBookedBins =
histo->getNbinsX();
36 int mode) : valueLastTimeSlot(0),
38 theLSPrescale(lsPrescale),
43 if(sliding) nBookedBins++;
44 if(!sliding && theMode == 0)
45 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
46 <<
"[DTTimeEvolutionHisto]***Error: wrong configuration" << endl;
48 stringstream realTitle; realTitle << title <<
"/" << theLSPrescale <<
" LS";
52 histo = ibooker.
book1D(name, realTitle.str(), nBookedBins, (
float)theFirstLS, nBookedBins+1.);
56 histo->setBinLabel(1,
"avg. previous",1);
60 for(
int bin =1;
bin != nBookedBins+1; ++
bin) {
62 if(theLSPrescale > 1) {
63 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS <<
"-" <<
bin*theLSPrescale+theFirstLS;
65 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS;
79 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
80 <<
"[DTTimeEvolutionHisto] Retrieve ME with name: " <<
" "<< endl;
140 for (;nEventsIt!=nEventsEnd;++nEventsIt)
141 nEvents+=nEventsIt->second;
143 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
145 <<
" # events: " << nEvents << endl;
160 for (;nLumiTrIt!=nLumiTrEnd;++nLumiTrIt)
161 nLumiTr+=nLumiTrIt->second;
166 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
170 stringstream binLabel;
171 binLabel <<
"LS " << firstLSinTimeSlot;
173 binLabel <<
"-" << lastLSinTimeSlot;
196 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
197 <<
"[DTTimeEvolutionHisto] Update time-slot: "<< binN <<
" with value: " << value << endl;
206 if(
histo ==
nullptr) {
207 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
208 <<
"[DTTimeEvolutionHisto]***Error: pointer to ME is NULL" << endl;
213 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
214 <<
"[DTTimeEvolutionHisto]***Error: normalizing histos with != # of bins" << endl;
220 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
222 <<
" = " << normValue << endl;
void setBinContent(int binx, double content)
set content of bin (1-D)
void accumulateValueTimeSlot(float value)
std::map< int, int > nLumiTrInLastTimeSlot
DTTimeEvolutionHisto(DQMStore::IBooker &ibooker, const std::string &name, const std::string &title, int nbins, int lsPrescale, bool sliding, int mode=0)
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)
void setTimeSlotValue(float value, int timeSlot)
std::map< int, int > nEventsInLastTimeSlot
MonitorElement * book1D(Args &&...args)
virtual ~DTTimeEvolutionHisto()
Destructor.
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
bin
set the eta bin as selection string.
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
void normalizeTo(const MonitorElement *histForNorm)
void updateTimeSlot(int ls, int nEventsInLS)
double getBinContent(int binx) const
get content of bin (1-D)
int getNbinsX() const
get # of bins in X-axis