test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HcalQIECoder.h
Go to the documentation of this file.
1 #ifndef HcalQIECoder_h
2 #define HcalQIECoder_h
3 
13 
14 #include <boost/cstdint.hpp>
15 
16 #include <vector>
17 #include <algorithm>
18 
19 class HcalQIEShape;
20 
21 class HcalQIECoder {
22  public:
23  HcalQIECoder (unsigned long fId = 0) : mId (fId), mQIEIndex(0) {}
24 
26  float charge (const HcalQIEShape& fShape, unsigned fAdc, unsigned fCapId) const;
28  unsigned adc (const HcalQIEShape& fShape, float fCharge, unsigned fCapId) const;
29 
30  // following methods are not for use by consumers
31  float offset (unsigned fCapId, unsigned fRange) const;
32  float slope (unsigned fCapId, unsigned fRange) const;
33 
34  void setOffset (unsigned fCapId, unsigned fRange, float fValue);
35  void setSlope (unsigned fCapId, unsigned fRange, float fValue);
36 
37  uint32_t rawId () const {return mId;}
38 
39  uint32_t qieIndex() const {return mQIEIndex;}
40  void setQIEIndex(uint32_t v) { mQIEIndex=v;}
41 
42  private:
43  uint32_t mId;
44  float mOffset00;
45  float mOffset01;
46  float mOffset02;
47  float mOffset03;
48  float mOffset10;
49  float mOffset11;
50  float mOffset12;
51  float mOffset13;
52  float mOffset20;
53  float mOffset21;
54  float mOffset22;
55  float mOffset23;
56  float mOffset30;
57  float mOffset31;
58  float mOffset32;
59  float mOffset33;
60  float mSlope00;
61  float mSlope01;
62  float mSlope02;
63  float mSlope03;
64  float mSlope10;
65  float mSlope11;
66  float mSlope12;
67  float mSlope13;
68  float mSlope20;
69  float mSlope21;
70  float mSlope22;
71  float mSlope23;
72  float mSlope30;
73  float mSlope31;
74  float mSlope32;
75  float mSlope33;
76  unsigned int mQIEIndex COND_TRANSIENT;
77 
79 };
80 
81 #endif
float mOffset21
Definition: HcalQIECoder.h:53
float mOffset10
Definition: HcalQIECoder.h:48
float slope(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:54
uint32_t qieIndex() const
Definition: HcalQIECoder.h:39
float mSlope30
Definition: HcalQIECoder.h:72
float mOffset12
Definition: HcalQIECoder.h:50
float mOffset11
Definition: HcalQIECoder.h:49
float mOffset32
Definition: HcalQIECoder.h:58
float mSlope20
Definition: HcalQIECoder.h:68
float mSlope12
Definition: HcalQIECoder.h:66
float mSlope22
Definition: HcalQIECoder.h:70
float mSlope21
Definition: HcalQIECoder.h:69
void setOffset(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:58
float mSlope23
Definition: HcalQIECoder.h:71
uint32_t rawId() const
Definition: HcalQIECoder.h:37
float mOffset22
Definition: HcalQIECoder.h:54
float offset(unsigned fCapId, unsigned fRange) const
Definition: HcalQIECoder.cc:50
float mSlope13
Definition: HcalQIECoder.h:67
float mSlope33
Definition: HcalQIECoder.h:75
HcalQIECoder(unsigned long fId=0)
Definition: HcalQIECoder.h:23
float mSlope03
Definition: HcalQIECoder.h:63
float mOffset31
Definition: HcalQIECoder.h:57
void setQIEIndex(uint32_t v)
Definition: HcalQIECoder.h:40
#define COND_TRANSIENT
Definition: Serializable.h:60
float mOffset03
Definition: HcalQIECoder.h:47
float mOffset30
Definition: HcalQIECoder.h:56
uint32_t mId
Definition: HcalQIECoder.h:43
float mOffset13
Definition: HcalQIECoder.h:51
#define COND_SERIALIZABLE
Definition: Serializable.h:37
float mSlope01
Definition: HcalQIECoder.h:61
unsigned int mQIEIndex
Definition: HcalQIECoder.h:76
float mOffset02
Definition: HcalQIECoder.h:46
float mSlope32
Definition: HcalQIECoder.h:74
float mOffset01
Definition: HcalQIECoder.h:45
unsigned adc(const HcalQIEShape &fShape, float fCharge, unsigned fCapId) const
fC + capid [0..3] -&gt; ADC conversion
Definition: HcalQIECoder.cc:27
float mSlope11
Definition: HcalQIECoder.h:65
float mSlope31
Definition: HcalQIECoder.h:73
float mSlope10
Definition: HcalQIECoder.h:64
float mOffset33
Definition: HcalQIECoder.h:59
float mOffset23
Definition: HcalQIECoder.h:55
void setSlope(unsigned fCapId, unsigned fRange, float fValue)
Definition: HcalQIECoder.cc:67
float mOffset20
Definition: HcalQIECoder.h:52
float mSlope02
Definition: HcalQIECoder.h:62
float mOffset00
Definition: HcalQIECoder.h:44
float mSlope00
Definition: HcalQIECoder.h:60
float charge(const HcalQIEShape &fShape, unsigned fAdc, unsigned fCapId) const
ADC [0..127] + capid [0..3] -&gt; fC conversion.
Definition: HcalQIECoder.cc:22