Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:13

0001 // -*- C++ -*-
0002 #ifndef HcalDcsValue_h
0003 #define HcalDcsValue_h
0004 
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006 
0007 #include <cstdint>
0008 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0009 
0010 class HcalDcsValue {
0011 public:
0012   HcalDcsValue();
0013   HcalDcsValue(uint32_t fid, int ls, float val, float upper, float lower);
0014   HcalDcsValue(HcalDcsValue const& other);
0015 
0016   virtual ~HcalDcsValue();
0017 
0018   uint32_t DcsId() const { return mId; }
0019   int LS() const { return mLS; }
0020   float getValue() const { return mValue; }
0021   float getUpperLimit() const { return mUpperLimit; }
0022   float getLowerLimit() const { return mLowerLimit; }
0023   bool isValueGood() const { return ((mValue <= mUpperLimit) && (mValue >= mLowerLimit)); }
0024 
0025   HcalOtherSubdetector getSubdetector() const;
0026 
0027   bool operator<(HcalDcsValue const& rhs) const {
0028     if (mId == rhs.mId)
0029       return (mLS < rhs.mLS);
0030     return (mId < rhs.mId);
0031   }
0032 
0033 private:
0034   uint32_t mId;
0035   int mLS;
0036   float mValue;
0037   float mUpperLimit;
0038   float mLowerLimit;
0039 
0040   COND_SERIALIZABLE;
0041 };
0042 
0043 #endif