CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalPedestals.h
Go to the documentation of this file.
1 #ifndef EcalPedestals_h
2 #define EcalPedestals_h
3 
4 
6 
7 struct EcalPedestal {
9  : mean_x12(0),
10  rms_x12(0),
11  mean_x6(0),
12  rms_x6(0),
13  mean_x1(0),
14  rms_x1(0) {}
15 
16  struct Zero {
17  Zero() : z1 (0), z2(0) {}
18  float z1; float z2;
19  };
20 
21  static const Zero zero;
22 
23  float mean_x12;
24  float rms_x12;
25  float mean_x6;
26  float rms_x6;
27  float mean_x1;
28  float rms_x1;
29 
30  public:
31  float const * mean_rms(int i) const {
32  if (i==0) return &zero.z1;
33  return (&mean_x12)+(2*(i-1));
34  }
35 
36  float mean(int i) const {
37  if (i==0) return 0.;
38  return *(&mean_x12+(2*(i-1)));
39  }
40 
41  float rms(int i) const {
42  if (i==0) return 0.;
43  return *(&rms_x12+(2*(i-1)));
44  }
45 };
46 
50 
51 #endif
int i
Definition: DBlmapReader.cc:9
EcalCondObjectContainer< EcalPedestal > EcalPedestalsMap
Definition: EcalPedestals.h:47
float const * mean_rms(int i) const
Definition: EcalPedestals.h:31
EcalPedestalsMap::const_iterator EcalPedestalsMapIterator
Definition: EcalPedestals.h:48
static const Zero zero
Definition: EcalPedestals.h:21
float mean(int i) const
Definition: EcalPedestals.h:36
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:49
float rms(int i) const
Definition: EcalPedestals.h:41
std::vector< Item >::const_iterator const_iterator