CMS 3D CMS Logo

HcalRawGain.h
Go to the documentation of this file.
1 #ifndef HcalRawGain_h
2 #define HcalRawGain_h
3 
12 #include <string>
13 #include <cstdint>
14 
15 class HcalRawGain {
16 public:
17  enum Status { GOOD = 0, BAD = 1 };
18  float getValue() const { return mValue; }
19  float getError() const { return mError; }
20  float getVoltage() const { return mVoltage; }
21  Status getStatus() const { return Status(mStatus); }
22  std::string strStatus() const { return getStatus() == GOOD ? "GOOD" : "BAD"; }
23 
24  HcalRawGain(unsigned long fId = 0) : mId(fId), mValue(0), mError(0), mVoltage(0), mStatus(int(BAD)) {}
25 
26  HcalRawGain(unsigned long fId, float fValue, float fError, float fVoltage, Status fStatus)
27  : mId(fId), mValue(fValue), mError(fError), mVoltage(fVoltage), mStatus(int(fStatus)) {}
28 
29  uint32_t rawId() const { return mId; }
30 
31 private:
32  uint32_t mId;
33  float mValue;
34  float mError;
35  float mVoltage;
36  int mStatus;
37 };
38 
39 #endif
std::string strStatus() const
Definition: HcalRawGain.h:22
HcalRawGain(unsigned long fId, float fValue, float fError, float fVoltage, Status fStatus)
Definition: HcalRawGain.h:26
HcalRawGain(unsigned long fId=0)
Definition: HcalRawGain.h:24
float getVoltage() const
Definition: HcalRawGain.h:20
uint32_t mId
Definition: HcalRawGain.h:32
float getError() const
Definition: HcalRawGain.h:19
float mError
Definition: HcalRawGain.h:34
float mValue
Definition: HcalRawGain.h:33
uint32_t rawId() const
Definition: HcalRawGain.h:29
float mVoltage
Definition: HcalRawGain.h:35
Status getStatus() const
Definition: HcalRawGain.h:21
float getValue() const
Definition: HcalRawGain.h:18