CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch1/src/DQM/EcalCommon/interface/MESetChannel.h

Go to the documentation of this file.
00001 #ifndef MESetChannel_H
00002 #define MESetChannel_H
00003 
00004 #include <map>
00005 
00006 #include "MESet.h"
00007 
00008 namespace ecaldqm
00009 {
00010   class MESetChannel : public MESet
00011   {
00012   public :
00013     MESetChannel(std::string const&, MEData const&, bool _readOnly = false);
00014     ~MESetChannel();
00015 
00016     bool retrieve() const;
00017     void clear() const;
00018 
00019     void fill(DetId const&, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
00020     void fill(EcalElectronicsId const&, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
00021     //    void fill(int, double _w = 1., double _unused1 = 0., double _unused2 = 0.);
00022 
00023     void setBinContent(DetId const&, double, double _err = 0.);
00024     void setBinContent(EcalElectronicsId const&, double, double _err = 0.);
00025 
00026     void reset(double _content = 0., double _err = 0., double _entries = 0.);
00027 
00028     double getBinContent(DetId const&, int _bin = 0) const;
00029     double getBinContent(EcalElectronicsId const&, int _bin = 0) const;
00030     
00031     double getBinEntries(DetId const& _id, int _bin = 0) const { return getBinContent(_id, _bin); }
00032     double getBinEntries(EcalElectronicsId const& _id, int _bin = 0) const { return getBinContent(_id, _bin); }
00033 
00034     void checkDirectory() const;
00035 
00036   private :
00037     std::map<uint32_t, unsigned>::iterator append_(std::string const&, uint32_t);
00038     uint32_t getIndex_(DetId const&) const;
00039     uint32_t getIndex_(EcalElectronicsId const&) const;
00040 
00041     mutable std::vector<MonitorElement*> mes_;
00042     mutable std::map<uint32_t, unsigned> meTable_;
00043 
00044     // have readmode param for MESet and a parameter in the Ctor
00045     mutable bool readMode_;
00046   };
00047 }
00048 
00049 #endif