14 unsigned _logicalDimensions,
18 :
MESet(_fullPath, _otype, _btype, _kind),
19 logicalDimensions_(_logicalDimensions),
24 throw_(
"Need axis specifications");
48 MESetEcal const *pRhs(dynamic_cast<MESetEcal const *>(&_rhs));
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 +
"]");
97 if (xaxis.
nbins == 0) {
110 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]);
170 for (
int iSpec(0); iSpec < 2; iSpec++) {
171 if (!specs[iSpec]->edges) {
172 specs[iSpec]->
edges =
new float[specs[iSpec]->
nbins + 1];
174 double low(specs[iSpec]->low), high(specs[iSpec]->high);
175 for (
int i(0);
i < nbins + 1;
i++)
176 specs[iSpec]->edges[
i] = low + (high - low) / nbins *
i;
191 throw_(
"Variable bin size for 2D profile not implemented");
211 throw_(
"ME could not be booked");
220 for (
int iBin(1); iBin <= xaxis.
nbins; ++iBin)
224 for (
int iBin(1); iBin <= yaxis.
nbins; ++iBin)
228 for (
int iBin(1); iBin <= zaxis.
nbins; ++iBin)
264 me->
getTH1()->SetUniqueID(uint32_t(2 * (actualObject + 1) + (isMap ? 1 : 0)));
280 if (mePaths.empty()) {
282 _failedPath->clear();
286 for (
unsigned iME(0); iME < mePaths.size(); iME++) {
288 if (path.find(
'%') != std::string::npos)
289 throw_(
"retrieve() called with incompletely formed path [" + path +
"]");
313 fill_(iME, _x, _wy, _w);
323 fill_(iME, _x, _wy, _w);
333 fill_(iME, _x, _wy, _w);
340 if (
mes_.size() != 1)
343 fill_(0, _x, _wy, _w);
353 mes_[iME]->setBinContent(_bin, _content);
363 mes_[iME]->setBinContent(_bin, _content);
373 mes_[iME]->setBinContent(_bin, _content);
383 mes_[iME]->setBinError(_bin, _error);
393 mes_[iME]->setBinError(_bin, _error);
403 mes_[iME]->setBinError(_bin, _error);
415 mes_[iME]->setBinEntries(_bin, _entries);
427 mes_[iME]->setBinEntries(_bin, _entries);
439 mes_[iME]->setBinEntries(_bin, _entries);
449 return mes_[iME]->getBinContent(_bin);
459 return mes_[iME]->getBinContent(_bin);
469 return mes_[iME]->getBinContent(_bin);
479 return mes_[iME]->getBinError(_bin);
489 return mes_[iME]->getBinError(_bin);
499 return mes_[iME]->getBinError(_bin);
511 return mes_[iME]->getBinEntries(_bin);
523 return mes_[iME]->getBinEntries(_bin);
535 return mes_[iME]->getBinEntries(_bin);
545 return mes_[iME]->getTH1()->FindBin(_x, _y);
555 return mes_[iME]->getTH1()->FindBin(_x, _y);
565 return mes_[iME]->getTH1()->FindBin(_x, _y);
575 vector<string> paths(0);
579 for (
unsigned iME(0); iME < nME; iME++) {
583 map<string, string> replacements;
588 replacements[
"subdet"] =
"EcalBarrel";
589 replacements[
"prefix"] =
"EB";
590 replacements[
"suffix"] =
"";
591 replacements[
"subdetshort"] =
"EB";
592 replacements[
"subdetshortsig"] =
"EB";
593 replacements[
"supercrystal"] =
"trigger tower";
597 replacements[
"subdet"] =
"EcalEndcap";
598 replacements[
"prefix"] =
"EE";
599 replacements[
"subdetshort"] =
"EE";
600 replacements[
"subdetshortsig"] =
"EE";
601 replacements[
"supercrystal"] =
"super crystal";
604 replacements[
"subdet"] =
"EcalEndcap";
605 replacements[
"prefix"] =
"EE";
606 replacements[
"suffix"] =
" EE -";
607 replacements[
"subdetshort"] =
"EE";
608 replacements[
"subdetshortsig"] =
"EEM";
609 replacements[
"supercrystal"] =
"super crystal";
612 replacements[
"subdet"] =
"EcalEndcap";
613 replacements[
"prefix"] =
"EE";
614 replacements[
"suffix"] =
" EE +";
615 replacements[
"subdetshort"] =
"EE";
616 replacements[
"subdetshortsig"] =
"EEP";
617 replacements[
"supercrystal"] =
"super crystal";
620 if (iME <= kEEmHigh || iME >=
kEEpLow) {
621 replacements[
"subdet"] =
"EcalEndcap";
622 replacements[
"prefix"] =
"EE";
623 replacements[
"supercrystal"] =
"super crystal";
625 replacements[
"subdet"] =
"EcalBarrel";
626 replacements[
"prefix"] =
"EB";
627 replacements[
"supercrystal"] =
"trigger tower";
632 replacements[
"subdet"] =
"EcalBarrel";
633 replacements[
"prefix"] =
"EB";
635 replacements[
"supercrystal"] =
"trigger tower";
638 replacements[
"subdet"] =
"EcalEndcap";
639 replacements[
"prefix"] =
"EE";
641 replacements[
"supercrystal"] =
"super crystal";
646 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow) {
647 replacements[
"subdet"] =
"EcalEndcap";
648 replacements[
"prefix"] =
"EE";
650 replacements[
"subdet"] =
"EcalBarrel";
651 replacements[
"prefix"] =
"EB";
656 unsigned iDCC(
memDCCId(iME + 4) - 1);
657 replacements[
"subdet"] =
"EcalBarrel";
658 replacements[
"prefix"] =
"EB";
662 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
663 replacements[
"subdet"] =
"EcalEndcap";
664 replacements[
"prefix"] =
"EE";
671 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
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)
void setBinEntries(DetId const &, int, double) override
void setLumiFlag()
this ME is meant to be stored for each luminosity section
void setCurrentFolder(std::string const &fullpath)
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)
MonitorElement * get(std::string const &path)
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) const
unsigned memDCCId(unsigned)
double getBinEntries(DetId const &, int) const override
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)
std::vector< MonitorElement * > mes_
void book(DQMStore::IBooker &) override
unsigned logicalDimensions_