25 int mode) : valueLastTimeSlot(0),
26 nEventsInLastTimeSlot(0),
28 theLSPrescale(lsPrescale),
36 nBookedBins =
histo->getNbinsX();
94 int mode) : valueLastTimeSlot(0),
95 nEventsInLastTimeSlot(0),
97 theLSPrescale(lsPrescale),
100 firstLSinTimeSlot(0),
104 if(sliding) nBookedBins++;
105 if(!sliding && theMode == 0)
106 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
107 <<
"[DTTimeEvolutionHisto]***Error: wrong configuration" << endl;
110 stringstream realTitle; realTitle << title <<
"/" << theLSPrescale <<
" LS";
113 histo = dbe->
book1D(name, realTitle.str(), nBookedBins, (float)theFirstLS, nBookedBins+1.);
117 histo->setBinLabel(1,
"avg. previous",1);
120 for(
int bin =1;
bin != nBookedBins+1; ++
bin) {
122 if(theLSPrescale > 1) {
123 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS <<
"-" <<
bin*theLSPrescale+theFirstLS;
125 label <<
"LS " << ((
bin-1)*theLSPrescale)+theFirstLS;
138 nEventsInLastTimeSlot(0),
143 firstLSinTimeSlot(0),
145 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
146 <<
"[DTTimeEvolutionHisto] Retrieve ME with name: " << name << endl;
196 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
211 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
227 int binN = (int)ls-(
theFirstLS-1)/(int)theLSPrescale;
237 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
238 <<
"[DTTimeEvolutionHisto] Update time-slot: "<< binN <<
" with value: " << value << endl;
248 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
249 <<
"[DTTimeEvolutionHisto]***Error: pointer to ME is NULL" << endl;
254 LogWarning(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
255 <<
"[DTTimeEvolutionHisto]***Error: normalizing histos with != # of bins" << endl;
261 LogVerbatim(
"DTDQM|DTMonitorModule|DTMonitorClient|DTTimeEvolutionHisto")
263 <<
" = " << 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.
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)
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