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) {
114 if (isMap && yaxis.
nbins == 0) {
127 if (yaxis.
high - yaxis.
low < 1.e-10) {
132 if (zaxis.
high - zaxis.
low < 1.e-10) {
138 size_t slashPos(path.find_last_of(
'/'));
139 string name(path.substr(slashPos + 1));
162 double *edges(
new double[xaxis.
nbins + 1]);
174 for (
int iSpec(0); iSpec < 2; iSpec++) {
175 if (!specs[iSpec]->edges) {
176 specs[iSpec]->
edges =
new float[specs[iSpec]->
nbins + 1];
178 double low(specs[iSpec]->low), high(specs[iSpec]->high);
179 for (
int i(0);
i < nbins + 1;
i++)
180 specs[iSpec]->edges[
i] = low + (high - low) / nbins *
i;
195 throw_(
"Variable bin size for 2D profile not implemented");
215 throw_(
"ME could not be booked");
224 for (
int iBin(1); iBin <= xaxis.
nbins; ++iBin)
228 for (
int iBin(1); iBin <= yaxis.
nbins; ++iBin)
232 for (
int iBin(1); iBin <= zaxis.
nbins; ++iBin)
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);
368 mes_[iME]->setBinContent(_bin, _content);
381 mes_[iME]->setBinContent(_bin, _content);
391 mes_[iME]->setBinContent(_bin, _content);
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";
695 paths.push_back(
formPath(replacements));
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)
virtual void clear() const
void setBinEntries(EcalDQMSetupObjects const, DetId const &, int, double) 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 [...
unsigned getNObjects(ObjectType)
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
std::vector< std::string > generatePaths(EcalElectronicsMapping const *) 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)
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())
void throw_(std::string const &_message) const
virtual MonitorElement * get(std::string const &fullpath) const
double getBinError(EcalDQMSetupObjects const, DetId const &, int) const override
virtual 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)
EcalElectronicsMapping const * electronicsMap
void book(DQMStore::IBooker &, EcalElectronicsMapping const *) override
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) 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 int findBin(EcalDQMSetupObjects const, DetId const &, double, double=0.) 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 TH1 * getTH1() const
std::vector< MonitorElement * > mes_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
unsigned logicalDimensions_