CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
ecaldqm::MESetDet1D Class Reference

#include <MESetDet1D.h>

Inheritance diagram for ecaldqm::MESetDet1D:
ecaldqm::MESetEcal ecaldqm::MESet

Public Member Functions

void fill (DetId const &, double _wy=1., double _w=1., double _unused=0.)
 
void fill (unsigned, double _wy=1., double _w=1., double _unused=0.)
 
double getBinContent (DetId const &, int _bin=0) const
 
double getBinContent (unsigned, int _bin=0) const
 
double getBinEntries (DetId const &, int _bin=0) const
 
double getBinEntries (unsigned, int _bin=0) const
 
double getBinError (DetId const &, int _bin=0) const
 
double getBinError (unsigned, int _bin=0) const
 
 MESetDet1D (std::string const &, MEData const &, bool _readOnly=false)
 
 ~MESetDet1D ()
 
- Public Member Functions inherited from ecaldqm::MESetEcal
void book ()
 
void fill (DetId const &, double _wx=1., double _wy=1., double _w=1.)
 
void fill (unsigned, double _wx=1., double _wy=1., double _w=1.)
 
void fill (double, double _wy=1., double _w=1.)
 
std::vector< std::string > generateNames () const
 
double getBinContent (DetId const &, int _bin=0) const
 
double getBinContent (unsigned, int _bin=0) const
 
double getBinEntries (DetId const &, int _bin=0) const
 
double getBinEntries (unsigned, int _bin=0) const
 
double getBinError (DetId const &, int _bin=0) const
 
double getBinError (unsigned, int _bin=0) const
 
 MESetEcal (std::string const &, MEData const &, int logicalDimensions_, bool _readOnly=false)
 
void reset (double _content=0., double _err=0., double _entries=0.)
 
bool retrieve () const
 
void setBinContent (DetId const &, double, double _err=0.)
 
void setBinContent (unsigned, double, double _err=0.)
 
void setBinEntries (DetId const &, double)
 
void setBinEntries (unsigned, double)
 
 ~MESetEcal ()
 
- Public Member Functions inherited from ecaldqm::MESet
virtual void clear () const
 
virtual void fill (EcalElectronicsId const &, double _wx=1., double _wy=1., double _w=1.)
 
virtual double getBinContent (EcalElectronicsId const &, int _bin=0) const
 
virtual double getBinEntries (EcalElectronicsId const &, int _bin=0) const
 
virtual double getBinError (EcalElectronicsId const &, int _bin=0) const
 
BinService::BinningType getBinType () const
 
std::string const & getDir () const
 
virtual MonitorElement const * getME (unsigned _offset) const
 
std::string const & getName () const
 
BinService::ObjectType getObjType () const
 
bool isActive () const
 
 MESet (std::string const &, MEData const &, bool _readOnly=false)
 
void name (std::map< std::string, std::string > const &) const
 
virtual void resetAll (double _content=0., double _err=0., double _entries=0.)
 
virtual void setAxisTitle (std::string const &, int _axis=1)
 
virtual void setBinContent (EcalElectronicsId const &, double, double _err=0.)
 
virtual void setBinEntries (EcalElectronicsId const &, double)
 
virtual void setBinLabel (unsigned, int, std::string const &, int _axis=1)
 
void setDir (std::string const &_dir)
 
void setName (std::string const &_name)
 
virtual ~MESet ()
 

Private Member Functions

void fill_ (double, double)
 
void find_ (uint32_t) const
 

Additional Inherited Members

- Protected Member Functions inherited from ecaldqm::MESetEcal
virtual void fill_ (double)
 
- Protected Member Functions inherited from ecaldqm::MESet
virtual void fill_ (unsigned, int, double)
 
virtual void fill_ (unsigned, double, double, double)
 
virtual double getBinContent_ (unsigned, int) const
 
virtual double getBinEntries_ (unsigned, int) const
 
virtual double getBinError_ (unsigned, int) const
 
virtual void setBinContent_ (unsigned, int, double, double)
 
virtual void setBinEntries_ (unsigned, int, double)
 
- Protected Attributes inherited from ecaldqm::MESetEcal
std::pair< unsigned,
std::vector< int > > 
cache_
 
uint32_t cacheId_
 
const unsigned logicalDimensions_
 
- Protected Attributes inherited from ecaldqm::MESet
bool active_
 
MEData const * data_
 
std::string dir_
 
std::vector< MonitorElement * > mes_
 
std::string name_
 
bool readOnly_
 
- Static Protected Attributes inherited from ecaldqm::MESet
static BinService const * binService_
 
static DQMStoredqmStore_
 

Detailed Description

Definition at line 8 of file MESetDet1D.h.

Constructor & Destructor Documentation

ecaldqm::MESetDet1D::MESetDet1D ( std::string const &  _fullpath,
MEData const &  _data,
bool  _readOnly = false 
)

Definition at line 10 of file MESetDet1D.cc.

10  :
11  MESetEcal(_fullpath, _data, 1, _readOnly)
12  {
13  }
MESetEcal(std::string const &, MEData const &, int logicalDimensions_, bool _readOnly=false)
Definition: MESetEcal.cc:12
ecaldqm::MESetDet1D::~MESetDet1D ( )

Definition at line 15 of file MESetDet1D.cc.

16  {
17  }

Member Function Documentation

void ecaldqm::MESetDet1D::fill ( DetId const &  _id,
double  _wy = 1.,
double  _w = 1.,
double  _unused = 0. 
)
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 20 of file MESetDet1D.cc.

References fill_(), and find_().

21  {
22  find_(_id);
23 
24  fill_(_wy, _w);
25  }
void fill_(double, double)
Definition: MESetDet1D.cc:168
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
void ecaldqm::MESetDet1D::fill ( unsigned  _dcctccid,
double  _wy = 1.,
double  _w = 1.,
double  _unused = 0. 
)
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 28 of file MESetDet1D.cc.

References fill_(), and find_().

29  {
30  find_(_dcctccid);
31 
32  fill_(_wy, _w);
33  }
void fill_(double, double)
Definition: MESetDet1D.cc:168
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
void ecaldqm::MESetDet1D::fill_ ( double  _wy,
double  _w 
)
private

Definition at line 168 of file MESetDet1D.cc.

References combineCards::bins, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, ecaldqm::MESetEcal::fill_(), ecaldqm::MESet::fill_(), h, ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

Referenced by fill().

169  {
171  std::vector<int> bins(cache_.second);
172  TH1* h(mes_[cache_.first]->getTH1());
173  int iy(h->GetYaxis()->FindBin(_wy));
174  int nbinsX(h->GetNbinsX());
175  for(unsigned iBin(0); iBin < bins.size(); iBin++)
176  bins[iBin] += (iy - 1) * nbinsX;
177 
178  for(unsigned iBin(0); iBin < bins.size(); iBin++)
179  MESet::fill_(cache_.first, bins[iBin], _w);
180  }
181  else
182  MESetEcal::fill_(_wy);
183  }
MonitorElement::Kind kind
Definition: MESet.h:24
virtual void fill_(double)
Definition: MESetEcal.cc:491
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
virtual void fill_(unsigned, int, double)
Definition: MESet.cc:262
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MEData const * data_
Definition: MESet.h:133
void ecaldqm::MESetDet1D::find_ ( uint32_t  _id) const
privatevirtual

Reimplemented from ecaldqm::MESetEcal.

Definition at line 138 of file MESetDet1D.cc.

References ecaldqm::MESet::binService_, ecaldqm::MEData::btype, ecaldqm::MESetEcal::cache_, ecaldqm::MESetEcal::cacheId_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, DetId::Ecal, EcalDQMBinningService::findBins(), EcalDQMBinningService::findBinsNoMap(), errorMatrix2Lands_multiChannel::id, ecaldqm::MEData::kind, ecaldqm::MESet::mes_, and ecaldqm::MEData::otype.

Referenced by fill(), getBinContent(), getBinEntries(), and getBinError().

139  {
140  if(_id == cacheId_) return;
141 
143  DetId id(_id);
144  if(id.det() == DetId::Ecal)
146  else
148  }
149  else{
150  DetId id(_id);
151  if(id.det() == DetId::Ecal)
153  else
154  cache_ = binService_->findBins(data_->otype, data_->btype, unsigned(_id));
155  }
156 
157  if(cache_.first >= mes_.size() || !mes_[cache_.first])
158  throw cms::Exception("InvalidCall") << "ME array index overflow" << std::endl;
159 
160  // some TTs are apparently empty..!
161 // if(cache_.second.size() == 0)
162 // throw cms::Exception("InvalidCall") << "No bins to get content from" << std::endl;
163 
164  cacheId_ = _id;
165  }
BinService::ObjectType otype
Definition: MESet.h:22
uint32_t cacheId_
Definition: MESetEcal.h:47
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
BinService::BinningType btype
Definition: MESet.h:23
std::pair< unsigned, std::vector< int > > findBinsNoMap(ObjectType, BinningType, const DetId &) const
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
Definition: DetId.h:20
static BinService const * binService_
Definition: MESet.h:126
std::pair< unsigned, std::vector< int > > findBins(ObjectType, BinningType, const DetId &) const
MEData const * data_
Definition: MESet.h:133
double ecaldqm::MESetDet1D::getBinContent ( DetId const &  _id,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 36 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinContent_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

37  {
38  find_(_id);
39 
40  if(cache_.second.size() == 0) return 0.;
41 
42  int bin(cache_.second[0]);
43 
45  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
46  bin += (_bin - 1) * nbinsX;
47  }
48 
49  return getBinContent_(cache_.first, bin);
50  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
virtual double getBinContent_(unsigned, int) const
Definition: MESet.cc:330
MEData const * data_
Definition: MESet.h:133
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
double ecaldqm::MESetDet1D::getBinContent ( unsigned  _dcctccid,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 53 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinContent_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

54  {
55  find_(_dcctccid);
56 
57  if(cache_.second.size() == 0) return 0.;
58 
59  int bin(cache_.second[0]);
60 
62  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
63  bin += (_bin - 1) * nbinsX;
64  }
65 
66  return getBinContent_(cache_.first, bin);
67  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
virtual double getBinContent_(unsigned, int) const
Definition: MESet.cc:330
MEData const * data_
Definition: MESet.h:133
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
double ecaldqm::MESetDet1D::getBinEntries ( DetId const &  _id,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 104 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinEntries_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

105  {
106  find_(_id);
107 
108  if(cache_.second.size() == 0) return 0.;
109 
110  int bin(cache_.second[0]);
111 
113  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
114  bin += (_bin - 1) * nbinsX;
115  }
116 
117  return getBinEntries_(cache_.first, bin);
118  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
MEData const * data_
Definition: MESet.h:133
virtual double getBinEntries_(unsigned, int) const
Definition: MESet.cc:362
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
double ecaldqm::MESetDet1D::getBinEntries ( unsigned  _dcctccid,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 121 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinEntries_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

122  {
123  find_(_dcctccid);
124 
125  if(cache_.second.size() == 0) return 0.;
126 
127  int bin(cache_.second[0]);
128 
130  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
131  bin += (_bin - 1) * nbinsX;
132  }
133 
134  return getBinEntries_(cache_.first, bin);
135  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
MEData const * data_
Definition: MESet.h:133
virtual double getBinEntries_(unsigned, int) const
Definition: MESet.cc:362
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
double ecaldqm::MESetDet1D::getBinError ( DetId const &  _id,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 70 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinError_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

71  {
72  find_(_id);
73 
74  if(cache_.second.size() == 0) return 0.;
75 
76  int bin(cache_.second[0]);
77 
79  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
80  bin += (_bin - 1) * nbinsX;
81  }
82 
83  return getBinError_(cache_.first, bin);
84  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
virtual double getBinError_(unsigned, int) const
Definition: MESet.cc:346
MEData const * data_
Definition: MESet.h:133
void find_(uint32_t) const
Definition: MESetDet1D.cc:138
double ecaldqm::MESetDet1D::getBinError ( unsigned  _dcctccid,
int  _bin = 0 
) const
virtual

Reimplemented from ecaldqm::MESet.

Definition at line 87 of file MESetDet1D.cc.

References newFWLiteAna::bin, ecaldqm::MESetEcal::cache_, ecaldqm::MESet::data_, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TPROFILE2D, find_(), ecaldqm::MESet::getBinError_(), ecaldqm::MEData::kind, and ecaldqm::MESet::mes_.

88  {
89  find_(_dcctccid);
90 
91  if(cache_.second.size() == 0) return 0.;
92 
93  int bin(cache_.second[0]);
94 
96  int nbinsX(mes_[cache_.first]->getTH1()->GetNbinsX());
97  bin += (_bin - 1) * nbinsX;
98  }
99 
100  return getBinError_(cache_.first, bin);
101  }
MonitorElement::Kind kind
Definition: MESet.h:24
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
virtual double getBinError_(unsigned, int) const
Definition: MESet.cc:346
MEData const * data_
Definition: MESet.h:133
void find_(uint32_t) const
Definition: MESetDet1D.cc:138