00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4FITDEPENDENCY_H 00017 #define TGO4FITDEPENDENCY_H 00018 00019 #include "TObject.h" 00020 #include "TString.h" 00021 00022 class TFormula; 00023 00030 class TGo4FitDependency : public TObject { 00031 public: 00032 TGo4FitDependency(); 00033 TGo4FitDependency(const char* iParameter, const char* iExpression); 00034 TGo4FitDependency(const char* iParameter, Double_t InitValue); 00035 virtual ~TGo4FitDependency(); 00036 00037 void SetParameter(const char* iParameter); 00038 void SetInitValue(Double_t InitValue); 00039 void SetExpression(const char* iExpression); 00040 00041 const TString& GetParameter() { return fxParameter; } 00042 const TString& GetExpression() { return fxExpression; } 00043 Double_t GetInitValue() { return fdInitValue; } 00044 00045 Bool_t IsResultDepend() { return fxParameter.Length()==0; } 00046 Bool_t IsInitValue() { return fxExpression.Length()==0; } 00047 00048 void Initialize(Int_t iNumPar, const char* iFormula); 00049 Double_t ExecuteDependency(Double_t* Params); 00050 void Finalize(); 00051 00052 virtual void Print(Option_t* option) const; 00053 00054 protected: 00055 TString fxParameter; 00056 TString fxExpression; 00057 Double_t fdInitValue; 00058 Int_t fiNumPar; 00059 TFormula *fxFormula; 00060 00061 ClassDef(TGo4FitDependency,1) 00062 }; 00063 #endif // TGO4FITDEPENDENCY_H 00064 00065 //----------------------------END OF GO4 SOURCE FILE ---------------------