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
HcalPedestal::HcalPedestal
HcalPedestal()
Definition: HcalPedestal.h:29
HcalPedestal::mWidth2
float mWidth2
Definition: HcalPedestal.h:61
HcalPedestal::getValues
const float * getValues() const
get value for all capId = 0..3
Definition: HcalPedestal.h:18
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
HcalPedestal::mValue3
float mValue3
Definition: HcalPedestal.h:58
HcalPedestal::mWidth3
float mWidth3
Definition: HcalPedestal.h:62
HcalPedestal::mValue1
float mValue1
Definition: HcalPedestal.h:56
HcalPedestal::mWidth1
float mWidth1
Definition: HcalPedestal.h:60
HcalPedestal::rawId
uint32_t rawId() const
Definition: HcalPedestal.h:51
HcalPedestal::HcalPedestal
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
HcalPedestal::mValue0
float mValue0
Definition: HcalPedestal.h:55
HcalPedestal
Definition: HcalPedestal.h:15
HcalPedestal::getWidth
float getWidth(int fCapId) const
get width for capId = 0..3
Definition: HcalPedestal.h:25
Serializable.h
HcalPedestal::mWidth0
float mWidth0
Definition: HcalPedestal.h:59
HcalPedestal::getWidths
const float * getWidths() const
get width for all capId = 0..3
Definition: HcalPedestal.h:23
HcalPedestal::mId
uint32_t mId
Definition: HcalPedestal.h:54
HcalPedestal::mValue2
float mValue2
Definition: HcalPedestal.h:57
HcalPedestal::getValue
float getValue(int fCapId) const
get value for capId = 0..3
Definition: HcalPedestal.h:20