Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondFormats_EcalObject_EcalLiteDTUPedestals_h
0002 #define CondFormats_EcalObject_EcalLiteDTUPedestals_h
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 #include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
0006 #include "DataFormats/EcalDigi/interface/EcalConstants.h"
0007 
0008 class EcalLiteDTUPedestals {
0009 public:
0010   int setMean(unsigned int i, float value) {
0011     if (i >= ecalPh2::NGAINS)
0012       return -1;
0013     else
0014       meanarray[i] = value;
0015     return 1;
0016   }
0017 
0018   int setRMS(unsigned int i, float value) {
0019     if (i >= ecalPh2::NGAINS)
0020       return -1;
0021     else
0022       rmsarray[i] = value;
0023     return 1;
0024   }
0025 
0026   float mean(unsigned int i) const { return meanarray[i]; }
0027 
0028   float rms(unsigned int i) const { return rmsarray[i]; }
0029 
0030 private:
0031   float meanarray[ecalPh2::NGAINS] = {13., 8.};
0032   float rmsarray[ecalPh2::NGAINS] = {2.8, 1.2};
0033   COND_SERIALIZABLE;
0034 };
0035 
0036 typedef EcalCondObjectContainer<EcalLiteDTUPedestals> EcalLiteDTUPedestalsMap;
0037 typedef EcalLiteDTUPedestalsMap::const_iterator EcalLiteDTUPedestalsMapIterator;
0038 
0039 #endif