CMS 3D CMS Logo

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