CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/CondFormats/CastorObjects/interface/CastorPedestal.h

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