CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/CondFormats/EcalObjects/interface/EcalPedestals.h

Go to the documentation of this file.
00001 #ifndef EcalPedestals_h
00002 #define EcalPedestals_h
00003 
00004 
00005 #include "CondFormats/EcalObjects/interface/EcalCondObjectContainer.h"
00006 
00007 struct EcalPedestal {
00008         struct Zero { float z1; float z2;};
00009 
00010         static Zero zero;
00011 
00012         float mean_x12;
00013         float rms_x12;
00014         float mean_x6;
00015         float rms_x6;
00016         float mean_x1;
00017         float rms_x1;
00018 
00019         public:
00020         float const * mean_rms(int i) const {
00021                 if (i==0) return &zero.z1;
00022                 return (&mean_x12)+(2*(i-1));
00023         }
00024 
00025         float mean(int i) const {
00026                 if (i==0) return 0.;
00027                 return *(&mean_x12+(2*(i-1)));
00028         }
00029 
00030         float rms(int i) const {
00031                 if (i==0) return 0.;
00032                 return *(&rms_x12+(2*(i-1)));
00033         }
00034 };
00035 
00036 typedef EcalCondObjectContainer<EcalPedestal> EcalPedestalsMap;
00037 typedef EcalPedestalsMap::const_iterator EcalPedestalsMapIterator;
00038 typedef EcalPedestalsMap EcalPedestals;
00039 
00040 #endif