GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4FitDependency.h
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4FITDEPENDENCY_H
15 #define TGO4FITDEPENDENCY_H
16 
17 #include "TObject.h"
18 #include "TString.h"
19 
20 class TFormula;
21 
28 class TGo4FitDependency : public TObject {
29  public:
31  TGo4FitDependency(const char *iParameter, const char *iExpression);
32  TGo4FitDependency(const char *iParameter, Double_t InitValue);
33  virtual ~TGo4FitDependency();
34 
35  void SetParameter(const char *iParameter);
36  void SetInitValue(Double_t InitValue);
37  void SetExpression(const char *iExpression);
38 
39  const TString &GetParameter() const { return fxParameter; }
40  const TString &GetExpression() const { return fxExpression; }
41  Double_t GetInitValue() const { return fdInitValue; }
42 
43  Bool_t IsResultDepend() const { return fxParameter.IsNull(); }
44  Bool_t IsInitValue() const { return fxExpression.IsNull(); }
45 
46  void Initialize(Int_t iNumPar, const char *iFormula);
47  Double_t ExecuteDependency(Double_t *Params);
48  void Finalize();
49 
50  void Print(Option_t *option = "") const override;
51 
52  protected:
53  TString fxParameter;
54  TString fxExpression;
55  Double_t fdInitValue{0.};
56  Int_t fiNumPar{0};
57  TFormula *fxFormula{nullptr};
58 
59  ClassDefOverride(TGo4FitDependency,1)
60 };
61 
62 #endif // TGO4FITDEPENDENCY_H
Bool_t IsResultDepend() const
void SetExpression(const char *iExpression)
void Print(Option_t *option="") const override
void Initialize(Int_t iNumPar, const char *iFormula)
void SetParameter(const char *iParameter)
Double_t GetInitValue() const
void SetInitValue(Double_t InitValue)
const TString & GetParameter() const
Bool_t IsInitValue() const
Double_t ExecuteDependency(Double_t *Params)
const TString & GetExpression() const