BAT  0.9.4
The Bayesian analysis toolkit
 All Classes Namespaces Functions Variables Enumerations
BCMVCMeasurement.h
1 /*
2  * Copyright (C) 2007-2014, the BAT core developer team
3  * All rights reserved.
4  *
5  * For the licensing terms see doc/COPYING.
6  * For documentation see http://mpp.mpg.de/bat
7  */
8 
9 // ---------------------------------------------------------
10 
11 #ifndef __BCMVCMEASUREMENT__H
12 #define __BCMVCMEASUREMENT__H
13 
14 #include <string>
15 #include <vector>
16 
17 // ---------------------------------------------------------
19 {
20  public:
21 
22  // constructor
23  // name: the name of the measurement
24  BCMVCMeasurement(std::string name);
25 
26  // destructor
28 
29  // getters
30 
31  // return the name of the observable
32  std::string GetName()
33  { return fName; };
34 
35  // return the index of the observable
36  int GetObservable()
37  { return fObservable; };
38 
39  // return the central value
40  double GetCentralValue()
41  { return fCentralValue; };
42 
43  // return the set of uncertainties
44  std::vector<double> GetUncertainties()
45  { return fUncertainties; };
46 
47  // return a single uncertainty
48  double GetUncertainty(int index)
49  { return fUncertainties.at(index); };
50 
51  // return the total uncertainty
52  double GetTotalUncertainty();
53 
54  // return the flag if the measurement is active or not
55  bool GetFlagActive()
56  { return fFlagActive; };
57 
58  // setters
59 
60  // set the (index of the) observable this measurement corresponds to
61  void SetObservable(int index)
62  { fObservable = index; };
63 
64  // set the central value of the measurement
65  void SetCentralValue(double value)
66  { fCentralValue = value; };
67 
68  // set the uncertainties on the measurement
69  void SetUncertainties(std::vector<double> uncertainties)
70  { fUncertainties = uncertainties; };
71 
72  // set flag if measurement is active for the combination
73  void SetFlagActive(bool flag)
74  { fFlagActive = flag; };
75 
76  private:
77 
78  // the name of the measurement
79  std::string fName;
80 
81  // the (index of the) observale this measurement corresponds to
82  int fObservable;
83 
84  // the central value of the measurement
85  double fCentralValue;
86 
87  // the uncertainties on the measurements
88  std::vector<double> fUncertainties;
89 
90  // flag: active in combination (true) or not (false)
91  bool fFlagActive;
92 
93 };
94 // ---------------------------------------------------------
95 
96 #endif
97