CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CastorCalibrationQIECoder.h
Go to the documentation of this file.
1 #ifndef CastorCalibrationQIECoder_h
2 #define CastorCalibrationQIECoder_h
3 
12 
13 #include <vector>
14 #include <algorithm>
15 #include <cstdint>
16 
18 public:
19  CastorCalibrationQIECoder(unsigned long fId = 0) : mId(fId) {}
21  float charge(const unsigned fAdc) const;
23  unsigned adc(const float fCharge) const;
24 
25  // following methods are not for use by consumers
26  float minCharge(unsigned fBin) const;
27  // 32 values
28  const float* minCharges() const;
29  void setMinCharge(unsigned fBin, float fValue);
30  void setMinCharges(const float fValue[32]);
31  uint32_t rawId() const { return mId; }
32 
33 private:
34  uint32_t mId;
35  float bin0;
36  float bin1;
37  float bin2;
38  float bin3;
39  float bin4;
40  float bin5;
41  float bin6;
42  float bin7;
43  float bin8;
44  float bin9;
45  float bin10;
46  float bin11;
47  float bin12;
48  float bin13;
49  float bin14;
50  float bin15;
51  float bin16;
52  float bin17;
53  float bin18;
54  float bin19;
55  float bin20;
56  float bin21;
57  float bin22;
58  float bin23;
59  float bin24;
60  float bin25;
61  float bin26;
62  float bin27;
63  float bin28;
64  float bin29;
65  float bin30;
66  float bin31;
67  const float* base() const { return &bin0; }
68  float* base() { return &bin0; }
69 
71 };
72 
73 #endif
CastorCalibrationQIECoder(unsigned long fId=0)
void setMinCharges(const float fValue[32])
void setMinCharge(unsigned fBin, float fValue)
float minCharge(unsigned fBin) const
unsigned adc(const float fCharge) const
fC -&gt; ADC conversion
float charge(const unsigned fAdc) const
ADC [0..31] -&gt; fC conversion.
#define COND_SERIALIZABLE
Definition: Serializable.h:39