25 int mode) : valueLastTimeSlot(0),
27 theLSPrescale(lsPrescale),
33 nBookedBins =
histo->getNbinsX();
88 int mode) : valueLastTimeSlot(0),
90 theLSPrescale(lsPrescale),
95 if(sliding) nBookedBins++;
96 if(!sliding && theMode == 0)
97 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
98 <<
"[DTTimeEvolutionHisto]***Error: wrong configuration" << endl;
101 stringstream realTitle; realTitle << title <<
"/" << theLSPrescale <<
" LS";
104 histo = dbe->
book1D(name, realTitle.str(), nBookedBins, (float)theFirstLS, nBookedBins+1.);
108 histo->setBinLabel(1,
"avg. previous",1);
111 for(
int bin =1;
bin != nBookedBins+1; ++
bin) {
113 if(theLSPrescale > 1) {
114 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS <<
"-" <<
bin*theLSPrescale+theFirstLS;
116 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS;
133 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
134 <<
"[DTTimeEvolutionHisto] Retrieve ME with name: " << name << endl;
195 for (;nEventsIt!=nEventsEnd;++nEventsIt)
196 nEvents+=nEventsIt->second;
198 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
200 <<
" # events: " << nEvents << endl;
215 for (;nLumiTrIt!=nLumiTrEnd;++nLumiTrIt)
216 nLumiTr+=nLumiTrIt->second;
221 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
225 stringstream binLabel;
226 binLabel <<
"LS " << firstLSinTimeSlot;
228 binLabel <<
"-" << lastLSinTimeSlot;
240 int binN = (int)ls-(
theFirstLS-1)/(int)theLSPrescale;
250 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
251 <<
"[DTTimeEvolutionHisto] Update time-slot: "<< binN <<
" with value: " << value << endl;
261 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
262 <<
"[DTTimeEvolutionHisto]***Error: pointer to ME is NULL" << endl;
267 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
268 <<
"[DTTimeEvolutionHisto]***Error: normalizing histos with != # of bins" << endl;
274 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
276 <<
" = " << normValue << endl;
void setBinContent(int binx, double content)
set content of bin (1-D)
void accumulateValueTimeSlot(float value)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
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)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
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
const std::string & pwd(void) const