36 if (
path_.empty() ||
path_.find(
'/') == std::string::npos ||
38 throw_(_path +
" cannot be used for ME path name");
48 throw_(
"Unsupported MonitorElement kind");
58 lumiFlag_(_orig.lumiFlag_),
59 batchMode_(_orig.batchMode_),
60 active_(_orig.active_) {}
93 unsigned nME(
mes_.size());
94 for (
unsigned iME(0); iME < nME; iME++)
112 unsigned nME(
mes_.size());
115 for (
unsigned iME(0); iME < nME; iME++)
121 if (_content != 0. || _err != 0. || _entries != 0.)
124 for (
unsigned iME(0); iME < nME; iME++) {
125 TH1 *
h(
mes_[iME]->getTH1());
130 int nbinsX(h->GetNbinsX());
131 int nbinsY(h->GetNbinsY());
133 for (
int ix(1); ix <= nbinsX; ix++) {
134 for (
int iy(1); iy <= nbinsY; iy++) {
135 int bin(h->GetBin(ix, iy));
136 h->SetBinContent(
bin, _content);
137 h->SetBinError(
bin, _err);
139 static_cast<TProfile *
>(
h)->SetBinEntries(
bin, _entries);
142 static_cast<TProfile2D *
>(
h)->SetBinEntries(
bin, _entries);
149 h->SetEntries(_entries);
156 for (
typename MESet::PathReplacements::const_iterator repItr(_replacements.begin()); repItr != _replacements.end();
158 TString pattern(
"\\%\\(");
159 pattern += repItr->first;
162 TPRegexp re(pattern);
164 re.Substitute(path, repItr->second,
"g");
195 if (searchNeighborsInTower) {
197 for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
198 if ((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
206 for (
int ix(1); ix <= 5; ix++) {
207 for (
int iy(1); iy <= 5; iy++) {
208 int iix((scId.
ix() - 1) * 5 + ix);
209 int iiy((scId.
iy() - 1) * 5 + iy);
219 if ((_statusManager->
getStatus(scId.rawId()) & _mask) != 0)
222 if (searchNeighborsInTower) {
223 for (
int ix(1); ix <= 5; ix++) {
224 for (
int iy(1); iy <= 5; iy++) {
225 int iix((scId.ix() - 1) * 5 + ix);
226 int iiy((scId.iy() - 1) * 5 + iy);
229 if ((_statusManager->
getStatus(
EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0)
240 for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
241 if ((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
262 int nbinsX(
h->GetNbinsX());
264 double x(
h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
269 double y(
h->GetYaxis()->GetBinCenter(_bin / (nbinsX + 2)));
284 int nbinsX(
h->GetNbinsX());
286 double x(
h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
300 me->
Fill(_x, _wy, _w);
305 if (
iME ==
unsigned(-1))
314 throw cms::Exception(
"InvalidOperation") <<
"MESet::ConstBin::Ctor: const_iterator only available for MESet of "
321 <<
"MESet::ConstBin::Ctor: ME " <<
iME <<
" does not exist for MESet " <<
meSet_->
getPath();
324 iBin =
me->getNbinsX() + 3;
333 <<
" to otype " << meSet_->getObjType() <<
" and btype " << meSet_->getBinType() <<
" ("
334 << _rhs.
meSet_->
getPath() <<
" to " << meSet_->getPath() <<
")";
349 if (iME ==
unsigned(-1))
364 unsigned &iME(bin_.iME);
365 MESet const *meSet(bin_.getMESet());
367 if (iME ==
unsigned(-1))
376 int nbinsX(
me->getNbinsX());
381 me = meSet->getME(iME);
382 nbinsX =
me->getNbinsX();
388 if (bin % (nbinsX + 2) == nbinsX + 1) {
390 bin / (nbinsX + 2) ==
me->getNbinsY()) {
392 me = meSet->getME(iME);
398 nbinsX =
me->getNbinsX();
414 if (!bin_.getMESet())
418 while (bin_.iME !=
unsigned(-1) && !bin_.isChannel(electronicsMap));
424 MESet const *meSet(bin_.getMESet());
425 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
434 if (bin_.iBin / (
me->getNbinsX() + 2) >=
me->getNbinsY())
437 bin_.iBin +=
me->getNbinsX() + 2;
443 MESet const *meSet(bin_.getMESet());
444 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
453 if (bin_.iBin / (
me->getNbinsX() + 2) <= 1)
456 bin_.iBin -=
me->getNbinsX() + 2;
462 MESet const *meSet(bin_.getMESet());
463 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
472 if (bin_.iBin % (
me->getNbinsX() + 2) <= 1)
481 MESet const *meSet(bin_.getMESet());
482 if (bin_.iME ==
unsigned(-1) || bin_.iBin < 1)
491 if (bin_.iBin % (
me->getNbinsX() + 2) >=
me->getNbinsX())
virtual std::string const & getPath() const
MonitorElement::Kind kind_
virtual MonitorElement const * getME(unsigned _iME) const
MonitorElement::Kind getKind() const
virtual void setAxisTitle(std::string const &, int=1)
const_iterator & operator++()
virtual void clear() const
uint32_t getStatus(uint32_t) const
binning::ObjectType otype
constexpr uint32_t rawId() const
get the raw id
virtual MESet * clone(std::string const &="") const
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *, EcalTrigTowerConstituentsMap const *) const
static constexpr TimeType INVALID
ObjectType getObject(ObjectType, unsigned)
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
binning::ObjectType getObjType() const
void throw_(std::string const &_message) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int findBin2D(EcalElectronicsMapping const *, ObjectType, BinningType, DetId const &)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
ConstBin & operator=(ConstBin const &)
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) const
bool isEcalScDetId(DetId const &)
unsigned findPlotIndex(EcalElectronicsMapping const *, ObjectType, DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
binning::BinningType getBinType() const
virtual void resetAll(double=0., double=0., double=0.)
const_iterator & toNextChannel(EcalElectronicsMapping const *)
void setMESet(MESet const &_meSet)
binning::ObjectType otype_
virtual MESet & operator=(MESet const &)
binning::BinningType btype_
virtual void reset(EcalElectronicsMapping const *, double=0., double=0., double=0.)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
virtual TH1 * getTH1() const
std::vector< MonitorElement * > mes_