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) {
103 if (!
xaxis.labels.empty() || !
xaxis.title.empty()) {
113 if (isMap &&
yaxis.nbins == 0) {
115 if (!
yaxis.labels.empty() || !
yaxis.title.empty()) {
136 size_t slashPos(
path.find_last_of(
'/'));
137 string name(
path.substr(slashPos + 1));
150 if (
xaxis.edges.empty())
158 if (
xaxis.edges.empty()) {
171 if (
xaxis.edges.empty() &&
yaxis.edges.empty()) {
175 for (
int iSpec(0); iSpec < 2; iSpec++) {
177 specs[iSpec]->edges = std::vector<float>(
specs[iSpec]->nbins + 1);
190 if (!
zaxis.edges.empty()) {
194 if (!(
xaxis.edges.empty() &&
yaxis.edges.empty()))
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);
223 if (!
xaxis.labels.empty()) {
224 for (
int iBin(1); iBin <=
xaxis.nbins; ++iBin)
225 me->setBinLabel(iBin,
xaxis.labels[iBin - 1], 1);
227 if (!
yaxis.labels.empty()) {
228 for (
int iBin(1); iBin <=
yaxis.nbins; ++iBin)
229 me->setBinLabel(iBin,
yaxis.labels[iBin - 1], 2);
231 if (!
zaxis.labels.empty()) {
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);
600 vector<string>
paths(0);
604 for (
unsigned iME(0); iME < nME; iME++) {
608 map<string, string> replacements;
613 replacements[
"subdet"] =
"EcalBarrel";
614 replacements[
"prefix"] =
"EB";
615 replacements[
"suffix"] =
"";
616 replacements[
"subdetshort"] =
"EB";
617 replacements[
"subdetshortsig"] =
"EB";
618 replacements[
"supercrystal"] =
"trigger tower";
622 replacements[
"subdet"] =
"EcalEndcap";
623 replacements[
"prefix"] =
"EE";
624 replacements[
"subdetshort"] =
"EE";
625 replacements[
"subdetshortsig"] =
"EE";
626 replacements[
"supercrystal"] =
"super crystal";
629 replacements[
"subdet"] =
"EcalEndcap";
630 replacements[
"prefix"] =
"EE";
631 replacements[
"suffix"] =
" EE -";
632 replacements[
"subdetshort"] =
"EE";
633 replacements[
"subdetshortsig"] =
"EEM";
634 replacements[
"supercrystal"] =
"super crystal";
637 replacements[
"subdet"] =
"EcalEndcap";
638 replacements[
"prefix"] =
"EE";
639 replacements[
"suffix"] =
" EE +";
640 replacements[
"subdetshort"] =
"EE";
641 replacements[
"subdetshortsig"] =
"EEP";
642 replacements[
"supercrystal"] =
"super crystal";
645 if (iME <= kEEmHigh || iME >=
kEEpLow) {
646 replacements[
"subdet"] =
"EcalEndcap";
647 replacements[
"prefix"] =
"EE";
648 replacements[
"supercrystal"] =
"super crystal";
650 replacements[
"subdet"] =
"EcalBarrel";
651 replacements[
"prefix"] =
"EB";
652 replacements[
"supercrystal"] =
"trigger tower";
657 replacements[
"subdet"] =
"EcalBarrel";
658 replacements[
"prefix"] =
"EB";
660 replacements[
"supercrystal"] =
"trigger tower";
663 replacements[
"subdet"] =
"EcalEndcap";
664 replacements[
"prefix"] =
"EE";
666 replacements[
"supercrystal"] =
"super crystal";
671 if (iDCC <= kEEmHigh || iDCC >=
kEEpLow) {
672 replacements[
"subdet"] =
"EcalEndcap";
673 replacements[
"prefix"] =
"EE";
675 replacements[
"subdet"] =
"EcalBarrel";
676 replacements[
"prefix"] =
"EB";
681 unsigned iDCC(
memDCCId(iME + 4) - 1);
682 replacements[
"subdet"] =
"EcalBarrel";
683 replacements[
"prefix"] =
"EB";
687 unsigned iDCC(
memDCCId(iME < 4 ? iME : iME + 36) - 1);
688 replacements[
"subdet"] =
"EcalEndcap";
689 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
std::vector< float > edges
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_