Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HcalGain_h
0002 #define HcalGain_h
0003 
0004 /** 
0005 \class HcalGain
0006 \author Fedor Ratnikov (UMd)
0007 POOL object to store Gain values 4xCapId
0008 $Author: ratnikov
0009 $Date: 2007/12/10 18:36:56 $
0010 $Revision: 1.5 $
0011 */
0012 
0013 #include "CondFormats/Serialization/interface/Serializable.h"
0014 #include <cstdint>
0015 
0016 class HcalGain {
0017 public:
0018   /// get value for all capId = 0..3
0019   const float* getValues() const { return &mValue0; }
0020   /// get value for capId = 0..3
0021   float getValue(int fCapId) const { return *(getValues() + fCapId); }
0022 
0023   // functions below are not supposed to be used by consumer applications
0024 
0025   HcalGain() : mId(0), mValue0(0), mValue1(0), mValue2(0), mValue3(0) {}
0026 
0027   HcalGain(unsigned long fId, float fCap0, float fCap1, float fCap2, float fCap3)
0028       : mId(fId), mValue0(fCap0), mValue1(fCap1), mValue2(fCap2), mValue3(fCap3) {}
0029 
0030   uint32_t rawId() const { return mId; }
0031 
0032 private:
0033   uint32_t mId;
0034   float mValue0;
0035   float mValue1;
0036   float mValue2;
0037   float mValue3;
0038 
0039   COND_SERIALIZABLE;
0040 };
0041 
0042 #endif