CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/CondFormats/HcalObjects/interface/HcalPedestal.h

Go to the documentation of this file.
00001 #ifndef HcalPedestal_h
00002 #define HcalPedestal_h
00003 
00012 #include <boost/cstdint.hpp>
00013 
00014 class HcalPedestal {
00015  public:
00017   const float* getValues () const {return &mValue0;}
00019   float getValue (int fCapId) const {return *(getValues () + fCapId);}
00020 
00022   const float* getWidths () const {return &mWidth0;}
00024   float getWidth (int fCapId) const {return *(getWidths () + fCapId);}
00025 
00026   // functions below are not supposed to be used by consumer applications
00027 
00028   HcalPedestal () : mId (0), mValue0 (0), mValue1 (0), mValue2 (0), mValue3 (0), 
00029     mWidth0 (0), mWidth1 (0), mWidth2 (0), mWidth3 (0) {}
00030   
00031   HcalPedestal (unsigned long fId, float fCap0, float fCap1, float fCap2, float fCap3,
00032                 float wCap0 = 0, float wCap1 = 0, float wCap2 = 0, float wCap3 = 0) :
00033   mId (fId), mValue0 (fCap0), mValue1 (fCap1), mValue2 (fCap2), mValue3 (fCap3),
00034     mWidth0 (wCap0), mWidth1 (wCap1), mWidth2 (wCap2), mWidth3 (wCap3) {}
00035 
00036     uint32_t rawId () const {return mId;}
00037  private:
00038   uint32_t mId;
00039   float mValue0;
00040   float mValue1;
00041   float mValue2;
00042   float mValue3;
00043   float mWidth0;
00044   float mWidth1;
00045   float mWidth2;
00046   float mWidth3;
00047 };
00048 
00049 #endif