CMS 3D CMS Logo

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