00001 #ifndef CastorRawGain_h 00002 #define CastorRawGain_h 00003 00009 #include <boost/cstdint.hpp> 00010 00011 class CastorRawGain { 00012 public: 00013 enum Status {GOOD = 0, BAD = 1}; 00014 float getValue () const {return mValue;} 00015 float getError () const {return mError;} 00016 float getVoltage () const {return mVoltage;} 00017 Status getStatus () const {return Status (mStatus);} 00018 std::string strStatus () const {return getStatus () == GOOD ? "GOOD" : "BAD";} 00019 00020 00021 CastorRawGain (unsigned long fId = 0) : mId (fId), mValue (0), mError (0), mVoltage (0), mStatus (int (BAD)) {} 00022 00023 CastorRawGain (unsigned long fId, float fValue, float fError, float fVoltage, Status fStatus) : 00024 mId (fId), 00025 mValue (fValue), 00026 mError (fError), 00027 mVoltage (fVoltage), 00028 mStatus (int (fStatus)) {} 00029 00030 uint32_t rawId () const {return mId;} 00031 00032 private: 00033 uint32_t mId; 00034 float mValue; 00035 float mError; 00036 float mVoltage; 00037 int mStatus; 00038 }; 00039 00040 #endif