Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:53

0001 #ifndef CastorRawGain_h
0002 #define CastorRawGain_h
0003 
0004 /** 
0005 \class CastorRawGain
0006 \author Panos Katsas (UoA)
0007 POOL object to store raw Gain values
0008 */
0009 #include <string>
0010 #include <cstdint>
0011 
0012 class CastorRawGain {
0013 public:
0014   enum Status { GOOD = 0, BAD = 1 };
0015   float getValue() const { return mValue; }
0016   float getError() const { return mError; }
0017   float getVoltage() const { return mVoltage; }
0018   Status getStatus() const { return Status(mStatus); }
0019   std::string strStatus() const { return getStatus() == GOOD ? "GOOD" : "BAD"; }
0020 
0021   CastorRawGain(unsigned long fId = 0) : mId(fId), mValue(0), mError(0), mVoltage(0), mStatus(int(BAD)) {}
0022 
0023   CastorRawGain(unsigned long fId, float fValue, float fError, float fVoltage, Status fStatus)
0024       : mId(fId), mValue(fValue), mError(fError), mVoltage(fVoltage), mStatus(int(fStatus)) {}
0025 
0026   uint32_t rawId() const { return mId; }
0027 
0028 private:
0029   uint32_t mId;
0030   float mValue;
0031   float mError;
0032   float mVoltage;
0033   int mStatus;
0034 };
0035 
0036 #endif