Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4Fit/TGo4FitModelFormula.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE 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 TGO4FITMODELFORMULA_H
00017 #define TGO4FITMODELFORMULA_H
00018 #include "TString.h"
00019 #include "TFormula.h"
00020 #include "TGo4FitModel.h"
00021 
00029 class TGo4FitModelFormula : public TGo4FitModel {
00030    public:
00031 
00035       TGo4FitModelFormula();
00036 
00041       TGo4FitModelFormula(const char* iName, const char* iExpressionStr = "", Int_t iNPars = 0, Bool_t AddAmplitude = kFALSE);
00042 
00046       virtual ~TGo4FitModelFormula();
00047 
00051       virtual Bool_t CanAmplTouch() { return kTRUE; }
00052 
00056       const char* GetExpression() { return fxExpression.Data(); }
00057 
00061       void SetExpression(const char* expr) { fxExpression = expr; }
00062 
00066       Int_t GetNumberOfExprPar();
00067 
00071       Bool_t SetNumberOfExprPar(Int_t num);
00072 
00073       void SetPosParIndex(Int_t naxis, Int_t indx = -1);
00074       void SetWidthParIndex(Int_t naxis, Int_t indx = -1);
00075 
00076       virtual Bool_t BeforeEval(Int_t ndim);
00077       virtual Double_t EvalN(const Double_t* v);
00078       virtual void AfterEval();
00079 
00083       virtual void Print(Option_t* option) const;
00084 
00085    protected:
00086 
00087       virtual Bool_t Initialize(Int_t UseBuffers = -1);
00088       virtual void Finalize();
00089 
00090       TGo4FitParameter* GetExprPar(Int_t n);
00091       TString GetExprParName(Int_t n);
00092 
00093       Bool_t CompileFormula();
00094       void CloseFormula();
00095 
00096       virtual Int_t GetPosParIndex(Int_t naxis);
00097       virtual Int_t GetWidthParIndex(Int_t naxis);
00098 
00102       TString fxExpression;
00103 
00104       TArrayI fxPosIndex;
00105 
00106       TArrayI fxWidthIndex;
00107 
00111       TFormula *fxFormula;               
00112    private:
00113 
00117       Int_t fiNDimension;                  
00118 
00119    ClassDef(TGo4FitModelFormula,1)
00120 };
00121 #endif // TGO4FITMODELFORMULA_H
00122 
00123 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:56 2005 for Go4-v2.10-5 by doxygen1.2.15