File indexing completed on 2024-04-06 12:02:13
0001 #ifndef HcalPedestal_h
0002 #define HcalPedestal_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "CondFormats/Serialization/interface/Serializable.h"
0013 #include <cstdint>
0014
0015 class HcalPedestal {
0016 public:
0017
0018 const float* getValues() const { return &mValue0; }
0019
0020 float getValue(int fCapId) const { return *(getValues() + fCapId); }
0021
0022
0023 const float* getWidths() const { return &mWidth0; }
0024
0025 float getWidth(int fCapId) const { return *(getWidths() + fCapId); }
0026
0027
0028
0029 HcalPedestal()
0030 : mId(0), mValue0(0), mValue1(0), mValue2(0), mValue3(0), mWidth0(0), mWidth1(0), mWidth2(0), mWidth3(0) {}
0031
0032 HcalPedestal(unsigned long fId,
0033 float fCap0,
0034 float fCap1,
0035 float fCap2,
0036 float fCap3,
0037 float wCap0 = 0,
0038 float wCap1 = 0,
0039 float wCap2 = 0,
0040 float wCap3 = 0)
0041 : mId(fId),
0042 mValue0(fCap0),
0043 mValue1(fCap1),
0044 mValue2(fCap2),
0045 mValue3(fCap3),
0046 mWidth0(wCap0),
0047 mWidth1(wCap1),
0048 mWidth2(wCap2),
0049 mWidth3(wCap3) {}
0050
0051 uint32_t rawId() const { return mId; }
0052
0053 private:
0054 uint32_t mId;
0055 float mValue0;
0056 float mValue1;
0057 float mValue2;
0058 float mValue3;
0059 float mWidth0;
0060 float mWidth1;
0061 float mWidth2;
0062 float mWidth3;
0063
0064 COND_SERIALIZABLE;
0065 };
0066
0067 #endif