Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:09

0001 #ifndef HcalRawGain_h
0002 #define HcalRawGain_h
0003 
0004 /** 
0005 \class HcalRawGain
0006 \author Fedor Ratnikov (UMd)
0007 POOL object to store raw Gain values
0008 $Author: ratnikov
0009 $Date: 2007/12/10 18:38:20 $
0010 $Revision: 1.4 $
0011 */
0012 #include <string>
0013 #include <cstdint>
0014 
0015 class HcalRawGain {
0016 public:
0017   enum Status { GOOD = 0, BAD = 1 };
0018   float getValue() const { return mValue; }
0019   float getError() const { return mError; }
0020   float getVoltage() const { return mVoltage; }
0021   Status getStatus() const { return Status(mStatus); }
0022   std::string strStatus() const { return getStatus() == GOOD ? "GOOD" : "BAD"; }
0023 
0024   HcalRawGain(unsigned long fId = 0) : mId(fId), mValue(0), mError(0), mVoltage(0), mStatus(int(BAD)) {}
0025 
0026   HcalRawGain(unsigned long fId, float fValue, float fError, float fVoltage, Status fStatus)
0027       : mId(fId), mValue(fValue), mError(fError), mVoltage(fVoltage), mStatus(int(fStatus)) {}
0028 
0029   uint32_t rawId() const { return mId; }
0030 
0031 private:
0032   uint32_t mId;
0033   float mValue;
0034   float mError;
0035   float mVoltage;
0036   int mStatus;
0037 };
0038 
0039 #endif