16 #include "Riostream.h"
31 TGo4FitModel(iName,
"Model, using user function",AddAmplitude),
32 fxLibraryName(), fxFunctionName(), fxPosIndex(), fxWidthIndex(),
33 fxUserFunction(iUserFunction), fxLibrary(0)
35 for (Int_t n=0;n<iNPars;n++)
40 TGo4FitModel(iName,
"Model, using user function",AddAmplitude),
41 fxLibraryName(iLibraryName), fxFunctionName(iFunctionName), fxPosIndex(), fxWidthIndex(),
42 fxUserFunction(0), fxLibrary(0)
44 for (Int_t n=0;n<iNPars;n++)
86 if ((num<0) || (oldnum==num))
return kFALSE;
88 for(Int_t n=oldnum-1;n>=num;n--)
91 for(Int_t n=oldnum;n<num;n++)
102 if (naxis>=oldsize) {
113 if (naxis>=oldsize) {
122 if ((naxis<0) || (naxis>=
fxPosIndex.GetSize()))
return -1;
128 if ((naxis<0) || (naxis>=
fxWidthIndex.GetSize()))
return -1;
173 if (
fxUserFunction==0) std::cout <<
"TGo4FitModelFunction: user function not set" << std::endl;
182 std::cout <<
" TGo4FitModelFunction: failed to open " <<
fxLibraryName <<
", " << dlerror() << std::endl;
190 std::cout <<
" TGo4FitModelFunction: failed to find " <<
fxFunctionName <<
", " << dlerror() << std::endl;
230 std::cout <<
" Pointer on function " <<
fxUserFunction << std::endl;
231 for (Int_t naxis=0;naxis<
fxPosIndex.GetSize();naxis++) {
234 std::cout <<
" Position on " << naxis <<
" axis is " << par->GetName() << std::endl;
236 for (Int_t naxis=0;naxis<
fxWidthIndex.GetSize();naxis++) {
239 std::cout <<
" Width on " << naxis <<
" axis is " << par->GetName() << std::endl;
virtual Bool_t Initialize(Int_t UseBuffers=-1)
void SetUserFunction(TUserFunction iUserFunction)
Bool_t SetNumberOfFuncPar(Int_t num)
Double_t(* TUserFunction)(Double_t *, Double_t *)
virtual ~TGo4FitModelFunction()
virtual TString GetFuncParName(Int_t n)
TGo4FitParameter * GetPar(Int_t n)
TGo4FitParameter * NewParameter(const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
virtual Int_t GetWidthParIndex(Int_t naxis)
virtual Bool_t BeforeEval(Int_t ndim)
Bool_t LoadLibrary(Bool_t CloseFirst)
void SetPosParIndex(Int_t naxis, Int_t indx=-1)
Bool_t RemovePar(const char *name)
TGo4FitParameter * GetFuncPar(Int_t n)
virtual void Print(Option_t *option) const
virtual void Print(Option_t *option) const
virtual Bool_t Initialize(Int_t UseBuffers=-1)
virtual Bool_t BeforeEval(Int_t ndim)
Int_t GetNumberOfFuncPar()
TUserFunction fxUserFunction
virtual Int_t GetPosParIndex(Int_t naxis)
Int_t GetParIndex(const TGo4FitParameter *par)
void SetWidthParIndex(Int_t naxis, Int_t indx=-1)
virtual Double_t UserFunction(Double_t *Coordinates, Double_t *Parameters)
TGo4FitParameter * GetAmplPar()