CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MESetDet0D.cc
Go to the documentation of this file.
2 
4 
5 namespace ecaldqm
6 {
7 
8  MESetDet0D::MESetDet0D(std::string const& _fullpath, MEData const& _data, bool _readOnly/* = false*/) :
9  MESetEcal(_fullpath, _data, 0, _readOnly)
10  {
11  }
12 
14  {
15  }
16 
17  void
18  MESetDet0D::fill(DetId const& _id, double _value, double, double)
19  {
20  unsigned offset(binService_->findOffset(data_->otype, _id));
21  if(offset >= mes_.size() || !mes_[offset])
22  throw cms::Exception("InvalidCall") << "ME array index overflow" << std::endl;
23 
24  mes_[offset]->Fill(_value);
25  }
26 
27  void
28  MESetDet0D::fill(unsigned _dcctccid, double _value, double, double)
29  {
30  unsigned offset(binService_->findOffset(data_->otype, data_->btype, _dcctccid));
31  if(offset >= mes_.size() || !mes_[offset])
32  throw cms::Exception("InvalidCall") << "ME array index overflow" << offset << std::endl;
33 
34  mes_[offset]->Fill(_value);
35  }
36 
37  void
38  MESetDet0D::fill(double _value, double, double)
39  {
40  if(!(data_->otype == BinService::kEcal && mes_.size() == 1))
41  throw cms::Exception("InvalidCall") << "ME type incompatible";
42 
43  mes_[0]->Fill(_value);
44  }
45 
46 }
BinService::ObjectType otype
Definition: MESet.h:22
void fill(DetId const &, double, double _unused1=0., double _unused2=0.)
Definition: MESetDet0D.cc:18
std::vector< MonitorElement * > mes_
Definition: MESet.h:129
MESetDet0D(std::string const &, MEData const &, bool _readOnly=false)
Definition: MESetDet0D.cc:8
unsigned findOffset(ObjectType, const DetId &) const
BinService::BinningType btype
Definition: MESet.h:23
unsigned int offset(bool)
Definition: DetId.h:18
static BinService const * binService_
Definition: MESet.h:126
MEData const * data_
Definition: MESet.h:133