simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TSParameter.h
1 /*
2  * TSParameter.h
3  *
4  * Created on: May 26, 2014
5  * Author: sdiluise
6  */
27 #ifndef TSPARAMETER_H_
28 #define TSPARAMETER_H_
29 
30 #include <string>
31 
32 #include <TString.h>
33 
34 #include "TSArgList.h"
35 
36 #include "TSVariable.h"
37 
38 
39 class TSParameter: public TSVariable {
40 
41 
42 public:
43 
44  TSParameter();
45  TSParameter(TString name, TString label, TString title, TString unit="");
46  TSParameter(const TSParameter &);
47  virtual ~TSParameter();
48 
49 
50  void Clear();
51  void ClearError();
52  void ClearAsymErrors();
53  void Copy(const TSParameter &);
54  virtual TSParameter* Clone(TString name,int);
55  virtual TObject* Clone(const char* name="");
56 
57  void Fix();
58  virtual double GetError() const {return fError;}
59  virtual double GetErrorLow() const {return fErrLow;}
60  virtual double GetErrorUp() const {return fErrUp;}
61  virtual double GetErrorFrac() const;
62  virtual double GetPrecision() const {return fPrec;}
63  virtual double GetStep() const {return fStep;}
64 
65  bool HasAsymErrors() const {return fHasAsymErrors;}
66  bool HasError() const {return fHasError;}
67  bool IsFixed() const {return fIsFixed;}
68 
69  void Init();
70 
71  void Print() const;
72  void Release();
73  void SetAsymErrors(double err_low,double err_up);
74  void SetError(double err);
75  void SetFixed(double);
76  void SetPrecision(double);
77  void SetStep(double s);
78 
79  virtual bool SetFunction(TString expr,const TSArgList &) {}
80 
81  TSArgList* GetPrimaryParamList() const;
82  void PrintPrimaryParamList() const;
83  int GetNumOfPrimPars() const {return fPrimaryParamList->GetSize();}
84 
85 private:
86 
87  double fError;
88  double fErrLow;
89  double fErrUp;
90  double fPrec;
91  double fStep;
92  bool fHasAsymErrors;
93  bool fHasError;
94  bool fIsFixed;
95 
96 
97  virtual void fBuildPrimaryParamList();
98 
99 
100 protected:
101  virtual void fClearPrimaryParamList();
102  TSArgList *fPrimaryParamList;
103 
104  //ClassDef(TSParameter,1)
105 };
106 
107 #endif /* TSPARAMETER_H_ */
Definition: TSArgList.h:30
Definition: TSVariable.h:55
Definition: TSParameter.h:39
void SetAsymErrors(double err_low, double err_up)
Definition: TSParameter.cc:255