CMS 3D CMS Logo

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