GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
20class TFormula;
21
31class TGo4FitDependency : public TObject {
32 public:
34 TGo4FitDependency(const char *iParameter, const char *iExpression);
35 TGo4FitDependency(const char *iParameter, Double_t InitValue);
36 virtual ~TGo4FitDependency();
37
38 void SetParameter(const char *iParameter);
39 void SetInitValue(Double_t InitValue);
40 void SetExpression(const char *iExpression);
41
42 const TString &GetParameter() const { return fxParameter; }
43 const TString &GetExpression() const { return fxExpression; }
44 Double_t GetInitValue() const { return fdInitValue; }
45
46 Bool_t IsResultDepend() const { return fxParameter.IsNull(); }
47 Bool_t IsInitValue() const { return fxExpression.IsNull(); }
48
49 void Initialize(Int_t iNumPar, const char *iFormula);
50 Double_t ExecuteDependency(Double_t *Params);
51 void Finalize();
52
53 void Print(Option_t *option = "") const override;
54
55 protected:
56 TString fxParameter;
57 TString fxExpression;
58 Double_t fdInitValue{0.};
59 Int_t fiNumPar{0};
60 TFormula *fxFormula{nullptr};
61
62 ClassDefOverride(TGo4FitDependency,1)
63};
64
65#endif // TGO4FITDEPENDENCY_H
Object, used to store dependency of one parameter from other, calculated via expression.
Bool_t IsInitValue() const
void SetParameter(const char *iParameter)
void SetExpression(const char *iExpression)
void Print(Option_t *option="") const override
const TString & GetExpression() const
Double_t GetInitValue() const
void Initialize(Int_t iNumPar, const char *iFormula)
Bool_t IsResultDepend() const
Double_t ExecuteDependency(Double_t *Params)
const TString & GetParameter() const
void SetInitValue(Double_t InitValue)