Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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