34 for (Int_t n = 0; n < iNPars; n++)
39 Int_t iNPars, Bool_t AddAmplitude)
43 for (Int_t n = 0; n < iNPars; n++)
88 if ((num < 0) || (oldnum == num))
91 for (Int_t n = oldnum - 1; n >= num; n--)
94 for (Int_t n = oldnum; n < num; n++)
106 if (naxis >= oldsize) {
108 for (Int_t n = oldsize; n <
fxPosIndex.GetSize(); n++)
119 if (naxis >= oldsize) {
121 for (Int_t n = oldsize; n <
fxWidthIndex.GetSize(); n++)
129 if ((naxis < 0) || (naxis >=
fxPosIndex.GetSize()))
144 res.Form(
"Par%d", n);
186 std::cout <<
"TGo4FitModelFunction: user function not set" << std::endl;
197 std::cout <<
" TGo4FitModelFunction: failed to open " <<
fxLibraryName <<
", " << dlerror() << std::endl;
208 std::cout <<
" TGo4FitModelFunction: failed to find " <<
fxFunctionName <<
", " << dlerror() << std::endl;
248 std::cout <<
" Pointer on function " <<
fxUserFunction << std::endl;
249 for (Int_t naxis = 0; naxis <
fxPosIndex.GetSize(); naxis++) {
252 std::cout <<
" Position on " << naxis <<
" axis is " << par->GetName() << std::endl;
254 for (Int_t naxis = 0; naxis <
fxWidthIndex.GetSize(); naxis++) {
257 std::cout <<
" Width on " << naxis <<
" axis is " << par->GetName() << std::endl;
Double_t(* TUserFunction)(Double_t *, Double_t *)
TGo4FitParameter * GetAmplPar()
Return amplitude parameter object.
Int_t GetAmplIndex() const
Returns index of amplitude parameter.
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
Create new parameter with provided properties and add to parameters list.
void Finalize() override
Finalize object.
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.
virtual ~TGo4FitModelFunction()
Destroys TGo4FitModelFunction object.
TString fxLibraryName
String with library name, where function is situated.
void SetWidthParIndex(Int_t naxis, Int_t indx=-1)
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.
void * fxLibrary
Pointer on loaded library descriptor.
void AfterEval() override
Clear buffers, which were created by BeforeEval() method.
TUserFunction fxUserFunction
Direct pointer on function.
Bool_t Initialize(Int_t UseBuffers=-1) override
Initialize object.
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.
Bool_t BeforeEval(Int_t ndim) override
Prepare object to evaluations.
virtual void Finalize()
Deletes all buffers, created during initialization.
virtual Bool_t Initialize(Int_t UseBuffers=-1)
Initialize model object.
void Print(Option_t *option="") const override
Print information about model object on standard output.
virtual Bool_t BeforeEval(Int_t ndim)
Prepares (if necessary) some intermediate variables to be able calculate values of model via EvalN() ...
TGo4FitModel()
Default constructor.
virtual void AfterEval()
Clear buffers, which were created by BeforeEval() method.
Model and data objects parameter.
Int_t GetParIndex(const TGo4FitParameter *par)
Return index of given parameter in list.
Bool_t RemovePar(const char *name)
Remove parameter from list with given name.
TGo4FitParameter * GetPar(Int_t n)
Return parameter according given index.
virtual Int_t NumPars()
Return number of parameters in list.