CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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), mQIEIndex(0) {}
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   uint32_t qieIndex() const {return mQIEIndex;}
00038   void setQIEIndex(uint32_t v) { mQIEIndex=v;}
00039 
00040  private:
00041   uint32_t mId;
00042   float mOffset00;
00043   float mOffset01; 
00044   float mOffset02; 
00045   float mOffset03; 
00046   float mOffset10; 
00047   float mOffset11; 
00048   float mOffset12; 
00049   float mOffset13; 
00050   float mOffset20; 
00051   float mOffset21; 
00052   float mOffset22; 
00053   float mOffset23; 
00054   float mOffset30; 
00055   float mOffset31; 
00056   float mOffset32; 
00057   float mOffset33; 
00058   float mSlope00; 
00059   float mSlope01; 
00060   float mSlope02;
00061   float mSlope03;
00062   float mSlope10;
00063   float mSlope11;
00064   float mSlope12;
00065   float mSlope13;
00066   float mSlope20;
00067   float mSlope21;
00068   float mSlope22;
00069   float mSlope23;
00070   float mSlope30;
00071   float mSlope31;
00072   float mSlope32;
00073   float mSlope33;
00074   unsigned int mQIEIndex;
00075 };
00076 
00077 #endif