CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/CondFormats/HcalObjects/interface/HcalQIECoder.h

Go to the documentation of this file.
00001 #ifndef HcalQIECoder_h
00002 #define HcalQIECoder_h
00003 
00012 #include <boost/cstdint.hpp>
00013 
00014 #include <vector>
00015 #include <algorithm>
00016 
00017 class HcalQIEShape;
00018 
00019 class HcalQIECoder {
00020  public:
00021   HcalQIECoder (unsigned long fId = 0) : mId (fId) {}
00022 
00024   float charge (const HcalQIEShape& fShape, unsigned fAdc, unsigned fCapId) const;
00026   unsigned adc (const HcalQIEShape& fShape, float fCharge, unsigned fCapId) const;
00027 
00028   // following methods are not for use by consumers
00029   float offset (unsigned fCapId, unsigned fRange) const;
00030   float slope (unsigned fCapId, unsigned fRange) const;
00031   
00032   void setOffset (unsigned fCapId, unsigned fRange, float fValue);
00033   void setSlope (unsigned fCapId, unsigned fRange, float fValue);
00034 
00035   uint32_t rawId () const {return mId;}
00036 
00037  private:
00038   uint32_t mId;
00039   float mOffset00;
00040   float mOffset01; 
00041   float mOffset02; 
00042   float mOffset03; 
00043   float mOffset10; 
00044   float mOffset11; 
00045   float mOffset12; 
00046   float mOffset13; 
00047   float mOffset20; 
00048   float mOffset21; 
00049   float mOffset22; 
00050   float mOffset23; 
00051   float mOffset30; 
00052   float mOffset31; 
00053   float mOffset32; 
00054   float mOffset33; 
00055   float mSlope00; 
00056   float mSlope01; 
00057   float mSlope02;
00058   float mSlope03;
00059   float mSlope10;
00060   float mSlope11;
00061   float mSlope12;
00062   float mSlope13;
00063   float mSlope20;
00064   float mSlope21;
00065   float mSlope22;
00066   float mSlope23;
00067   float mSlope30;
00068   float mSlope31;
00069   float mSlope32;
00070   float mSlope33;
00071 };
00072 
00073 #endif