CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MESetChannel.h
Go to the documentation of this file.
1 #ifndef MESetChannel_H
2 #define MESetChannel_H
3 
4 #include <map>
5 
6 #include "MESet.h"
7 
8 namespace ecaldqm
9 {
10  class MESetChannel : public MESet
11  {
12  public :
13  MESetChannel(std::string const&, MEData const&, bool _readOnly = false);
14  ~MESetChannel();
15 
16  bool retrieve() const;
17  void clear() const;
18 
19  void fill(DetId const&, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
20  void fill(EcalElectronicsId const&, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
21  // void fill(int, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
22 
23  void setBinContent(DetId const&, double, double _err = 0.);
24  void setBinContent(EcalElectronicsId const&, double, double _err = 0.);
25 
26  void reset(double _content = 0., double _err = 0., double _entries = 0.);
27 
28  double getBinContent(DetId const&, int _bin = 0) const;
29  double getBinContent(EcalElectronicsId const&, int _bin = 0) const;
30 
31  double getBinEntries(DetId const& _id, int _bin = 0) const { return getBinContent(_id, _bin); }
32  double getBinEntries(EcalElectronicsId const& _id, int _bin = 0) const { return getBinContent(_id, _bin); }
33 
34  void checkDirectory() const;
35 
36  private :
37  std::map<uint32_t, unsigned>::iterator append_(std::string const&, uint32_t);
38  uint32_t getIndex_(DetId const&) const;
39  uint32_t getIndex_(EcalElectronicsId const&) const;
40 
41  mutable std::vector<MonitorElement*> mes_;
42  mutable std::map<uint32_t, unsigned> meTable_;
43 
44  // have readmode param for MESet and a parameter in the Ctor
45  mutable bool readMode_;
46  };
47 }
48 
49 #endif
void reset(double _content=0., double _err=0., double _entries=0.)
Definition: MESetChannel.cc:99
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
std::map< uint32_t, unsigned > meTable_
Definition: MESetChannel.h:42
std::vector< MonitorElement * > mes_
Definition: MESetChannel.h:41
double getBinEntries(EcalElectronicsId const &_id, int _bin=0) const
Definition: MESetChannel.h:32
std::map< uint32_t, unsigned >::iterator append_(std::string const &, uint32_t)
bool retrieve() const
Definition: MESetChannel.cc:21
uint32_t getIndex_(DetId const &) const
double getBinContent(DetId const &, int _bin=0) const
void checkDirectory() const
Definition: DetId.h:20
void clear() const
Definition: MESetChannel.cc:28
MESetChannel(std::string const &, MEData const &, bool _readOnly=false)
Definition: MESetChannel.cc:10
void fill(DetId const &, double _w=1., double _unused1=0., double _unused2=0.)
Definition: MESetChannel.cc:37
double getBinEntries(DetId const &_id, int _bin=0) const
Definition: MESetChannel.h:31
void setBinContent(DetId const &, double, double _err=0.)
Definition: MESetChannel.cc:67