CMS 3D CMS Logo

Averages.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommissioningSources_Averages_H
2 #define DQM_SiStripCommissioningSources_Averages_H
3 
5 #include <vector>
6 #include <map>
7 #include <cstdint>
8 
10 class Averages {
11 public:
12  Averages();
13  ~Averages() { ; }
14 
15  class Params {
16  public:
17  float mean_;
18  float median_;
19  float mode_;
20  float rms_;
21  float weight_;
22  float max_;
23  float min_;
24  uint32_t num_;
26  : mean_(1. * sistrip::invalid_),
27  median_(1. * sistrip::invalid_),
28  mode_(1. * sistrip::invalid_),
29  rms_(1. * sistrip::invalid_),
30  weight_(1. * sistrip::invalid_),
31  max_(-1. * sistrip::invalid_),
32  min_(1. * sistrip::invalid_),
34  ;
35  }
36  ~Params() { ; }
37  };
38 
40  void add(const float& value, const float& weight);
41  void add(const float& value);
43  void add(const uint32_t& value, const uint32_t& weight);
44  void add(const uint32_t& value);
45 
47  void calc(Params&);
48 
49 private:
50  uint32_t n_;
51  float s_;
52  float x_;
53  float xx_;
54  std::vector<float> median_;
55  std::map<uint32_t, uint32_t> mode_;
56 };
57 
58 #endif // DQM_SiStripCommissioningSources_Averages_H
float x_
Definition: Averages.h:52
Definition: weight.py:1
sistrip classes
std::map< uint32_t, uint32_t > mode_
Definition: Averages.h:55
void add(const float &value, const float &weight)
uint32_t n_
Definition: Averages.h:50
void calc(Params &)
Definition: Averages.cc:48
std::vector< float > median_
Definition: Averages.h:54
Definition: value.py:1
float s_
Definition: Averages.h:51
~Averages()
Definition: Averages.h:13
static const uint16_t invalid_
Definition: Constants.h:16
uint32_t num_
Definition: Averages.h:24
Averages()
Definition: Averages.cc:10
float xx_
Definition: Averages.h:53