CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MESetEcal.h
Go to the documentation of this file.
1 #ifndef MESetEcal_H
2 #define MESetEcal_H
3 
4 #include "MESet.h"
5 
6 namespace ecaldqm
7 {
8 
9  class MESetEcal : public MESet
10  {
11  public :
12  MESetEcal(std::string const&, MEData const&, int logicalDimensions_, bool _readOnly = false);
13  ~MESetEcal();
14 
15  void book();
16  bool retrieve() const;
17 
18  void fill(DetId const&, double _wx = 1., double _wy = 1., double _w = 1.);
19  void fill(unsigned, double _wx = 1., double _wy = 1., double _w = 1.);
20  void fill(double, double _wy = 1., double _w = 1.);
21 
22  void setBinContent(DetId const&, double, double _err = 0.);
23  void setBinContent(unsigned, double, double _err = 0.);
24 
25  void setBinEntries(DetId const&, double);
26  void setBinEntries(unsigned, double);
27 
28  double getBinContent(DetId const&, int _bin = 0) const;
29  double getBinContent(unsigned, int _bin = 0) const;
30 
31  double getBinError(DetId const&, int _bin = 0) const;
32  double getBinError(unsigned, int _bin = 0) const;
33 
34  double getBinEntries(DetId const&, int _bin = 0) const;
35  double getBinEntries(unsigned, int _bin = 0) const;
36 
37  void reset(double _content = 0., double _err = 0., double _entries = 0.);
38 
39  std::vector<std::string> generateNames() const;
40 
41  protected :
42  virtual void find_(uint32_t) const;
43  virtual void fill_(double); // method for derived classes
44 
45  const unsigned logicalDimensions_;
46 
47  mutable uint32_t cacheId_;
48  mutable std::pair<unsigned, std::vector<int> > cache_;
49  };
50 
51 }
52 
53 #endif
const unsigned logicalDimensions_
Definition: MESetEcal.h:45
void fill(DetId const &, double _wx=1., double _wy=1., double _w=1.)
Definition: MESetEcal.cc:221
uint32_t cacheId_
Definition: MESetEcal.h:47
std::vector< std::string > generateNames() const
Definition: MESetEcal.cc:402
double getBinEntries(DetId const &, int _bin=0) const
Definition: MESetEcal.cc:331
virtual void fill_(double)
Definition: MESetEcal.cc:491
bool retrieve() const
Definition: MESetEcal.cc:200
MESetEcal(std::string const &, MEData const &, int logicalDimensions_, bool _readOnly=false)
Definition: MESetEcal.cc:12
double getBinContent(DetId const &, int _bin=0) const
Definition: MESetEcal.cc:291
std::pair< unsigned, std::vector< int > > cache_
Definition: MESetEcal.h:48
void reset(double _content=0., double _err=0., double _entries=0.)
Definition: MESetEcal.cc:351
Definition: DetId.h:18
double getBinError(DetId const &, int _bin=0) const
Definition: MESetEcal.cc:311
void setBinContent(DetId const &, double, double _err=0.)
Definition: MESetEcal.cc:251
void setBinEntries(DetId const &, double)
Definition: MESetEcal.cc:271
virtual void find_(uint32_t) const
Definition: MESetEcal.cc:470