CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
ecaldqm::MESet Class Reference

#include <MESet.h>

Inheritance diagram for ecaldqm::MESet:
ecaldqm::MESetEcal ecaldqm::MESetMulti ecaldqm::MESetNonObject ecaldqm::MESetDet0D ecaldqm::MESetDet1D ecaldqm::MESetDet2D ecaldqm::MESetProjection ecaldqm::MESetTrend

Classes

struct  Bin
 
struct  const_iterator
 
struct  ConstBin
 
struct  iterator
 

Public Types

typedef std::map< std::string, std::string > PathReplacements
 

Public Member Functions

virtual const_iterator begin () const
 
virtual iterator begin ()
 
virtual const_iterator beginChannel () const
 
virtual iterator beginChannel ()
 
virtual void book (DQMStore::IBooker &)
 
virtual void clear () const
 
virtual MESetclone (std::string const &="") const
 
virtual const_iterator end () const
 
virtual iterator end ()
 
virtual void fill (DetId const &, double=1., double=1., double=1.)
 
virtual void fill (EcalElectronicsId const &, double=1., double=1., double=1.)
 
virtual void fill (int, double=1., double=1., double=1.)
 
virtual void fill (double, double=1., double=1.)
 
std::string formPath (PathReplacements const &) const
 
bool getBatchMode () const
 
virtual double getBinContent (DetId const &, int=0) const
 
virtual double getBinContent (EcalElectronicsId const &, int=0) const
 
virtual double getBinContent (int, int=0) const
 
virtual double getBinEntries (DetId const &, int=0) const
 
virtual double getBinEntries (EcalElectronicsId const &, int=0) const
 
virtual double getBinEntries (int, int=0) const
 
virtual double getBinError (DetId const &, int=0) const
 
virtual double getBinError (EcalElectronicsId const &, int=0) const
 
virtual double getBinError (int, int=0) const
 
binning::BinningType getBinType () const
 
MonitorElement::Kind getKind () const
 
bool getLumiFlag () const
 
virtual MonitorElement const * getME (unsigned _iME) const
 
virtual MonitorElementgetME (unsigned _iME)
 
binning::ObjectType getObjType () const
 
virtual std::string const & getPath () const
 
bool isActive () const
 
virtual bool isVariableBinning () const
 
virtual bool maskMatches (DetId const &, uint32_t, StatusManager const *) const
 
 MESet ()
 
 MESet (std::string const &, binning::ObjectType, binning::BinningType, MonitorElement::Kind)
 
 MESet (MESet const &)
 
virtual MESetoperator= (MESet const &)
 
virtual void recoverStats ()
 
virtual void reset (double=0., double=0., double=0.)
 
virtual void resetAll (double=0., double=0., double=0.)
 
virtual bool retrieve (DQMStore::IGetter &, std::string *=0) const
 
virtual void setAxisTitle (std::string const &, int=1)
 
void setBatchMode ()
 
virtual void setBinContent (DetId const &, double)
 
virtual void setBinContent (EcalElectronicsId const &, double)
 
virtual void setBinContent (int, double)
 
virtual void setBinContent (DetId const &, int, double)
 
virtual void setBinContent (EcalElectronicsId const &, int, double)
 
virtual void setBinContent (int, int, double)
 
virtual void setBinEntries (DetId const &, double)
 
virtual void setBinEntries (EcalElectronicsId const &, double)
 
virtual void setBinEntries (int, double)
 
virtual void setBinEntries (DetId const &, int, double)
 
virtual void setBinEntries (EcalElectronicsId const &, int, double)
 
virtual void setBinEntries (int, int, double)
 
virtual void setBinError (DetId const &, double)
 
virtual void setBinError (EcalElectronicsId const &, double)
 
virtual void setBinError (int, double)
 
virtual void setBinError (DetId const &, int, double)
 
virtual void setBinError (EcalElectronicsId const &, int, double)
 
virtual void setBinError (int, int, double)
 
void setLumiFlag ()
 
virtual void softReset ()
 
virtual ~MESet ()
 

Protected Member Functions

virtual void checkME_ (unsigned _iME) const
 
virtual void fill_ (unsigned, int, double)
 
virtual void fill_ (unsigned, int, double, double)
 
virtual void fill_ (unsigned, double, double, double)
 
void throw_ (std::string const &_message) const
 

Protected Attributes

bool active_
 
bool batchMode_
 
binning::BinningType btype_
 
MonitorElement::Kind kind_
 
bool lumiFlag_
 
std::vector< MonitorElement * > mes_
 
binning::ObjectType otype_
 
std::string path_
 

Detailed Description

Definition at line 28 of file MESet.h.

Member Typedef Documentation

typedef std::map<std::string, std::string> ecaldqm::MESet::PathReplacements

Definition at line 30 of file MESet.h.

Constructor & Destructor Documentation

ecaldqm::MESet::MESet ( )

Definition at line 14 of file MESet.cc.

Referenced by clone().

15  : mes_(0),
16  path_(""),
20  lumiFlag_(false),
21  batchMode_(false),
22  active_(false) {}
MonitorElement::Kind kind_
Definition: MESet.h:129
bool batchMode_
Definition: MESet.h:132
bool lumiFlag_
Definition: MESet.h:130
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
std::string path_
Definition: MESet.h:126
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
ecaldqm::MESet::MESet ( std::string const &  _path,
binning::ObjectType  _otype,
binning::BinningType  _btype,
MonitorElement::Kind  _kind 
)

Definition at line 24 of file MESet.cc.

References MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::binning::kChannel, kind_, otype_, path_, and throw_().

28  : mes_(0),
29  path_(_path),
30  otype_(_otype),
31  btype_(_btype),
32  kind_(_kind),
33  lumiFlag_(false),
34  batchMode_(false),
35  active_(false) {
36  if (path_.empty() || path_.find("/") == std::string::npos ||
37  (otype_ != binning::kChannel && path_.find("/") == path_.size() - 1))
38  throw_(_path + " cannot be used for ME path name");
39 
40  switch (kind_) {
46  break;
47  default:
48  throw_("Unsupported MonitorElement kind");
49  }
50  }
MonitorElement::Kind kind_
Definition: MESet.h:129
bool batchMode_
Definition: MESet.h:132
void throw_(std::string const &_message) const
Definition: MESet.h:122
bool lumiFlag_
Definition: MESet.h:130
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
std::string path_
Definition: MESet.h:126
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
ecaldqm::MESet::MESet ( MESet const &  _orig)

Definition at line 52 of file MESet.cc.

53  : mes_(_orig.mes_),
54  path_(_orig.path_),
55  otype_(_orig.otype_),
56  btype_(_orig.btype_),
57  kind_(_orig.kind_),
58  lumiFlag_(_orig.lumiFlag_),
59  batchMode_(_orig.batchMode_),
60  active_(_orig.active_) {}
MonitorElement::Kind kind_
Definition: MESet.h:129
bool batchMode_
Definition: MESet.h:132
bool lumiFlag_
Definition: MESet.h:130
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
std::string path_
Definition: MESet.h:126
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
ecaldqm::MESet::~MESet ( )
virtual

Definition at line 62 of file MESet.cc.

62 {}

Member Function Documentation

virtual const_iterator ecaldqm::MESet::begin ( void  ) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 320 of file MESet.h.

320 { return const_iterator(*this); }
virtual iterator ecaldqm::MESet::begin ( void  )
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 329 of file MESet.h.

329 { return iterator(*this); }
virtual const_iterator ecaldqm::MESet::beginChannel ( ) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 324 of file MESet.h.

References ecaldqm::MESet::const_iterator::toNextChannel().

Referenced by ecaldqm::MESetMulti::beginChannel(), and ecaldqm::DQWorkerClient::towerAverage_().

324  {
325  const_iterator itr(*this, 0, 0);
326  return itr.toNextChannel();
327  }
virtual iterator ecaldqm::MESet::beginChannel ( )
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 333 of file MESet.h.

References ecaldqm::MESet::iterator::toNextChannel().

333  {
334  iterator itr(*this, 0, 0);
335  itr.toNextChannel();
336  return itr;
337  }
virtual void ecaldqm::MESet::book ( DQMStore::IBooker )
inlinevirtual
virtual void ecaldqm::MESet::checkME_ ( unsigned  _iME) const
inlineprotectedvirtual

Definition at line 114 of file MESet.h.

References getME(), and throw_().

Referenced by ecaldqm::MESetDet0D::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetDet1D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetProjection::getBinEntries(), ecaldqm::MESetDet2D::getBinEntries(), ecaldqm::MESetDet1D::getBinEntries(), ecaldqm::MESetEcal::getBinEntries(), ecaldqm::MESetProjection::getBinError(), ecaldqm::MESetDet2D::getBinError(), ecaldqm::MESetDet1D::getBinError(), ecaldqm::MESetEcal::getBinError(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), and ecaldqm::MESetEcal::setBinError().

114  {
115  if (!getME(_iME)) {
116  std::stringstream ss;
117  ss << "ME does not exist at index " << _iME;
118  throw_(ss.str());
119  }
120  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:97
void throw_(std::string const &_message) const
Definition: MESet.h:122
void ecaldqm::MESet::clear ( void  ) const
virtual
MESet * ecaldqm::MESet::clone ( std::string const &  _path = "") const
virtual
virtual const_iterator ecaldqm::MESet::end ( void  ) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 322 of file MESet.h.

Referenced by Types.LuminosityBlockRange::cppID(), Types.EventRange::cppID(), ecaldqm::MESetTrend::shift_(), and ecaldqm::DQWorkerClient::towerAverage_().

322 { return const_iterator(*this, -1, -1); }
virtual iterator ecaldqm::MESet::end ( void  )
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 331 of file MESet.h.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

331 { return iterator(*this, -1, -1); }
virtual void ecaldqm::MESet::fill ( DetId const &  ,
double  = 1.,
double  = 1.,
double  = 1. 
)
inlinevirtual
virtual void ecaldqm::MESet::fill ( EcalElectronicsId const &  ,
double  = 1.,
double  = 1.,
double  = 1. 
)
inlinevirtual
virtual void ecaldqm::MESet::fill ( int  ,
double  = 1.,
double  = 1.,
double  = 1. 
)
inlinevirtual
virtual void ecaldqm::MESet::fill ( double  ,
double  = 1.,
double  = 1. 
)
inlinevirtual
void ecaldqm::MESet::fill_ ( unsigned  _iME,
int  _bin,
double  _w 
)
protectedvirtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 266 of file MESet.cc.

References MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::Fill(), MonitorElement::getTH1(), h, kind_, and mes_.

Referenced by ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESet::Bin::fill(), ecaldqm::MESetDet2D::fill_(), and getBatchMode().

266  {
268  return;
269 
270  MonitorElement *me(mes_[_iME]);
271  if (!me)
272  return;
273 
274  TH1 *h(me->getTH1());
275 
276  int nbinsX(h->GetNbinsX());
277 
278  double x(h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
279 
281  me->Fill(x, _w);
282  else {
283  double y(h->GetYaxis()->GetBinCenter(_bin / (nbinsX + 2)));
284  me->Fill(x, y, _w);
285  }
286  }
MonitorElement::Kind kind_
Definition: MESet.h:129
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::fill_ ( unsigned  _iME,
int  _bin,
double  _y,
double  _w 
)
protectedvirtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 288 of file MESet.cc.

References MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, MonitorElement::Fill(), MonitorElement::getTH1(), h, kind_, and mes_.

288  {
290  return;
291 
292  MonitorElement *me(mes_[_iME]);
293  if (!me)
294  return;
295 
296  TH1 *h(me->getTH1());
297 
298  int nbinsX(h->GetNbinsX());
299 
300  double x(h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
301  me->Fill(x, _y, _w);
302  }
MonitorElement::Kind kind_
Definition: MESet.h:129
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::fill_ ( unsigned  _iME,
double  _x,
double  _wy,
double  _w 
)
protectedvirtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 304 of file MESet.cc.

References MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::Fill(), kind_, and mes_.

304  {
305  MonitorElement *me(mes_[_iME]);
306  if (!me)
307  return;
308 
310  me->Fill(_x);
312  me->Fill(_x, _wy);
313  else
314  me->Fill(_x, _wy, _w);
315  }
MonitorElement::Kind kind_
Definition: MESet.h:129
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
std::string ecaldqm::MESet::formPath ( PathReplacements const &  ) const

Definition at line 150 of file MESet.cc.

References callgraph::path, path_, and listBenchmarks::pattern.

Referenced by ecaldqm::MESetEcal::generatePaths(), getME(), and ecaldqm::MESetMulti::MESetMulti().

150  {
151  TString path(path_);
152 
153  for (typename MESet::PathReplacements::const_iterator repItr(_replacements.begin()); repItr != _replacements.end();
154  ++repItr) {
155  TString pattern("\\%\\(");
156  pattern += repItr->first;
157  pattern += "\\)s";
158 
159  TPRegexp re(pattern);
160 
161  re.Substitute(path, repItr->second, "g");
162  }
163 
164  return path.Data();
165  }
std::string path_
Definition: MESet.h:126
bool ecaldqm::MESet::getBatchMode ( ) const
inline

Definition at line 107 of file MESet.h.

References batchMode_, and fill_().

107 { return batchMode_; }
bool batchMode_
Definition: MESet.h:132
virtual double ecaldqm::MESet::getBinContent ( DetId const &  ,
int  = 0 
) const
inlinevirtual
virtual double ecaldqm::MESet::getBinContent ( EcalElectronicsId const &  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, ecaldqm::MESetDet2D, and ecaldqm::MESetDet0D.

Definition at line 72 of file MESet.h.

72 { return 0.; }
virtual double ecaldqm::MESet::getBinContent ( int  ,
int  = 0 
) const
inlinevirtual
virtual double ecaldqm::MESet::getBinEntries ( DetId const &  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, ecaldqm::MESetDet2D, and ecaldqm::MESetProjection.

Definition at line 79 of file MESet.h.

Referenced by ecaldqm::MESetMulti::getBinEntries().

79 { return 0.; }
virtual double ecaldqm::MESet::getBinEntries ( EcalElectronicsId const &  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, and ecaldqm::MESetDet2D.

Definition at line 80 of file MESet.h.

80 { return 0.; }
virtual double ecaldqm::MESet::getBinEntries ( int  ,
int  = 0 
) const
inlinevirtual
virtual double ecaldqm::MESet::getBinError ( DetId const &  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, ecaldqm::MESetDet2D, and ecaldqm::MESetProjection.

Definition at line 75 of file MESet.h.

Referenced by ecaldqm::MESetMulti::getBinError().

75 { return 0.; }
virtual double ecaldqm::MESet::getBinError ( EcalElectronicsId const &  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, and ecaldqm::MESetDet2D.

Definition at line 76 of file MESet.h.

76 { return 0.; }
virtual double ecaldqm::MESet::getBinError ( int  ,
int  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetEcal, ecaldqm::MESetDet2D, and ecaldqm::MESetNonObject.

Definition at line 77 of file MESet.h.

77 { return 0.; }
binning::BinningType ecaldqm::MESet::getBinType ( ) const
inline
MonitorElement::Kind ecaldqm::MESet::getKind ( ) const
inline

Definition at line 94 of file MESet.h.

References kind_.

Referenced by ecaldqm::MESet::ConstBin::ConstBin(), and ecaldqm::DQWorkerClient::resetMEs().

94 { return kind_; }
MonitorElement::Kind kind_
Definition: MESet.h:129
bool ecaldqm::MESet::getLumiFlag ( ) const
inline

Definition at line 105 of file MESet.h.

References lumiFlag_.

105 { return lumiFlag_; }
bool lumiFlag_
Definition: MESet.h:130
virtual MonitorElement const* ecaldqm::MESet::getME ( unsigned  _iME) const
inlinevirtual
virtual MonitorElement* ecaldqm::MESet::getME ( unsigned  _iME)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 98 of file MESet.h.

References formPath(), mes_, recoverStats(), softReset(), and AlCaHLTBitMon_QueryRunRegistry::string.

98 { return (_iME < mes_.size() ? mes_[_iME] : nullptr); }
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
binning::ObjectType ecaldqm::MESet::getObjType ( ) const
inline

Definition at line 92 of file MESet.h.

References otype_.

Referenced by ecaldqm::MESet::const_iterator::const_iterator(), ecaldqm::MESet::ConstBin::ConstBin(), and ecaldqm::MESet::ConstBin::operator=().

92 { return otype_; }
binning::ObjectType otype_
Definition: MESet.h:127
virtual std::string const& ecaldqm::MESet::getPath ( ) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 91 of file MESet.h.

References path_.

Referenced by ecaldqm::MESet::ConstBin::ConstBin(), ecaldqm::MESetMulti::getPath(), and ecaldqm::MESet::ConstBin::operator=().

91 { return path_; }
std::string path_
Definition: MESet.h:126
bool ecaldqm::MESet::isActive ( ) const
inline

Definition at line 95 of file MESet.h.

References active_.

95 { return active_; } // booked or retrieved
bool active_
Definition: MESet.h:134
virtual bool ecaldqm::MESet::isVariableBinning ( ) const
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, ecaldqm::MESetNonObject, and ecaldqm::MESetTrend.

Definition at line 96 of file MESet.h.

Referenced by ecaldqm::MESetMulti::isVariableBinning().

96 { return false; }
bool ecaldqm::MESet::maskMatches ( DetId const &  _id,
uint32_t  _mask,
StatusManager const *  _statusManager 
) const
virtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 167 of file MESet.cc.

References btype_, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::StatusManager::getStatus(), ecaldqm::getTrigTowerMap(), photons_cff::ids, ecaldqm::isEcalScDetId(), EcalScDetId::ix(), EcalScDetId::iy(), ecaldqm::binning::kSuperCrystal, ecaldqm::binning::kTriggerTower, DetId::rawId(), EEDetId::sc(), DetId::subdetId(), EBDetId::tower(), ecaldqm::ttId(), EEDetId::validDetId(), and EcalScDetId::zside().

Referenced by getBinEntries(), and ecaldqm::MESetMulti::maskMatches().

167  {
168  if (!_statusManager)
169  return false;
170 
171  if ((_statusManager->getStatus(_id.rawId()) & _mask) != 0)
172  return true;
173 
174  int subdet(_id.subdetId());
175 
176  bool searchNeighborsInTower(btype_ == binning::kTriggerTower || btype_ == binning::kSuperCrystal);
177 
178  // turn off masking for good channel for the time being
179  // update the RenderPlugin then enable again
180 
181  switch (subdet) {
182  case EcalBarrel: // this is a DetId for single crystal in barrel
183  {
184  EBDetId ebId(_id);
185  EcalTrigTowerDetId ttId(ebId.tower());
186  if ((_statusManager->getStatus(ttId.rawId()) & _mask) != 0)
187  return true;
188 
189  if (searchNeighborsInTower) {
190  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttId));
191  for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
192  if ((_statusManager->getStatus(idItr->rawId()) & _mask) != 0)
193  return true;
194  }
195  } break;
196 
197  case EcalEndcap:
198  if (isEcalScDetId(_id)) {
199  EcalScDetId scId(_id);
200  for (int ix(1); ix <= 5; ix++) {
201  for (int iy(1); iy <= 5; iy++) {
202  int iix((scId.ix() - 1) * 5 + ix);
203  int iiy((scId.iy() - 1) * 5 + iy);
204  if (!EEDetId::validDetId(iix, iiy, scId.zside()))
205  continue;
206  if ((_statusManager->getStatus(EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0)
207  return true;
208  }
209  }
210  } else {
211  EEDetId eeId(_id);
212  EcalScDetId scId(eeId.sc());
213  if ((_statusManager->getStatus(scId.rawId()) & _mask) != 0)
214  return true;
215 
216  if (searchNeighborsInTower) {
217  for (int ix(1); ix <= 5; ix++) {
218  for (int iy(1); iy <= 5; iy++) {
219  int iix((scId.ix() - 1) * 5 + ix);
220  int iiy((scId.iy() - 1) * 5 + iy);
221  if (!EEDetId::validDetId(iix, iiy, scId.zside()))
222  continue;
223  if ((_statusManager->getStatus(EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0)
224  return true;
225  }
226  }
227  }
228  }
229  break;
230 
231  case EcalTriggerTower: {
233  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttId));
234  for (std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
235  if ((_statusManager->getStatus(idItr->rawId()) & _mask) != 0)
236  return true;
237  } break;
238 
239  default:
240  break;
241  }
242 
243  return false;
244  }
unsigned ttId(DetId const &)
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
bool isEcalScDetId(DetId const &)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
binning::BinningType btype_
Definition: MESet.h:128
MESet & ecaldqm::MESet::operator= ( MESet const &  _rhs)
virtual

Reimplemented in ecaldqm::MESetEcal, ecaldqm::MESetTrend, ecaldqm::MESetMulti, and ecaldqm::MESetNonObject.

Definition at line 64 of file MESet.cc.

References active_, btype_, kind_, mes_, otype_, and path_.

Referenced by ecaldqm::MESetNonObject::operator=(), ecaldqm::MESetMulti::operator=(), and ecaldqm::MESetEcal::operator=().

64  {
65  mes_ = _rhs.mes_;
66  path_ = _rhs.path_;
67  otype_ = _rhs.otype_;
68  btype_ = _rhs.btype_;
69  kind_ = _rhs.kind_;
70  active_ = _rhs.active_;
71 
72  return *this;
73  }
MonitorElement::Kind kind_
Definition: MESet.h:129
bool active_
Definition: MESet.h:134
binning::ObjectType otype_
Definition: MESet.h:127
binning::BinningType btype_
Definition: MESet.h:128
std::string path_
Definition: MESet.h:126
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::recoverStats ( )
virtual

Definition at line 256 of file MESet.cc.

References active_, DQMStore::disableSoftReset(), and mes_.

Referenced by getME().

256  {
257  if (!active_)
258  return;
259 
260  DQMStore &store(*edm::Service<DQMStore>());
261 
262  for (unsigned iME(0); iME < mes_.size(); ++iME)
263  store.disableSoftReset(mes_[iME]);
264  }
bool active_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::reset ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetDet0D.

Definition at line 98 of file MESet.cc.

References active_, and resetAll().

Referenced by ecaldqm::PresampleTask::beginLuminosityBlock(), ecaldqm::TimingTask::beginLuminosityBlock(), getBinEntries(), ecaldqm::TowerStatusTask::producePlotsTask_(), and ecaldqm::DQWorkerClient::resetMEs().

98  {
99  if (!active_)
100  return;
101 
102  resetAll(_content, _err, _entries);
103  }
virtual void resetAll(double=0., double=0., double=0.)
Definition: MESet.cc:105
bool active_
Definition: MESet.h:134
void ecaldqm::MESet::resetAll ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 105 of file MESet.cc.

References active_, stringResolutionProvider_cfi::bin, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, HcalObjRepresent::Fill(), h, kind_, and mes_.

Referenced by ecaldqm::MESetDet2D::book(), getBinEntries(), ecaldqm::TowerStatusTask::producePlotsTask_(), reset(), ecaldqm::DQWorkerClient::resetMEs(), and ecaldqm::MESetDet2D::softReset().

105  {
106  if (!active_)
107  return;
108 
109  unsigned nME(mes_.size());
110 
112  for (unsigned iME(0); iME < nME; iME++)
113  mes_[iME]->Fill(_content);
114  return;
115  }
116 
117  bool simple(true);
118  if (_content != 0. || _err != 0. || _entries != 0.)
119  simple = false;
120 
121  for (unsigned iME(0); iME < nME; iME++) {
122  TH1 *h(mes_[iME]->getTH1());
123  h->Reset();
124  if (simple)
125  continue;
126 
127  int nbinsX(h->GetNbinsX());
128  int nbinsY(h->GetNbinsY());
129  double entries(0.);
130  for (int ix(1); ix <= nbinsX; ix++) {
131  for (int iy(1); iy <= nbinsY; iy++) {
132  int bin(h->GetBin(ix, iy));
133  h->SetBinContent(bin, _content);
134  h->SetBinError(bin, _err);
136  static_cast<TProfile *>(h)->SetBinEntries(bin, _entries);
137  entries += _entries;
139  static_cast<TProfile2D *>(h)->SetBinEntries(bin, _entries);
140  entries += _entries;
141  }
142  }
143  }
144  if (entries == 0.)
145  entries = _entries;
146  h->SetEntries(_entries);
147  }
148  }
MonitorElement::Kind kind_
Definition: MESet.h:129
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bin
set the eta bin as selection string.
bool active_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
virtual bool ecaldqm::MESet::retrieve ( DQMStore::IGetter ,
std::string *  = 0 
) const
inlinevirtual

Reimplemented in ecaldqm::MESetEcal, ecaldqm::MESetMulti, and ecaldqm::MESetNonObject.

Definition at line 42 of file MESet.h.

References clear().

42 { return false; }
void ecaldqm::MESet::setAxisTitle ( std::string const &  _title,
int  _axis = 1 
)
virtual

Definition at line 89 of file MESet.cc.

References active_, and mes_.

Referenced by ecaldqm::MESetTrend::book(), and getBinEntries().

89  {
90  if (!active_)
91  return;
92 
93  unsigned nME(mes_.size());
94  for (unsigned iME(0); iME < nME; iME++)
95  mes_[iME]->setAxisTitle(_title, _axis);
96  }
virtual void setAxisTitle(std::string const &, int=1)
Definition: MESet.cc:89
bool active_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::setBatchMode ( )
inline

Definition at line 106 of file MESet.h.

References batchMode_.

106 { batchMode_ = true; }
bool batchMode_
Definition: MESet.h:132
virtual void ecaldqm::MESet::setBinContent ( DetId const &  ,
double   
)
inlinevirtual
virtual void ecaldqm::MESet::setBinContent ( EcalElectronicsId const &  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetDet2D.

Definition at line 51 of file MESet.h.

51 {}
virtual void ecaldqm::MESet::setBinContent ( int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetNonObject.

Definition at line 52 of file MESet.h.

52 {}
virtual void ecaldqm::MESet::setBinContent ( DetId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, ecaldqm::MESetDet1D, and ecaldqm::MESetDet0D.

Definition at line 53 of file MESet.h.

53 {}
virtual void ecaldqm::MESet::setBinContent ( EcalElectronicsId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, ecaldqm::MESetDet1D, and ecaldqm::MESetDet0D.

Definition at line 54 of file MESet.h.

54 {}
virtual void ecaldqm::MESet::setBinContent ( int  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, ecaldqm::MESetDet1D, and ecaldqm::MESetDet0D.

Definition at line 55 of file MESet.h.

55 {}
virtual void ecaldqm::MESet::setBinEntries ( DetId const &  ,
double   
)
inlinevirtual
virtual void ecaldqm::MESet::setBinEntries ( EcalElectronicsId const &  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetDet2D.

Definition at line 65 of file MESet.h.

65 {}
virtual void ecaldqm::MESet::setBinEntries ( int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetNonObject.

Definition at line 66 of file MESet.h.

66 {}
virtual void ecaldqm::MESet::setBinEntries ( DetId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetEcal.

Definition at line 67 of file MESet.h.

67 {}
virtual void ecaldqm::MESet::setBinEntries ( EcalElectronicsId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetEcal.

Definition at line 68 of file MESet.h.

68 {}
virtual void ecaldqm::MESet::setBinEntries ( int  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetEcal.

Definition at line 69 of file MESet.h.

69 {}
virtual void ecaldqm::MESet::setBinError ( DetId const &  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetProjection.

Definition at line 57 of file MESet.h.

Referenced by ecaldqm::MESetMulti::setBinError().

57 {}
virtual void ecaldqm::MESet::setBinError ( EcalElectronicsId const &  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, and ecaldqm::MESetDet2D.

Definition at line 58 of file MESet.h.

58 {}
virtual void ecaldqm::MESet::setBinError ( int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetDet1D, ecaldqm::MESetDet2D, and ecaldqm::MESetNonObject.

Definition at line 59 of file MESet.h.

59 {}
virtual void ecaldqm::MESet::setBinError ( DetId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 60 of file MESet.h.

60 {}
virtual void ecaldqm::MESet::setBinError ( EcalElectronicsId const &  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 61 of file MESet.h.

61 {}
virtual void ecaldqm::MESet::setBinError ( int  ,
int  ,
double   
)
inlinevirtual

Reimplemented in ecaldqm::MESetMulti, ecaldqm::MESetEcal, and ecaldqm::MESetDet1D.

Definition at line 62 of file MESet.h.

62 {}
void ecaldqm::MESet::setLumiFlag ( )
inline

Definition at line 104 of file MESet.h.

References lumiFlag_.

104 { lumiFlag_ = true; };
bool lumiFlag_
Definition: MESet.h:130
void ecaldqm::MESet::softReset ( )
virtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 246 of file MESet.cc.

References active_, mes_, and DQMStore::softReset().

Referenced by getME(), and ecaldqm::MESetDet2D::softReset().

246  {
247  if (!active_)
248  return;
249 
250  DQMStore &store(*edm::Service<DQMStore>());
251 
252  for (unsigned iME(0); iME < mes_.size(); ++iME)
253  store.softReset(mes_[iME]);
254  }
bool active_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:124
void ecaldqm::MESet::throw_ ( std::string const &  _message) const
inlineprotected

Member Data Documentation

bool ecaldqm::MESet::active_
mutableprotected

Definition at line 134 of file MESet.h.

Referenced by ecaldqm::MESetNonObject::book(), ecaldqm::MESetMulti::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetMulti::clear(), clear(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetNonObject::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetNonObject::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetNonObject::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetDet1D::getBinContent(), ecaldqm::MESetNonObject::getBinEntries(), ecaldqm::MESetProjection::getBinEntries(), ecaldqm::MESetDet2D::getBinEntries(), ecaldqm::MESetEcal::getBinEntries(), ecaldqm::MESetDet1D::getBinEntries(), ecaldqm::MESetNonObject::getBinError(), ecaldqm::MESetProjection::getBinError(), ecaldqm::MESetDet2D::getBinError(), ecaldqm::MESetDet1D::getBinError(), ecaldqm::MESetEcal::getBinError(), isActive(), operator=(), recoverStats(), reset(), resetAll(), ecaldqm::MESetNonObject::retrieve(), ecaldqm::MESetMulti::retrieve(), ecaldqm::MESetEcal::retrieve(), setAxisTitle(), ecaldqm::MESetNonObject::setBinContent(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetNonObject::setBinEntries(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetNonObject::setBinError(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), ecaldqm::MESetEcal::setBinError(), and softReset().

bool ecaldqm::MESet::batchMode_
protected
binning::BinningType ecaldqm::MESet::btype_
protected

Definition at line 128 of file MESet.h.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetDet1D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetProjection::getBinEntries(), ecaldqm::MESetDet2D::getBinEntries(), ecaldqm::MESetDet1D::getBinEntries(), ecaldqm::MESetEcal::getBinEntries(), ecaldqm::MESetProjection::getBinError(), ecaldqm::MESetDet2D::getBinError(), ecaldqm::MESetDet1D::getBinError(), ecaldqm::MESetEcal::getBinError(), getBinType(), maskMatches(), ecaldqm::MESetEcal::MESetEcal(), ecaldqm::MESetProjection::MESetProjection(), operator=(), ecaldqm::MESetDet2D::reset(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), and ecaldqm::MESetEcal::setBinError().

MonitorElement::Kind ecaldqm::MESet::kind_
protected
bool ecaldqm::MESet::lumiFlag_
protected
std::vector<MonitorElement *> ecaldqm::MESet::mes_
mutableprotected

Definition at line 124 of file MESet.h.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetNonObject::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetTrend::book(), ecaldqm::MESetEcal::book(), clear(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetNonObject::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetDet2D::fill_(), fill_(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetNonObject::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetNonObject::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetDet1D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetNonObject::getBinEntries(), ecaldqm::MESetProjection::getBinEntries(), ecaldqm::MESetDet2D::getBinEntries(), ecaldqm::MESetEcal::getBinEntries(), ecaldqm::MESetDet1D::getBinEntries(), ecaldqm::MESetNonObject::getBinError(), ecaldqm::MESetProjection::getBinError(), ecaldqm::MESetDet2D::getBinError(), ecaldqm::MESetDet1D::getBinError(), ecaldqm::MESetEcal::getBinError(), ecaldqm::MESetNonObject::getFloatValue(), getME(), operator=(), recoverStats(), ecaldqm::MESetDet0D::reset(), ecaldqm::MESetDet2D::reset(), ecaldqm::MESetDet1D::reset(), resetAll(), ecaldqm::MESetNonObject::retrieve(), ecaldqm::MESetEcal::retrieve(), setAxisTitle(), ecaldqm::MESetNonObject::setBinContent(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetNonObject::setBinEntries(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetNonObject::setBinError(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), ecaldqm::MESetEcal::setBinError(), ecaldqm::MESetTrend::shift_(), and softReset().

binning::ObjectType ecaldqm::MESet::otype_
protected

Definition at line 127 of file MESet.h.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetEcal::generatePaths(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetDet1D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetProjection::getBinEntries(), ecaldqm::MESetDet2D::getBinEntries(), ecaldqm::MESetEcal::getBinEntries(), ecaldqm::MESetDet1D::getBinEntries(), ecaldqm::MESetProjection::getBinError(), ecaldqm::MESetDet2D::getBinError(), ecaldqm::MESetEcal::getBinError(), ecaldqm::MESetDet1D::getBinError(), getObjType(), MESet(), operator=(), ecaldqm::MESetDet2D::reset(), ecaldqm::MESetDet1D::reset(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), and ecaldqm::MESetEcal::setBinError().

std::string ecaldqm::MESet::path_
mutableprotected