14#ifndef TGO4FITMODELFUNCTION_H
15#define TGO4FITMODELFUNCTION_H
71 TGo4FitModelFunction(
const char *iName,
const char *iLibraryName =
"libName.so",
const char *iFunctionName =
"Funcname", Int_t iNPars = 0, Bool_t AddAmplitude = kFALSE);
134 void Print(Option_t *option =
"")
const override;
156 Double_t
UserFunction(Double_t *Coordinates, Double_t *Parameters)
override;
Double_t(* TUserFunction)(Double_t *, Double_t *)
Model objects, which uses external user function to calculate model values.
void Finalize() override
Finalize object.
const char * GetFunctionName() const
Returns function name in library.
TGo4FitModelFunction(const char *iName, TUserFunction iUserFunction, Int_t iNPars, Bool_t AddAmplitude=kFALSE)
Creates TGo4FitModelFunction object with specified name.
Bool_t LoadLibrary(Bool_t CloseFirst)
virtual TString GetFuncParName(Int_t n)
Int_t GetWidthParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent width of model component for given axis.
TString fxFunctionName
Function name.
void SetUserFunction(TUserFunction iUserFunction)
Set address to user function.
TString fxLibraryName
String with library name, where function is situated.
void * fxLibrary
Pointer on loaded library descriptor.
void SetWidthParIndex(Int_t naxis, Int_t indx=-1)
void SetFunctionName(const char *name)
Sets function name in library.
TGo4FitParameter * GetFuncPar(Int_t n)
Int_t GetPosParIndex(Int_t naxis) override
Return index of parameter (if exist), which represent position of model for given axis.
Bool_t CanAmplTouch() override
Signals, that amplitude parameter can be removed from or introduced to object.
virtual ~TGo4FitModelFunction()
Destroys TGo4FitModelFunction object.
void AfterEval() override
Clear buffers, which were created by BeforeEval() method.
TGo4FitModelFunction(const char *iName, const char *iLibraryName="libName.so", const char *iFunctionName="Funcname", Int_t iNPars=0, Bool_t AddAmplitude=kFALSE)
Creates TGo4FitModelFunction object with specified name.
TUserFunction fxUserFunction
Direct pointer on function.
Bool_t Initialize(Int_t UseBuffers=-1) override
Initialize object.
const char * GetLibraryName() const
Returns library name.
Bool_t SetNumberOfFuncPar(Int_t num)
Sets number of parameters, which can be used by function.
void SetPosParIndex(Int_t naxis, Int_t indx=-1)
Double_t UserFunction(Double_t *Coordinates, Double_t *Parameters) override
Another place, where user specific code can be placed for model values calculation.
Int_t GetNumberOfFuncPar()
Returns number of parameter, which can be used by function.
void Print(Option_t *option="") const override
TGo4FitModelFunction()
Default constructor.
void SetLibraryName(const char *name)
Sets library name.
Bool_t BeforeEval(Int_t ndim) override
Prepare object to evaluations.
void SetUserFunction(const char *iLibraryName, const char *iFunctionName)
Set library file name and function name.
Basic abstract class for representing model components of fitted data.
Model and data objects parameter.
Double_t(* TUserFunction)(Double_t *, Double_t *)