14 unsigned _logicalDimensions,
18 :
MESet(_fullPath, _otype, _btype, _kind),
19 logicalDimensions_(_logicalDimensions),
20 xaxis_(_xaxis ? new
binning::AxisSpecs(*_xaxis) : nullptr),
21 yaxis_(_yaxis ? new
binning::AxisSpecs(*_yaxis) : nullptr),
22 zaxis_(_zaxis ? new
binning::AxisSpecs(*_zaxis) : nullptr) {
24 throw_(
"Need axis specifications");
29 logicalDimensions_(_orig.logicalDimensions_),
30 xaxis_(_orig.xaxis_ ? new
binning::AxisSpecs(*_orig.xaxis_) : nullptr),
31 yaxis_(_orig.yaxis_ ? new
binning::AxisSpecs(*_orig.yaxis_) : nullptr),
32 zaxis_(_orig.zaxis_ ? new
binning::AxisSpecs(*_orig.zaxis_) : nullptr) {}
48 MESetEcal const *pRhs(dynamic_cast<MESetEcal const *>(&_rhs));
73 auto oldscope = MonitorElementData::Scope::RUN;
75 oldscope = _ibooker.
setScope(MonitorElementData::Scope::LUMI);
81 for (
unsigned iME(0); iME < mePaths.size(); iME++) {
82 string &
path(mePaths[iME]);
83 if (
path.find(
'%') != string::npos)
84 throw_(
"book() called with incompletely formed path [" +
path +
"]");
101 if (
xaxis.nbins == 0) {
107 delete[]
xaxis.labels;
114 if (isMap &&
yaxis.nbins == 0) {
120 delete[]
yaxis.labels;
138 size_t slashPos(
path.find_last_of(
'/'));
139 string name(
path.substr(slashPos + 1));
174 for (
int iSpec(0); iSpec < 2; iSpec++) {
176 specs[iSpec]->edges =
new float[
specs[iSpec]->nbins + 1];
195 throw_(
"Variable bin size for 2D profile not implemented");
215 throw_(
"ME could not be booked");
218 me->setAxisTitle(
xaxis.title, 1);
219 me->setAxisTitle(
yaxis.title, 2);
221 me->setAxisTitle(
zaxis.title, 3);
224 for (
int iBin(1); iBin <=
xaxis.nbins; ++iBin)
225 me->setBinLabel(iBin,
xaxis.labels[iBin - 1], 1);
228 for (
int iBin(1); iBin <=
yaxis.nbins; ++iBin)
229 me->setBinLabel(iBin,
yaxis.labels[iBin - 1], 2);
232 for (
int iBin(1); iBin <=
zaxis.nbins; ++iBin)
233 me->setBinLabel(iBin,
zaxis.labels[iBin - 1], 3);
268 me->getTH1()->SetUniqueID(uint32_t(2 * (actualObject + 1) + (isMap ? 1 : 0)));
285 std::vector<std::string> mePaths(
generatePaths(electronicsMap));
286 if (mePaths.empty()) {
288 _failedPath->clear();
292 for (
unsigned iME(0); iME < mePaths.size(); iME++) {
294 if (
path.find(
'%') != std::string::npos)
295 throw_(
"retrieve() called with incompletely formed path [" +
path +
"]");
323 fill_(iME, _x, _wy, _w);
337 fill_(iME, _x, _wy, _w);
348 fill_(iME, _x, _wy, _w);
355 if (
mes_.size() != 1)
358 fill_(0, _x, _wy, _w);
401 mes_[iME]->setBinError(_bin, _error);
411 mes_[iME]->setBinError(_bin, _error);
421 mes_[iME]->setBinError(_bin, _error);
433 mes_[iME]->setBinEntries(_bin, _entries);
448 mes_[iME]->setBinEntries(_bin, _entries);
460 mes_[iME]->setBinEntries(_bin, _entries);
470 return mes_[iME]->getBinContent(_bin);
480 return mes_[iME]->getBinContent(_bin);
490 return mes_[iME]->getBinContent(_bin);
500 return mes_[iME]->getBinError(_bin);
510 return mes_[iME]->getBinError(_bin);
520 return mes_[iME]->getBinError(_bin);
532 return mes_[iME]->getBinEntries(_bin);
544 return mes_[iME]->getBinEntries(_bin);
556 return mes_[iME]->getBinEntries(_bin);
566 return mes_[iME]->getTH1()->FindBin(_x, _y);
579 return mes_[iME]->getTH1()->FindBin(_x, _y);
589 return mes_[iME]->getTH1()->FindBin(_x, _y);
599 vector<string>
paths(0);
603 for (
unsigned iME(0); iME < nME; iME++) {
607 map<string, string> replacements;
612 replacements[
"subdet"] =
"EcalBarrel";
613 replacements[
"prefix"] =
"EB";
614 replacements[
"suffix"] =
"";
615 replacements[
"subdetshort"] =
"EB";
616 replacements[
"subdetshortsig"] =
"EB";
617 replacements[
"supercrystal"] =
"trigger tower";
621 replacements[
"subdet"] =
"EcalEndcap";
622 replacements[
"prefix"] =
"EE";
623 replacements[
"subdetshort"] =
"EE";
624 replacements[
"subdetshortsig"] =
"EE";
625 replacements[
"supercrystal"] =
"super crystal";
628 replacements[
"subdet"] =
"EcalEndcap";
629 replacements[
"prefix"] =
"EE";
630 replacements[
"suffix"] =
" EE -";
631 replacements[
"subdetshort"] =
"EE";
632 replacements[
"subdetshortsig"] =
"EEM";
633 replacements[
"supercrystal"] =
"super crystal";
636 replacements[
"subdet"] =
"EcalEndcap";
637 replacements[
"prefix"] =
"EE";
638 replacements[
"suffix"] =
" EE +";
639 replacements[
"subdetshort"] =
"EE";
640 replacements[
"subdetshortsig"] =
"EEP";
641 replacements[
"supercrystal"] =
"super crystal";
644 if (iME <= kEEmHigh || iME >=
kEEpLow) {
645 replacements[
"subdet"] =
"EcalEndcap";
646 replacements[
"prefix"] =
"EE";
647 replacements[
"supercrystal"] =
"super crystal";
649 replacements[
"subdet"] =
"EcalBarrel";
650 replacements[
"prefix"] =
"EB";
651 replacements[
"supercrystal"] =
"trigger tower";
656 replacements[
"subdet"] =
"EcalBarrel";
657 replacements[
"prefix"] =
"EB";
659 replacements[
"supercrystal"] =
"trigger tower";
662 replacements[
"subdet"] =
"EcalEndcap";
663 replacements[
"prefix"] =
"EE";
665 replacements[
"supercrystal"] =
"super crystal";
670 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow) {
671 replacements[
"subdet"] =
"EcalEndcap";
672 replacements[
"prefix"] =
"EE";
674 replacements[
"subdet"] =
"EcalBarrel";
675 replacements[
"prefix"] =
"EB";
680 unsigned iDCC(
memDCCId(iME + 4) - 1);
681 replacements[
"subdet"] =
"EcalBarrel";
682 replacements[
"prefix"] =
"EB";
686 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
687 replacements[
"subdet"] =
"EcalEndcap";
688 replacements[
"prefix"] =
"EE";
MonitorElement::Kind kind_
double getBinEntries(EcalDQMSetupObjects const, DetId const &, int) const override
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
MESet & operator=(MESet const &) override
virtual void setCurrentFolder(std::string const &fullpath)
void setBinEntries(EcalDQMSetupObjects const, DetId const &, int, double) override
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
unsigned getNObjects(ObjectType)
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
void throw_(std::string const &_message) const
ObjectType getObject(ObjectType, unsigned)
MESet * clone(std::string const &="") const override
void fill(EcalDQMSetupObjects const, DetId const &, double=1., double=1., double=1.) override
MESetEcal(std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind, unsigned, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr, binning::AxisSpecs const *=nullptr)
std::vector< std::string > generatePaths(EcalElectronicsMapping const *) const
bool isVariableBinning() const override
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
double getBinError(EcalDQMSetupObjects const, DetId const &, int) const override
EcalElectronicsMapping const * electronicsMap
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
virtual void checkME_(unsigned _iME) const
virtual void fill_(unsigned, int, double)
virtual int findBin(EcalDQMSetupObjects const, DetId const &, double, double=0.) const
unsigned memDCCId(unsigned)
double getBinContent(EcalDQMSetupObjects const, DetId const &, int) const override
void setBinError(EcalDQMSetupObjects const, DetId const &, int, double) override
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
void setBinContent(EcalDQMSetupObjects const, DetId const &, int, double) override
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
bool retrieve(EcalElectronicsMapping const *, DQMStore::IGetter &, std::string *=nullptr) const override
binning::AxisSpecs const * zaxis_
virtual MonitorElement * get(std::string const &fullpath) const
AxisSpecs getBinning(EcalElectronicsMapping const *, ObjectType, BinningType, bool, int, unsigned)
binning::ObjectType otype_
std::string channelName(EcalElectronicsMapping const *, uint32_t, BinningType _btype=kDCC)
binning::AxisSpecs const * xaxis_
virtual MESet & operator=(MESet const &)
binning::AxisSpecs const * yaxis_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
binning::BinningType btype_
virtual void clear() const
std::vector< MonitorElement * > mes_
std::string formPath(PathReplacements const &) const
unsigned logicalDimensions_