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;
138 for (;nEventsIt!=nEventsEnd;++nEventsIt)
139 nEvents+=nEventsIt->second;
141 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
143 <<
" # events: " << nEvents << endl;
158 for (;nLumiTrIt!=nLumiTrEnd;++nLumiTrIt)
159 nLumiTr+=nLumiTrIt->second;
164 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
168 stringstream binLabel;
169 binLabel <<
"LS " << firstLSinTimeSlot;
171 binLabel <<
"-" << lastLSinTimeSlot;
183 int binN = (int)ls-(
theFirstLS-1)/(int)theLSPrescale;
193 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
194 <<
"[DTTimeEvolutionHisto] Update time-slot: "<< binN <<
" with value: " << value << endl;
204 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
205 <<
"[DTTimeEvolutionHisto]***Error: pointer to ME is NULL" << endl;
210 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
211 <<
"[DTTimeEvolutionHisto]***Error: normalizing histos with != # of bins" << endl;
217 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
219 <<
" = " << 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)
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