8 MESetEcal(_fullPath, _otype, _btype, _kind, 1, _xaxis, _yaxis),
20 throw_(
"Unsupported MonitorElement kind");
26 minutely_(_orig.minutely_),
27 shiftAxis_(_orig.shiftAxis_),
28 currentBin_(_orig.currentBin_)
35 MESetTrend const* pRhs(dynamic_cast<MESetTrend const*>(&_rhs));
49 if(_path !=
"")
path_ = _path;
76 fill_(iME, _t + 0.5, _wy, _w);
88 fill_(iME, _t + 0.5, _wy, _w);
100 fill_(iME, _t + 0.5, _wy, _w);
108 throw_(
"MESet type incompatible");
111 fill_(0, _t + 0.5, _wy, _w);
122 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
133 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
144 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
152 throw_(
"MESet type incompatible");
154 return mes_[0]->getTH1()->FindBin(_t + 0.5, _y);
161 throw_(
"Cumulative flag set for a profile plot");
165 template<
class Bookable>
178 time_t localTime(
time(0));
179 struct tm timeBuffer;
180 gmtime_r(&localTime, &timeBuffer);
181 unsigned utcTime(mktime(&timeBuffer));
185 else xaxis.
high = xaxis.
low + 200 * 60.;
196 for(
unsigned iME(0); iME <
mes_.size(); ++iME)
197 mes_[iME]->getTH1()->GetXaxis()->SetTimeDisplay(1);
207 TAxis* tAxis(
mes_[0]->getTH1()->GetXaxis());
208 int nbinsX(tAxis->GetNbins());
209 unsigned tLow(tAxis->GetBinLowEdge(1));
210 unsigned tHigh(tAxis->GetBinUpEdge(nbinsX));
212 if(!
shiftAxis_)
return _t >= tLow && _t < tHigh;
215 int unitsPerBin((tHigh - tLow) / nbinsX);
217 if(_t >= tLow && _t < tHigh){
219 int thisBin(tAxis->FindBin(_t + 0.5));
222 for(
unsigned iME(0); iME <
mes_.size(); iME++){
224 int nbinsY(me->
getTH1()->GetNbinsY());
225 for(
int iy(1); iy <= nbinsY; ++iy){
241 else if(_t >= tHigh){
242 dBin = (_t - tHigh) / unitsPerBin + 1;
250 for(
unsigned iME(0); iME <
mes_.size(); iME++){
254 int iMax(nbinsX + 1);
255 while(--iMax > 0 && !filled){
264 for(
int iy(1); iy <= me->
getNbinsY(); iy++){
272 for(
int iy(1); iy <= me->
getNbinsY(); iy++){
284 if(iMax > maxBin) maxBin = iMax;
287 if(_t < tLow - (nbinsX - maxBin) * unitsPerBin)
return false;
289 dBin = (_t - tLow) / unitsPerBin - 1;
292 int start(dBin > 0 ? dBin + 1 : nbinsX + dBin);
293 int end(dBin > 0 ? nbinsX + 1 : 0);
294 int step(dBin > 0 ? 1 : -1);
296 tLow += dBin * unitsPerBin;
297 tHigh += dBin * unitsPerBin;
299 for(
unsigned iME(0); iME <
mes_.size(); iME++){
302 me->
getTH1()->GetXaxis()->SetLimits(tLow, tHigh);
304 if((end - start) / step < 0){
318 entries += binContent;
322 ix = end - dBin - 1 *
step;
325 for(ix += step; ix !=
end; ix +=
step){
337 entries += binEntries;
342 double sumw2((
rms *
rms + binContent * binContent) * binEntries);
361 for(
int iy(1); iy <= nbinsY; iy++){
362 int orig(me->
getTH1()->GetBin(ix, iy));
363 int dest(me->
getTH1()->GetBin(ix - dBin, iy));
365 entries += binContent;
373 ix = end - dBin - 1 *
step;
374 std::vector<double> lastContent;
375 std::vector<double> lastError;
376 for(
int iy(1); iy <= nbinsY; iy++){
380 for(ix += step; ix !=
end; ix +=
step){
381 for(
int iy(1); iy <= nbinsY; iy++){
394 for(
int iy(1); iy <= nbinsY; iy++){
395 int orig(me->
getTH1()->GetBin(ix, iy));
396 int dest(me->
getTH1()->GetBin(ix - dBin, iy));
399 entries += binEntries;
404 double sumw2((
rms *
rms + binContent * binContent) * binEntries);
413 for(
int iy(1); iy <= nbinsY; iy++){
MonitorElement::Kind kind_
void setBinContent(int binx, double content)
set content of bin (1-D)
tuple start
Check for commandline option errors.
virtual void setAxisTitle(std::string const &, int=1)
MESet & operator=(MESet const &) override
MESetTrend(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
MESet * clone(std::string const &="") const override
virtual void checkME_(unsigned _iME) const
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
void book(DQMStore &) override
void book(DQMStore &) override
int findBin(DetId const &, double, double=0.) const override
int getNbinsY(void) const
get # of bins in Y-axis
void fill(DetId const &, double, double=1., double=1.) override
std::vector< MonitorElement * > mes_
void throw_(std::string const &_message) const
void setBinError(int binx, double error)
set uncertainty on content of bin (1-D)
void setEntries(double nentries)
set # of entries
virtual void fill_(unsigned, int, double)
unsigned findPlotIndex(ObjectType, DetId const &)
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
double getBinContent(int binx) const
get content of bin (1-D)
double getBinEntries(int bin) const
get # of bin entries (for profiles)
MESet & operator=(MESet const &) override
binning::ObjectType otype_
virtual const_iterator end() const
binning::AxisSpecs const * xaxis_
volatile std::atomic< bool > shutdown_flag false
binning::BinningType btype_
void Reset(void)
reset ME (ie. contents, errors, etc)
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)