CMS 3D CMS Logo

HcalPedestal.h
Go to the documentation of this file.
1 #ifndef HcalPedestal_h
2 #define HcalPedestal_h
3 
13 #include <cstdint>
14 
15 class HcalPedestal {
16 public:
18  const float* getValues() const { return &mValue0; }
20  float getValue(int fCapId) const { return *(getValues() + fCapId); }
21 
23  const float* getWidths() const { return &mWidth0; }
25  float getWidth(int fCapId) const { return *(getWidths() + fCapId); }
26 
27  // functions below are not supposed to be used by consumer applications
28 
30  : mId(0), mValue0(0), mValue1(0), mValue2(0), mValue3(0), mWidth0(0), mWidth1(0), mWidth2(0), mWidth3(0) {}
31 
32  HcalPedestal(unsigned long fId,
33  float fCap0,
34  float fCap1,
35  float fCap2,
36  float fCap3,
37  float wCap0 = 0,
38  float wCap1 = 0,
39  float wCap2 = 0,
40  float wCap3 = 0)
41  : mId(fId),
42  mValue0(fCap0),
43  mValue1(fCap1),
44  mValue2(fCap2),
45  mValue3(fCap3),
46  mWidth0(wCap0),
47  mWidth1(wCap1),
48  mWidth2(wCap2),
49  mWidth3(wCap3) {}
50 
51  uint32_t rawId() const { return mId; }
52 
53 private:
54  uint32_t mId;
55  float mValue0;
56  float mValue1;
57  float mValue2;
58  float mValue3;
59  float mWidth0;
60  float mWidth1;
61  float mWidth2;
62  float mWidth3;
63 
65 };
66 
67 #endif
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalPedestal.h:20
uint32_t rawId() const
Definition: HcalPedestal.h:51
const float * getValues() const
get value for all capId = 0..3
Definition: HcalPedestal.h:18
HcalPedestal(unsigned long fId, float fCap0, float fCap1, float fCap2, float fCap3, float wCap0=0, float wCap1=0, float wCap2=0, float wCap3=0)
Definition: HcalPedestal.h:32
float getWidth(int fCapId) const
get width for capId = 0..3
Definition: HcalPedestal.h:25
const float * getWidths() const
get width for all capId = 0..3
Definition: HcalPedestal.h:23
#define COND_SERIALIZABLE
Definition: Serializable.h:39
uint32_t mId
Definition: HcalPedestal.h:54