13 :
MESetEcal(_fullPath, _otype, _btype, _kind, 1, _xaxis, _yaxis),
24 throw_(
"Unsupported MonitorElement kind");
32 MESetTrend const *pRhs(dynamic_cast<MESetTrend const *>(&_rhs));
62 time_t localTime(
time(
nullptr));
64 gmtime_r(&localTime, &timeBuffer);
65 unsigned utcTime(mktime(&timeBuffer));
71 xaxis.
high = xaxis.
low + 200 * 60.;
82 for (
unsigned iME(0); iME <
mes_.size(); ++iME)
83 mes_[iME]->getTH1()->GetXaxis()->SetTimeDisplay(1);
97 fill_(iME, _t + 0.5, _wy, _w);
108 fill_(iME, _t + 0.5, _wy, _w);
119 fill_(iME, _t + 0.5, _wy, _w);
125 if (
mes_.size() != 1)
126 throw_(
"MESet type incompatible");
129 fill_(0, _t + 0.5, _wy, _w);
139 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
149 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
159 return mes_[iME]->getTH1()->FindBin(_t + 0.5, _y);
165 if (
mes_.size() != 1)
166 throw_(
"MESet type incompatible");
168 return mes_[0]->getTH1()->FindBin(_t + 0.5, _y);
173 throw_(
"Cumulative flag set for a profile plot");
178 TAxis *tAxis(
mes_[0]->getTH1()->GetXaxis());
179 int nbinsX(tAxis->GetNbins());
180 unsigned tLow(tAxis->GetBinLowEdge(1));
181 unsigned tHigh(tAxis->GetBinUpEdge(nbinsX));
184 return _t >= tLow && _t < tHigh;
187 int unitsPerBin((tHigh - tLow) / nbinsX);
189 if (_t >= tLow && _t < tHigh) {
191 int thisBin(tAxis->FindBin(_t + 0.5));
195 for (
unsigned iME(0); iME <
mes_.size(); iME++) {
197 int nbinsY(me->
getTH1()->GetNbinsY());
198 for (
int iy(1); iy <= nbinsY; ++iy) {
213 }
else if (_t >= tHigh) {
214 dBin = (_t - tHigh) / unitsPerBin + 1;
217 }
else if (_t < tLow) {
223 for (
unsigned iME(0); iME <
mes_.size(); iME++) {
227 int iMax(nbinsX + 1);
228 while (--iMax > 0 && !filled) {
239 for (
int iy(1); iy <= me->
getNbinsY(); iy++) {
247 for (
int iy(1); iy <= me->
getNbinsY(); iy++) {
263 if (_t < tLow - (nbinsX - maxBin) * unitsPerBin)
266 dBin = (_t - tLow) / unitsPerBin - 1;
269 int start(dBin > 0 ? dBin + 1 : nbinsX + dBin);
270 int end(dBin > 0 ? nbinsX + 1 : 0);
271 int step(dBin > 0 ? 1 : -1);
273 tLow += dBin * unitsPerBin;
274 tHigh += dBin * unitsPerBin;
276 for (
unsigned iME(0); iME <
mes_.size(); iME++) {
279 me->
getTH1()->GetXaxis()->SetLimits(tLow, tHigh);
281 if ((end - start) / step < 0) {
292 for (; ix !=
end; ix +=
step) {
294 entries += binContent;
298 ix = end - dBin - 1 *
step;
301 for (ix += step; ix !=
end; ix +=
step) {
308 for (; ix !=
end; ix +=
step) {
311 entries += binEntries;
314 if (binEntries > 0) {
316 double sumw2((
rms *
rms + binContent * binContent) * binEntries);
322 for (; ix !=
end; ix +=
step) {
331 for (; ix !=
end; ix +=
step) {
332 for (
int iy(1); iy <= nbinsY; iy++) {
333 int orig(me->
getTH1()->GetBin(ix, iy));
334 int dest(me->
getTH1()->GetBin(ix - dBin, iy));
336 entries += binContent;
344 ix = end - dBin - 1 *
step;
345 std::vector<double> lastContent;
346 std::vector<double> lastError;
347 for (
int iy(1); iy <= nbinsY; iy++) {
351 for (ix += step; ix !=
end; ix +=
step) {
352 for (
int iy(1); iy <= nbinsY; iy++) {
362 for (; ix !=
end; ix +=
step) {
363 for (
int iy(1); iy <= nbinsY; iy++) {
364 int orig(me->
getTH1()->GetBin(ix, iy));
365 int dest(me->
getTH1()->GetBin(ix - dBin, iy));
368 entries += binEntries;
371 if (binEntries > 0) {
373 double sumw2((
rms *
rms + binContent * binContent) * binEntries);
380 for (; ix !=
end; ix +=
step) {
381 for (
int iy(1); iy <= nbinsY; iy++) {
MonitorElement::Kind kind_
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual void setAxisTitle(std::string const &, int=1)
int findBin(DetId const &, double, double=0.) const override
MESet & operator=(MESet const &) override
MESetTrend(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
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 fill(DetId const &, double, double=1., double=1.) override
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
void Reset()
reset ME (ie. contents, errors, etc)
virtual void fill_(unsigned, int, double)
bin
set the eta bin as selection string.
MESet * clone(std::string const &="") const override
unsigned findPlotIndex(ObjectType, DetId const &)
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
int getNbinsY() const
get # of bins in Y-axis
double getBinContent(int binx) const
get content of bin (1-D)
void book(DQMStore::IBooker &) override
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_
binning::BinningType btype_
void setBinEntries(int bin, double nentries)
set # of bin entries (to be used for profiles)
std::vector< MonitorElement * > mes_
void book(DQMStore::IBooker &) override