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 29 of file MESet.h.

Member Typedef Documentation

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

Definition at line 31 of file MESet.h.

Constructor & Destructor Documentation

ecaldqm::MESet::MESet ( )

Definition at line 15 of file MESet.cc.

Referenced by clone().

15  :
16  mes_(0),
17  path_(""),
21  lumiFlag_(false),
22  batchMode_(false),
23  active_(false)
24  {
25  }
MonitorElement::Kind kind_
Definition: MESet.h:134
bool batchMode_
Definition: MESet.h:136
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool lumiFlag_
Definition: MESet.h:135
bool active_
Definition: MESet.h:138
binning::ObjectType otype_
Definition: MESet.h:132
binning::BinningType btype_
Definition: MESet.h:133
std::string path_
Definition: MESet.h:131
ecaldqm::MESet::MESet ( std::string const &  _path,
binning::ObjectType  _otype,
binning::BinningType  _btype,
MonitorElement::Kind  _kind 
)

Definition at line 27 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_().

27  :
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  {
37  if(path_.empty() || path_.find("/") == std::string::npos ||
38  (otype_ != binning::kChannel && path_.find("/") == path_.size() - 1))
39  throw_(_path + " cannot be used for ME path name");
40 
41  switch(kind_){
47  break;
48  default:
49  throw_("Unsupported MonitorElement kind");
50  }
51  }
MonitorElement::Kind kind_
Definition: MESet.h:134
bool batchMode_
Definition: MESet.h:136
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void throw_(std::string const &_message) const
Definition: MESet.h:124
bool lumiFlag_
Definition: MESet.h:135
bool active_
Definition: MESet.h:138
binning::ObjectType otype_
Definition: MESet.h:132
binning::BinningType btype_
Definition: MESet.h:133
std::string path_
Definition: MESet.h:131
ecaldqm::MESet::MESet ( MESet const &  _orig)

Definition at line 53 of file MESet.cc.

53  :
54  mes_(_orig.mes_),
55  path_(_orig.path_),
56  otype_(_orig.otype_),
57  btype_(_orig.btype_),
58  kind_(_orig.kind_),
59  lumiFlag_(_orig.lumiFlag_),
60  batchMode_(_orig.batchMode_),
61  active_(_orig.active_)
62  {
63  }
MonitorElement::Kind kind_
Definition: MESet.h:134
bool batchMode_
Definition: MESet.h:136
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool lumiFlag_
Definition: MESet.h:135
bool active_
Definition: MESet.h:138
binning::ObjectType otype_
Definition: MESet.h:132
binning::BinningType btype_
Definition: MESet.h:133
std::string path_
Definition: MESet.h:131
ecaldqm::MESet::~MESet ( )
virtual

Definition at line 65 of file MESet.cc.

66  {
67  }

Member Function Documentation

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 281 of file MESet.h.

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 297 of file MESet.h.

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 291 of file MESet.h.

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

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

292  {
293  const_iterator itr(*this, 0, 0);
294  return itr.toNextChannel();
295  }
virtual iterator ecaldqm::MESet::beginChannel ( )
inlinevirtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 307 of file MESet.h.

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

308  {
309  iterator itr(*this, 0, 0);
310  itr.toNextChannel();
311  return itr;
312  }
virtual void ecaldqm::MESet::book ( DQMStore::IBooker )
inlinevirtual
virtual void ecaldqm::MESet::checkME_ ( unsigned  _iME) const
inlineprotectedvirtual

Definition at line 115 of file MESet.h.

References getME(), and throw_().

Referenced by ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetDet1D::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(), ecaldqm::MESetProjection::setBinContent(), ecaldqm::MESetDet2D::setBinContent(), ecaldqm::MESetDet1D::setBinContent(), ecaldqm::MESetEcal::setBinContent(), ecaldqm::MESetProjection::setBinEntries(), ecaldqm::MESetDet2D::setBinEntries(), ecaldqm::MESetEcal::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), and ecaldqm::MESetEcal::setBinError().

116  {
117  if(!getME(_iME)){
118  std::stringstream ss;
119  ss << "ME does not exist at index " << _iME;
120  throw_(ss.str());
121  }
122  }
virtual MonitorElement const * getME(unsigned _iME) const
Definition: MESet.h:98
void throw_(std::string const &_message) const
Definition: MESet.h:124
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 286 of file MESet.h.

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

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 302 of file MESet.h.

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

303  {
304  return iterator(*this, -1, -1);
305  }
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 278 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().

279  {
280  if(kind_ == MonitorElement::DQM_KIND_REAL) return;
281 
282  MonitorElement* me(mes_[_iME]);
283  if(!me) return;
284 
285  TH1* h(me->getTH1());
286 
287  int nbinsX(h->GetNbinsX());
288 
289  double x(h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
290 
292  me->Fill(x, _w);
293  else{
294  double y(h->GetYaxis()->GetBinCenter(_bin / (nbinsX + 2)));
295  me->Fill(x, y, _w);
296  }
297  }
MonitorElement::Kind kind_
Definition: MESet.h:134
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void ecaldqm::MESet::fill_ ( unsigned  _iME,
int  _bin,
double  _y,
double  _w 
)
protectedvirtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 300 of file MESet.cc.

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

301  {
303 
304  MonitorElement* me(mes_[_iME]);
305  if(!me) return;
306 
307  TH1* h(me->getTH1());
308 
309  int nbinsX(h->GetNbinsX());
310 
311  double x(h->GetXaxis()->GetBinCenter(_bin % (nbinsX + 2)));
312  me->Fill(x, _y, _w);
313  }
MonitorElement::Kind kind_
Definition: MESet.h:134
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void ecaldqm::MESet::fill_ ( unsigned  _iME,
double  _x,
double  _wy,
double  _w 
)
protectedvirtual

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 316 of file MESet.cc.

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

317  {
318  MonitorElement* me(mes_[_iME]);
319  if(!me) return;
320 
322  me->Fill(_x);
324  me->Fill(_x, _wy);
325  else
326  me->Fill(_x, _wy, _w);
327  }
MonitorElement::Kind kind_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::string ecaldqm::MESet::formPath ( PathReplacements const &  ) const

Definition at line 163 of file MESet.cc.

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

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

164  {
165  TString path(path_);
166 
167  for(typename MESet::PathReplacements::const_iterator repItr(_replacements.begin()); repItr != _replacements.end(); ++repItr){
168  TString pattern("\\%\\(");
169  pattern += repItr->first;
170  pattern += "\\)s";
171 
172  TPRegexp re(pattern);
173 
174  re.Substitute(path, repItr->second, "g");
175  }
176 
177  return path.Data();
178  }
std::string path_
Definition: MESet.h:131
bool ecaldqm::MESet::getBatchMode ( ) const
inline

Definition at line 108 of file MESet.h.

References batchMode_, and fill_().

108 { return batchMode_; }
bool batchMode_
Definition: MESet.h:136
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 73 of file MESet.h.

73 { 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 80 of file MESet.h.

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

80 { 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 81 of file MESet.h.

81 { 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 76 of file MESet.h.

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

76 { 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 77 of file MESet.h.

77 { 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 78 of file MESet.h.

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

Definition at line 95 of file MESet.h.

References kind_.

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

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

Definition at line 106 of file MESet.h.

References lumiFlag_.

106 { return lumiFlag_; }
bool lumiFlag_
Definition: MESet.h:135
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 99 of file MESet.h.

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

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

Definition at line 93 of file MESet.h.

References otype_.

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

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 92 of file MESet.h.

References path_.

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

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

Definition at line 96 of file MESet.h.

References active_.

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

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

Definition at line 97 of file MESet.h.

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

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

Reimplemented in ecaldqm::MESetMulti.

Definition at line 181 of file MESet.cc.

References btype_, EcalBarrel, EcalEndcap, EcalTriggerTower, ecaldqm::StatusManager::getStatus(), ecaldqm::getTrigTowerMap(), electrons_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().

182  {
183  if(!_statusManager) return false;
184 
185  if((_statusManager->getStatus(_id.rawId()) & _mask) != 0) return true;
186 
187  int subdet(_id.subdetId());
188 
189  bool searchNeighborsInTower(btype_ == binning::kTriggerTower || btype_ == binning::kSuperCrystal);
190 
191  // turn off masking for good channel for the time being
192  // update the RenderPlugin then enable again
193 
194  switch(subdet){
195  case EcalBarrel: // this is a DetId for single crystal in barrel
196  {
197  EBDetId ebId(_id);
198  EcalTrigTowerDetId ttId(ebId.tower());
199  if((_statusManager->getStatus(ttId.rawId()) & _mask) != 0) return true;
200 
201  if(searchNeighborsInTower){
202  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttId));
203  for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
204  if((_statusManager->getStatus(idItr->rawId()) & _mask) != 0) return true;
205  }
206  }
207  break;
208 
209  case EcalEndcap:
210  if(isEcalScDetId(_id)){
211  EcalScDetId scId(_id);
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);
216  if(!EEDetId::validDetId(iix, iiy, scId.zside())) continue;
217  if((_statusManager->getStatus(EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0) return true;
218  }
219  }
220  }
221  else{
222  EEDetId eeId(_id);
223  EcalScDetId scId(eeId.sc());
224  if((_statusManager->getStatus(scId.rawId()) & _mask) != 0) return true;
225 
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);
231  if(!EEDetId::validDetId(iix, iiy, scId.zside())) continue;
232  if((_statusManager->getStatus(EEDetId(iix, iiy, scId.zside()).rawId()) & _mask) != 0) return true;
233  }
234  }
235  }
236  }
237  break;
238 
239  case EcalTriggerTower:
240  {
242  std::vector<DetId> ids(getTrigTowerMap()->constituentsOf(ttId));
243  for(std::vector<DetId>::iterator idItr(ids.begin()); idItr != ids.end(); ++idItr)
244  if((_statusManager->getStatus(idItr->rawId()) & _mask) != 0) return true;
245  }
246  break;
247 
248  default:
249  break;
250  }
251 
252  return false;
253  }
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:133
MESet & ecaldqm::MESet::operator= ( MESet const &  _rhs)
virtual

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

Definition at line 70 of file MESet.cc.

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

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

71  {
72  mes_ = _rhs.mes_;
73  path_ = _rhs.path_;
74  otype_ = _rhs.otype_;
75  btype_ = _rhs.btype_;
76  kind_ = _rhs.kind_;
77  active_ = _rhs.active_;
78 
79  return *this;
80  }
MonitorElement::Kind kind_
Definition: MESet.h:134
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool active_
Definition: MESet.h:138
binning::ObjectType otype_
Definition: MESet.h:132
binning::BinningType btype_
Definition: MESet.h:133
std::string path_
Definition: MESet.h:131
void ecaldqm::MESet::recoverStats ( )
virtual

Definition at line 267 of file MESet.cc.

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

Referenced by getME().

268  {
269  if(!active_) return;
270 
271  DQMStore& store(*edm::Service<DQMStore>());
272 
273  for(unsigned iME(0); iME < mes_.size(); ++iME)
274  store.disableSoftReset(mes_[iME]);
275  }
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool active_
Definition: MESet.h:138
void ecaldqm::MESet::reset ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

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

Definition at line 110 of file MESet.cc.

References active_, and resetAll().

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

111  {
112  if(!active_) return;
113 
114  resetAll(_content, _err, _entries);
115  }
virtual void resetAll(double=0., double=0., double=0.)
Definition: MESet.cc:118
bool active_
Definition: MESet.h:138
void ecaldqm::MESet::resetAll ( double  _content = 0.,
double  _err = 0.,
double  _entries = 0. 
)
virtual

Reimplemented in ecaldqm::MESetMulti.

Definition at line 118 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_, mes_, and AlCaHLTBitMon_QueryRunRegistry::string.

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

119  {
120  if(!active_) return;
121 
122  unsigned nME(mes_.size());
123 
125  for(unsigned iME(0); iME < nME; iME++)
126  mes_[iME]->Fill(_content);
127  return;
128  }
129 
130  bool simple(true);
131  if(_content != 0. || _err != 0. || _entries != 0.) simple = false;
132 
133  for(unsigned iME(0); iME < nME; iME++){
134  TH1* h(mes_[iME]->getTH1());
135  h->Reset();
136  if(simple) continue;
137 
138  int nbinsX(h->GetNbinsX());
139  int nbinsY(h->GetNbinsY());
140  double entries(0.);
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);
148  entries += _entries;
149  }
151  static_cast<TProfile2D*>(h)->SetBinEntries(bin, _entries);
152  entries += _entries;
153  }
154  }
155  }
156  if(entries == 0.) entries = _entries;
157  h->SetEntries(_entries);
158  }
159  }
MonitorElement::Kind kind_
Definition: MESet.h:134
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
bin
set the eta bin as selection string.
bool active_
Definition: MESet.h:138
virtual bool ecaldqm::MESet::retrieve ( DQMStore::IGetter ,
std::string *  = 0 
) const
inlinevirtual

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

Definition at line 43 of file MESet.h.

References clear().

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

Definition at line 100 of file MESet.cc.

References active_, and mes_.

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

101  {
102  if(!active_) return;
103 
104  unsigned nME(mes_.size());
105  for(unsigned iME(0); iME < nME; iME++)
106  mes_[iME]->setAxisTitle(_title, _axis);
107  }
virtual void setAxisTitle(std::string const &, int=1)
Definition: MESet.cc:100
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool active_
Definition: MESet.h:138
void ecaldqm::MESet::setBatchMode ( )
inline

Definition at line 107 of file MESet.h.

References batchMode_.

107 { batchMode_ = true; }
bool batchMode_
Definition: MESet.h:136
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 52 of file MESet.h.

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

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

Definition at line 53 of file MESet.h.

53 {}
virtual void ecaldqm::MESet::setBinContent ( DetId 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 ( EcalElectronicsId const &  ,
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::setBinContent ( int  ,
int  ,
double   
)
inlinevirtual

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

Definition at line 56 of file MESet.h.

56 {}
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 66 of file MESet.h.

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

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

Definition at line 67 of file MESet.h.

67 {}
virtual void ecaldqm::MESet::setBinEntries ( DetId 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 ( EcalElectronicsId const &  ,
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::setBinEntries ( int  ,
int  ,
double   
)
inlinevirtual

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

Definition at line 70 of file MESet.h.

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

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

Definition at line 58 of file MESet.h.

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

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

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

Definition at line 59 of file MESet.h.

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

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

Definition at line 60 of file MESet.h.

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

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

Definition at line 61 of file MESet.h.

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

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

Definition at line 62 of file MESet.h.

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

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

Definition at line 63 of file MESet.h.

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

Definition at line 105 of file MESet.h.

References lumiFlag_.

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

Reimplemented in ecaldqm::MESetDet2D.

Definition at line 256 of file MESet.cc.

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

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

257  {
258  if(!active_) return;
259 
260  DQMStore& store(*edm::Service<DQMStore>());
261 
262  for(unsigned iME(0); iME < mes_.size(); ++iME)
263  store.softReset(mes_[iME]);
264  }
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
bool active_
Definition: MESet.h:138
void ecaldqm::MESet::throw_ ( std::string const &  _message) const
inlineprotected

Member Data Documentation

bool ecaldqm::MESet::active_
mutableprotected

Definition at line 138 of file MESet.h.

Referenced by ecaldqm::MESetNonObject::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetMulti::book(), ecaldqm::MESetMulti::clear(), clear(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetNonObject::fill(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetNonObject::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetNonObject::getBinContent(), ecaldqm::MESetDet0D::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::MESetEcal::getBinError(), ecaldqm::MESetDet1D::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::MESetEcal::setBinEntries(), ecaldqm::MESetDet1D::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 133 of file MESet.h.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetDet1D::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(), 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 129 of file MESet.h.

Referenced by ecaldqm::MESetNonObject::book(), ecaldqm::MESetDet2D::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetTrend::book(), ecaldqm::MESetEcal::book(), clear(), ecaldqm::MESetNonObject::fill(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetDet2D::fill_(), fill_(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetNonObject::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetNonObject::getBinContent(), ecaldqm::MESetDet0D::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::MESetEcal::getBinError(), ecaldqm::MESetDet1D::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::MESetEcal::setBinEntries(), ecaldqm::MESetDet1D::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 132 of file MESet.h.

Referenced by ecaldqm::MESetDet2D::book(), ecaldqm::MESetDet1D::book(), ecaldqm::MESetEcal::book(), ecaldqm::MESetProjection::fill(), ecaldqm::MESetDet2D::fill(), ecaldqm::MESetDet0D::fill(), ecaldqm::MESetDet1D::fill(), ecaldqm::MESetTrend::fill(), ecaldqm::MESetEcal::fill(), ecaldqm::MESetTrend::findBin(), ecaldqm::MESetEcal::findBin(), ecaldqm::MESetDet2D::findBin(), ecaldqm::MESetDet1D::findBin(), ecaldqm::MESetEcal::generatePaths(), ecaldqm::MESetDet0D::getBinContent(), ecaldqm::MESetProjection::getBinContent(), ecaldqm::MESetDet2D::getBinContent(), ecaldqm::MESetEcal::getBinContent(), ecaldqm::MESetDet1D::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::MESetEcal::setBinEntries(), ecaldqm::MESetDet1D::setBinEntries(), ecaldqm::MESetProjection::setBinError(), ecaldqm::MESetDet2D::setBinError(), ecaldqm::MESetDet1D::setBinError(), and ecaldqm::MESetEcal::setBinError().

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