37 if(
path_.empty() ||
path_.find(
"/") == std::string::npos ||
39 throw_(_path +
" cannot be used for ME path name");
49 throw_(
"Unsupported MonitorElement kind");
86 if(_path !=
"")
path_ = _path;
104 unsigned nME(
mes_.size());
105 for(
unsigned iME(0); iME < nME; iME++)
122 unsigned nME(
mes_.size());
125 for(
unsigned iME(0); iME < nME; iME++)
131 if(_content != 0. || _err != 0. || _entries != 0.) simple =
false;
133 for(
unsigned iME(0); iME < nME; iME++){
134 TH1*
h(
mes_[iME]->getTH1());
138 int nbinsX(h->GetNbinsX());
139 int nbinsY(h->GetNbinsY());
141 for(
int ix(1); ix <= nbinsX; ix++){
142 for(
int iy(1); iy <= nbinsY; iy++){
143 int bin(h->GetBin(ix, iy));
144 h->SetBinContent(
bin, _content);
145 h->SetBinError(
bin, _err);
147 static_cast<TProfile*
>(
h)->SetBinEntries(
bin, _entries);
151 static_cast<TProfile2D*
>(
h)->SetBinEntries(
bin, _entries);
156 if(entries == 0.) entries = _entries;
157 h->SetEntries(_entries);
167 for(
typename MESet::PathReplacements::const_iterator repItr(_replacements.begin()); repItr != _replacements.end(); ++repItr){
169 pattern += repItr->first;
172 TPRegexp re(pattern);
174 re.Substitute(path, repItr->second,
"g");
183 if(!_statusManager)
return false;
185 if((_statusManager->
getStatus(_id.
rawId()) & _mask) != 0)
return true;
199 if((_statusManager->
getStatus(
ttId.rawId()) & _mask) != 0)
return true;
201 if(searchNeighborsInTower){
203 for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
204 if((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
return true;
212 for(
int ix(1); ix <= 5; ix++){
213 for(
int iy(1); iy <= 5; iy++){
214 int iix((scId.
ix() - 1) * 5 + ix);
215 int iiy((scId.
iy() - 1) * 5 + iy);
224 if((_statusManager->
getStatus(scId.rawId()) & _mask) != 0)
return true;
226 if(searchNeighborsInTower){
227 for(
int ix(1); ix <= 5; ix++){
228 for(
int iy(1); iy <= 5; iy++){
229 int iix((scId.ix() - 1) * 5 + ix);
230 int iiy((scId.iy() - 1) * 5 + iy);
232 if((_statusManager->
getStatus(
EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0)
return true;
243 for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
244 if((_statusManager->
getStatus(idItr->rawId()) & _mask) != 0)
return true;
262 for(
unsigned iME(0); iME <
mes_.size(); ++iME)
273 for(
unsigned iME(0); iME <
mes_.size(); ++iME)
287 int nbinsX(
h->GetNbinsX());
289 double x(
h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
294 double y(
h->GetYaxis()->GetBinCenter(_bin / (nbinsX + 2)));
309 int nbinsX(
h->GetNbinsX());
311 double x(
h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
326 me->
Fill(_x, _wy, _w);
337 if(
iME ==
unsigned(-1))
return;
343 throw cms::Exception(
"InvalidOperation") <<
"MESet::ConstBin::Ctor: const_iterator only available for MESet of 2D histograms";
351 iBin = me->getNbinsX() + 3;
380 if(iME ==
unsigned(-1))
return;
398 if(iME ==
unsigned(-1))
return *
this;
406 int nbinsX(me->getNbinsX());
411 me = meSet->getME(iME);
412 nbinsX = me->getNbinsX();
418 if(bin % (nbinsX + 2) == nbinsX + 1){
420 bin / (nbinsX + 2) == me->getNbinsY()){
422 me = meSet->getME(iME);
429 nbinsX = me->getNbinsX();
466 if(
bin_.
iBin / (me->getNbinsX() + 2) >= me->getNbinsY())
return false;
484 if(
bin_.
iBin / (me->getNbinsX() + 2) <= 1)
return false;
502 if(
bin_.
iBin % (me->getNbinsX() + 2) <= 1)
return false;
520 if(
bin_.
iBin % (me->getNbinsX() + 2) >= me->getNbinsX())
return false;
531 template<>
void delete_clone<ecaldqm::MESet>(
ecaldqm::MESet const* _s){ checked_delete(_s); }
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++()
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
virtual void clear() const
uint32_t getStatus(uint32_t) const
binning::ObjectType otype
virtual MESet * clone(std::string const &="") const
ObjectType getObject(ObjectType, unsigned)
virtual bool maskMatches(DetId const &, uint32_t, StatusManager const *) const
unsigned ttId(DetId const &)
uint32_t rawId() const
get the raw id
void disableSoftReset(MonitorElement *me)
std::vector< MonitorElement * > mes_
binning::ObjectType getObjType() const
void throw_(std::string const &_message) const
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
virtual void reset(double=0., double=0., double=0.)
EcalTrigTowerDetId tower() const
get the HCAL/trigger iphi of this crystal
void softReset(MonitorElement *me)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
ConstBin & operator=(ConstBin const &)
virtual void fill_(unsigned, int, double)
std::string formPath(PathReplacements const &) const
bin
set the eta bin as selection string.
bool isEcalScDetId(DetId const &)
MESet const * getMESet() const
int findBin2D(ObjectType, BinningType, DetId const &)
unsigned findPlotIndex(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.)
virtual void recoverStats()
void setMESet(MESet const &_meSet)
binning::ObjectType otype_
const_iterator & toNextChannel()
virtual MESet & operator=(MESet const &)
binning::BinningType btype_