12 MESet(_fullPath, _otype, _btype, _kind),
13 logicalDimensions_(_logicalDimensions),
19 throw_(
"Need axis specifications");
48 MESetEcal const* pRhs(dynamic_cast<MESetEcal const*>(&_rhs));
62 if(_path !=
"")
path_ = _path;
77 for(
unsigned iME(0); iME < mePaths.size(); iME++){
78 string&
path(mePaths[iME]);
79 if(path.find(
'%') != string::npos)
80 throw_(
"book() called with incompletely formed path [" + path +
"]");
109 if(isMap && yaxis.
nbins == 0){
123 if(yaxis.
high - yaxis.
low < 1.e-10){
128 if(zaxis.
high - zaxis.
low < 1.e-10){
134 size_t slashPos(path.find_last_of(
'/'));
135 string name(path.substr(slashPos + 1));
158 double* edges(
new double[xaxis.
nbins + 1]);
171 for(
int iSpec(0); iSpec < 2; iSpec++){
172 if(!specs[iSpec]->edges){
173 specs[iSpec]->
edges =
new float[specs[iSpec]->
nbins + 1];
175 double low(specs[iSpec]->low), high(specs[iSpec]->high);
176 for(
int i(0);
i < nbins + 1;
i++)
177 specs[iSpec]->edges[
i] = low + (high - low) / nbins *
i;
193 throw_(
"Variable bin size for 2D profile not implemented");
194 me = _ibooker.
bookProfile2D(
name,
name, xaxis.
nbins, xaxis.
low, xaxis.
high, yaxis.
nbins, yaxis.
low, yaxis.
high, zaxis.
low, zaxis.
high,
"");
203 throw_(
"ME could not be booked");
211 for(
int iBin(1); iBin <= xaxis.
nbins; ++iBin)
215 for(
int iBin(1); iBin <= yaxis.
nbins; ++iBin)
219 for(
int iBin(1); iBin <= zaxis.
nbins; ++iBin)
251 if(_failedPath) _failedPath->clear();
255 for(
unsigned iME(0); iME < mePaths.size(); iME++){
257 if(path.find(
'%') != std::string::npos)
258 throw_(
"retrieve() called with incompletely formed path [" + path +
"]");
261 if(me)
mes_.push_back(me);
264 if(_failedPath) *_failedPath =
path;
281 fill_(iME, _x, _wy, _w);
292 fill_(iME, _x, _wy, _w);
303 fill_(iME, _x, _wy, _w);
311 if(
mes_.size() != 1)
return;
313 fill_(0, _x, _wy, _w);
324 mes_[iME]->setBinContent(_bin, _content);
335 mes_[iME]->setBinContent(_bin, _content);
346 mes_[iME]->setBinContent(_bin, _content);
357 mes_[iME]->setBinError(_bin, _error);
368 mes_[iME]->setBinError(_bin, _error);
379 mes_[iME]->setBinError(_bin, _error);
391 mes_[iME]->setBinEntries(_bin, _entries);
403 mes_[iME]->setBinEntries(_bin, _entries);
415 mes_[iME]->setBinEntries(_bin, _entries);
426 return mes_[iME]->getBinContent(_bin);
437 return mes_[iME]->getBinContent(_bin);
448 return mes_[iME]->getBinContent(_bin);
459 return mes_[iME]->getBinError(_bin);
470 return mes_[iME]->getBinError(_bin);
481 return mes_[iME]->getBinError(_bin);
493 return mes_[iME]->getBinEntries(_bin);
505 return mes_[iME]->getBinEntries(_bin);
517 return mes_[iME]->getBinEntries(_bin);
528 return mes_[iME]->getTH1()->FindBin(_x, _y);
539 return mes_[iME]->getTH1()->FindBin(_x, _y);
550 return mes_[iME]->getTH1()->FindBin(_x, _y);
559 std::vector<std::string>
564 vector<string> paths(0);
568 for(
unsigned iME(0); iME < nME; iME++) {
572 map<string, string> replacements;
577 replacements[
"subdet"] =
"EcalBarrel";
578 replacements[
"prefix"] =
"EB";
579 replacements[
"suffix"] =
"";
580 replacements[
"subdetshort"] =
"EB";
581 replacements[
"subdetshortsig"] =
"EB";
582 replacements[
"supercrystal"] =
"trigger tower";
586 replacements[
"subdet"] =
"EcalEndcap";
587 replacements[
"prefix"] =
"EE";
588 replacements[
"subdetshort"] =
"EE";
589 replacements[
"subdetshortsig"] =
"EE";
590 replacements[
"supercrystal"] =
"super crystal";
593 replacements[
"subdet"] =
"EcalEndcap";
594 replacements[
"prefix"] =
"EE";
595 replacements[
"suffix"] =
" EE -";
596 replacements[
"subdetshort"] =
"EE";
597 replacements[
"subdetshortsig"] =
"EEM";
598 replacements[
"supercrystal"] =
"super crystal";
601 replacements[
"subdet"] =
"EcalEndcap";
602 replacements[
"prefix"] =
"EE";
603 replacements[
"suffix"] =
" EE +";
604 replacements[
"subdetshort"] =
"EE";
605 replacements[
"subdetshortsig"] =
"EEP";
606 replacements[
"supercrystal"] =
"super crystal";
609 if(iME <= kEEmHigh || iME >=
kEEpLow){
610 replacements[
"subdet"] =
"EcalEndcap";
611 replacements[
"prefix"] =
"EE";
612 replacements[
"supercrystal"] =
"super crystal";
615 replacements[
"subdet"] =
"EcalBarrel";
616 replacements[
"prefix"] =
"EB";
617 replacements[
"supercrystal"] =
"trigger tower";
622 replacements[
"subdet"] =
"EcalBarrel";
623 replacements[
"prefix"] =
"EB";
625 replacements[
"supercrystal"] =
"trigger tower";
628 replacements[
"subdet"] =
"EcalEndcap";
629 replacements[
"prefix"] =
"EE";
631 replacements[
"supercrystal"] =
"super crystal";
637 if(iDCC <= kEEmHigh || iDCC >=
kEEpLow){
638 replacements[
"subdet"] =
"EcalEndcap";
639 replacements[
"prefix"] =
"EE";
642 replacements[
"subdet"] =
"EcalBarrel";
643 replacements[
"prefix"] =
"EB";
650 unsigned iDCC(
memDCCId(iME + 4) - 1);
651 replacements[
"subdet"] =
"EcalBarrel";
652 replacements[
"prefix"] =
"EB";
658 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
659 replacements[
"subdet"] =
"EcalEndcap";
660 replacements[
"prefix"] =
"EE";
667 paths.push_back(
formPath(replacements));
MonitorElement::Kind kind_
double getBinError(DetId const &, int) const override
double getBinContent(DetId const &, int) const override
MESet & operator=(MESet const &) override
virtual void clear() const
MonitorElement * bookProfile(Args &&...args)
virtual void checkME_(unsigned _iME) const
MonitorElement * get(const std::string &path)
void fill(DetId const &, double=1., double=1., double=1.) override
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
MESet * clone(std::string const &="") const override
unsigned getNObjects(ObjectType)
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)
ObjectType getObject(ObjectType, unsigned)
AxisSpecs getBinning(ObjectType, BinningType, bool, int, unsigned)
std::vector< MonitorElement * > mes_
void setBinEntries(DetId const &, int, double) override
void setLumiFlag()
this ME is meant to be stored for each luminosity section
void throw_(std::string const &_message) const
bool isVariableBinning() const override
MonitorElement * bookProfile2D(Args &&...args)
MonitorElement * book1D(Args &&...args)
std::string channelName(uint32_t, BinningType _btype=kDCC)
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) const
unsigned memDCCId(unsigned)
double getBinEntries(DetId const &, int) const override
void setCurrentFolder(const std::string &fullpath)
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0, binning::AxisSpecs const *=0)
MonitorElement * book2D(Args &&...args)
unsigned findPlotIndex(ObjectType, DetId const &)
virtual int findBin(DetId const &, double, double=0.) const
binning::AxisSpecs const * zaxis_
bool retrieve(DQMStore::IGetter &, std::string *=0) const override
void setBinContent(DetId const &, int, double) override
binning::ObjectType otype_
binning::AxisSpecs const * xaxis_
std::vector< std::string > generatePaths() const
MonitorElement * bookFloat(Args &&...args)
virtual MESet & operator=(MESet const &)
void setBinError(DetId const &, int, double) override
binning::AxisSpecs const * yaxis_
binning::BinningType btype_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void book(DQMStore::IBooker &) override
unsigned logicalDimensions_