GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Model objects, which uses external user function to calculate model values. More...
#include <TGo4FitModelFunction.h>
Public Member Functions | |
TGo4FitModelFunction () | |
Default constructor. | |
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. | |
TGo4FitModelFunction (const char *iName, TUserFunction iUserFunction, Int_t iNPars, Bool_t AddAmplitude=kFALSE) | |
Creates TGo4FitModelFunction object with specified name. | |
virtual | ~TGo4FitModelFunction () |
Destroys TGo4FitModelFunction object. | |
void | AfterEval () override |
Clear buffers, which were created by BeforeEval() method. | |
Bool_t | BeforeEval (Int_t ndim) override |
Prepare object to evaluations. | |
Bool_t | CanAmplTouch () override |
Signals, that amplitude parameter can be removed from or introduced to object. | |
const char * | GetFunctionName () const |
Returns function name in library. | |
const char * | GetLibraryName () const |
Returns library name. | |
Int_t | GetNumberOfFuncPar () |
Returns number of parameter, which can be used by function. | |
void | Print (Option_t *option="") const override |
void | SetFunctionName (const char *name) |
Sets function name in library. | |
void | SetLibraryName (const char *name) |
Sets 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) |
void | SetUserFunction (const char *iLibraryName, const char *iFunctionName) |
Set library file name and function name. | |
void | SetUserFunction (TUserFunction iUserFunction) |
Set address to user function. | |
void | SetWidthParIndex (Int_t naxis, Int_t indx=-1) |
![]() | |
TGo4FitModel () | |
Default constructor. | |
TGo4FitModel (const char *iName, const char *iTitle, Bool_t MakeAmplitude=kFALSE) | |
Creates TGo4FitModel object with given name. | |
virtual | ~TGo4FitModel () |
Delete TGo4FitModel object. | |
Bool_t | AddModelToDataResult (TGo4FitData *data) |
Evaluate model values for all data point and add them to result buffer. | |
const char * | AssignmentName (Int_t n) |
Returns name of data, to which model object is assigned. | |
void | AssignToData (const char *DataName, Double_t RatioValue=1., Bool_t FixRatio=kFALSE) |
Assign model to specified data object. | |
void | ChangeDataNameInAssignments (const char *oldname, const char *newname) |
Change name of data in assignments. | |
void | ClearAssigmentTo (const char *DataName) |
void | ClearAssignments () |
Remove all assignments. | |
void | ClearAssignmentTo (const char *DataName) |
Remove assignment to given data (if exists). | |
void | ConnectToDataIfAssigned (TGo4FitData *data) |
Check, if model assigned to such a data (via name) and store pointer on this data object. | |
virtual Double_t | EvalN (const Double_t *v) |
Calculates value of model according current parameters values and provided axes values. | |
virtual Double_t | Evaluate (Double_t *v, Int_t ndim) |
Calculates value of model for given axis values. | |
virtual Double_t | Evaluate (Double_t x) |
Calculates value of model for given x value. | |
virtual Double_t | Evaluate (Double_t x, Double_t y) |
Calculates value of model for given x,y values. | |
virtual Double_t | Evaluate (Double_t x, Double_t y, Double_t z) |
Calculates value of model for given x,y,z values. | |
virtual Double_t | EvaluateAtPoint (std::unique_ptr< TGo4FitDataIter > &iter, Bool_t UseRanges=kTRUE) |
Evaluate model value for point, specified by current values of iterator. | |
virtual Double_t | EvaluateAtPoint (TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE) |
Evaluate model value for specified data point. | |
Int_t | GetGroupIndex () const |
Returns group index of model. | |
virtual Bool_t | GetPosition (Int_t naxis, Double_t &pos) |
Return position of model, if exists. | |
Double_t | GetRatioValueFor (const char *DataName) |
Returns ratio value for specified data object. | |
virtual Bool_t | GetWidth (Int_t naxis, Double_t &width) |
Returns with of model component, if exists. | |
virtual Double_t | Integral () |
Calculates integral of model component. | |
Bool_t | IsAssignTo (const char *DataName) const |
Checks, if model assigned to given data. | |
Bool_t | NeedIntegration () const |
Returns kTRUE, if integration properties were specified. | |
Int_t | NumAssigments () const |
Returns number of assignment for this model. | |
Int_t | NumPars () override |
Return number of parameters in list. | |
void | Print (Option_t *option="") const override |
Print information about model object on standard output. | |
void | SetBackgroundGroupIndex () |
Set group index to background (index = 0). | |
void | SetGroupIndex (Int_t index=-1) |
Set group index of model. | |
void | SetIntegrationsProperty (Int_t iMinIntegrDepth, Int_t iMaxIntegrDepth=0, Double_t iIntegrEps=0., Bool_t iAbsoluteEps=kFALSE, Bool_t iIntegrScaling=kFALSE) |
Set integration properties. | |
virtual Bool_t | SetPosition (Int_t naxis, Double_t pos) |
Sets position of model component, if possible. | |
virtual Bool_t | SetWidth (Int_t naxis, Double_t width) |
Sets width of model component, if possible. | |
![]() | |
TGo4FitComponent () | |
Default constructor. | |
TGo4FitComponent (const char *iName, const char *iTitle) | |
Creates TGo4FitComponent object. | |
virtual | ~TGo4FitComponent () |
Destroys TGo4FitComponent object. | |
void | AddRangeCondition (Int_t typ, Int_t naxis, Double_t left, Double_t right) |
Add new range condition. | |
void | AddRangeCut (TCutG *cut, Bool_t exclude=kFALSE) |
Add TCutG object as range condition for two-dimensional case. | |
Bool_t | CheckRangeConditions (const Double_t *values, Int_t numaxis) |
Check all range conditions for specified point. | |
void | ClearRanges (Int_t naxis=-1) |
Clear all range conditions for given axis. | |
void | CollectParsTo (TGo4FitParsList &list) override |
Collect all parameters to provided parameters list object. | |
void | ExcludeRange (Int_t naxis, Double_t min, Double_t max) |
Exclude axis range from consideration. | |
Double_t | GetAmplError () |
Return error of amplitude parameter. | |
const char * | GetAmplFullName () |
Returns full name of amplitude parameter. | |
const char * | GetAmplName () |
Returns name of amplitude parameter. | |
TGo4FitParameter * | GetAmplPar () |
Return amplitude parameter object. | |
Double_t | GetAmplValue () |
Return value of amplitude parameter. | |
Int_t | GetNumRangeCondition () const |
Returns number of range condition (exclude range cuts). | |
Int_t | GetNumRangeCut () const |
Returns number of range cuts, assigned to object. | |
void | GetRangeCondition (Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const |
Return value for specified range condition. | |
TCutG * | GetRangeCut (Int_t n) const |
Returns specified range cut. | |
Bool_t | GetRangeMax (Int_t naxis, Double_t &value) const |
Defines maximum allowed value for given range. | |
Bool_t | GetRangeMin (Int_t naxis, Double_t &value) const |
Defines minimum allowed value for given range. | |
Bool_t | GetUseBuffers () const |
Returns flag of usage of additional buffers. | |
Bool_t | IsAnyRangeLimits () const |
Return kTRUE, if any range conditions were introduced. | |
Bool_t | IsRangeCutExcluding (Int_t n) const |
Return kTRUE if cut exclude range. | |
Bool_t | MakeAmpl (Bool_t isFixed=kFALSE) |
Create amplitude parameter and adds it to parameters list. | |
void | Print (Option_t *option="") const override |
Print info about object on standard output. | |
Bool_t | RemoveAmpl () |
Remove amplitude parameter from parameters list. | |
void | RemoveRangeCondition (Int_t n) |
Removes specified range condition. | |
void | RemoveRangeCut (Int_t n) |
Delete range cut with specified index. | |
void | SetAmplError (Double_t iError) |
Set error of amplitude parameter. | |
void | SetAmplValue (Double_t iAmpl) |
Set value of amplitude parameter. | |
void | SetRange (Int_t naxis, Double_t min, Double_t max) |
Includes axis range in consideration. | |
void | SetRangeCondition (Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right) |
Change specified range condition. | |
void | SetRangeCutExcluding (Int_t n, Bool_t exclude=kTRUE) |
Set type of range cut (excluding or including) | |
void | SetRangeMax (Int_t naxis, Double_t value) |
Set maximum axis value, taken into consideration. | |
void | SetRangeMin (Int_t naxis, Double_t value) |
Set minimum axis value, taken into consideration. | |
void | SetUseBuffers (Bool_t iUse) |
Sets usage of additional buffers. | |
![]() | |
TGo4FitParsList () | |
Default constructor. | |
TGo4FitParsList (Bool_t IsParsOwned) | |
Create TGo4FitParsList object and set flag of ownership of parameters object. | |
TGo4FitParsList (const char *Name, const char *Title, Bool_t IsParsOwned) | |
Create TGo4FitParsList object, set it's name and title, and ownership flag of parameters pbjects. | |
virtual | ~TGo4FitParsList () |
Destroy TGo4FitParsList object. | |
virtual bool | CanRollbackPars () |
Return true if parameters can be safely restored from memorized values;. | |
void | ClearPars () |
Remove all parameters from list. | |
TGo4FitParameter * | CreatePar (const char *ParName, const char *Title, Double_t iValue=0) |
Create new TGo4FitParameter object with given name, title and parameter value, and put this object to the list. | |
TGo4FitParameter * | FindPar (const char *OwnerFullName, const char *ParName) |
Find parameter with given owner full name and parameter name. | |
TGo4FitParameter * | FindPar (const char *ParName) |
Find parameter object with given name. | |
TGo4FitParameter * | FindPar (TGo4FitParameter *par) |
Find parameter in list. | |
TGo4FitParameter * | GetPar (Int_t n) |
Return parameter according given index. | |
virtual Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) |
Get epsilon value for parameter with given name. | |
Double_t | GetParError (const char *ParName) |
Get error value for parameter with given name. | |
virtual Bool_t | GetParFixed (const char *ParName) |
Return status for parameter with given name, is it fixed or not. | |
const char * | GetParFullName (Int_t n) |
Return full name of parameter with given index. | |
Int_t | GetParIndex (const TGo4FitParameter *par) |
Return index of given parameter in list. | |
const char * | GetParName (Int_t n) |
Return name of parameter with given index. | |
virtual Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) |
Get range limits for parameter with given name. | |
void | GetParsValues (Double_t *pars) |
Copy values of all parameters in list to provided array. | |
Double_t | GetParValue (const char *ParName) |
Return value of parameter with given name. | |
Bool_t | IsAllParsFixed () |
Returns true, if all parameters in list fixed;. | |
virtual void | MemorizePars () |
Memorize values of all parameters. | |
Int_t | NumFixedPars () |
Return number of fixed pars. | |
Int_t | NumFreePars () |
Return number of free pars. | |
void | Print (Option_t *option="") const override |
Default print method. | |
void | PrintPars () const |
Print only value and error of all parameters in list. | |
virtual void | RememberPars () |
Restore parameters values, which were stored by MemorizePars() routine;. | |
Bool_t | RemovePar (const char *name) |
Remove parameter from list with given name. | |
Bool_t | RemovePar (TGo4FitParameter *par) |
Remove parameter from list. | |
virtual Bool_t | SetParEpsilon (const char *ParName, Double_t Epsilon) |
Set epsilon value for parameter with given name. | |
Bool_t | SetParError (const char *ParName, Double_t iError) |
Set error value for parameter with given name. | |
virtual Bool_t | SetParFixed (const char *ParName, Bool_t iFixed=kTRUE) |
Set for parameter with given name, is it fixed or not. | |
void | SetParName (Int_t n, const char *name) |
Set new name for parameter object with provided index. | |
virtual Bool_t | SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax) |
Set range limits for parameter with given name. | |
void | SetParsNames (const char *name0="Par0", const char *name1="Par1", const char *name2="Par2", const char *name3="Par3", const char *name4="Par4", const char *name5="Par5", const char *name6="Par6", const char *name7="Par7", const char *name8="Par8", const char *name9="Par9") |
Set names of first 10 parameters. | |
void | SetParsValues (Double_t *pars) |
Set value for all parameters from array. | |
void | SetParsValues (Double_t par0=0., Double_t par1=0., Double_t par2=0., Double_t par3=0., Double_t par4=0., Double_t par5=0., Double_t par6=0., Double_t par7=0., Double_t par8=0., Double_t par9=0.) |
Set values for first 10 parameters. | |
Bool_t | SetParValue (const char *ParName, Double_t iValue) |
Set value of parameter with given name. | |
![]() | |
TGo4FitNamed () | |
Default constructor. | |
TGo4FitNamed (const char *Name, const char *Title, TNamed *Owner=nullptr) | |
Creates TGo4FitNamed object and set name and title. | |
virtual | ~TGo4FitNamed () |
Destroy TGo4FitNamed object. | |
const char * | GetFullName () |
Returns full name of object. | |
TNamed * | GetOwner () |
Return owner of object. | |
const char * | GetOwnerFullName () |
Return full name of owner. | |
void | Print (Option_t *option="") const override |
void | SetOwner (TNamed *iOwner) |
Sets owner of object. | |
![]() | |
TGo4FitSlotList () | |
virtual | ~TGo4FitSlotList () |
Bool_t | CheckObjects (Bool_t MakeOut=kTRUE) |
Check, if all necessary objects are provided. | |
void | ClearObjects (const char *PlaceName=nullptr, Bool_t NonOwned=kTRUE) |
Clear object from slot(s), which are defined by PlaceName condition. | |
void | ClearSlot (TGo4FitSlot *slot, Bool_t NonOwned) |
Clear object in specified slot. | |
Bool_t | ConnectSlots (const char *Slot1FullName, const char *Slot2FullName) |
Connects first slot to second. | |
Bool_t | ConnectSlots (TGo4FitSlot *slot1, TGo4FitSlot *slot2) |
Connects first slot to second. | |
virtual void | FillSlotList (TSeqCollection *lst) |
Fill list of TGo4FitSlot objects to provided collection. | |
TGo4FitSlot * | FindSlot (const char *FullSlotName) |
Find slot in list with given full name;. | |
TGo4FitSlot * | GetSlot (Int_t nslot) |
Returns slots from list with specified index. | |
const TObjArray * | GetSlotList (Bool_t ForceUpdate=kFALSE) |
Return pointer in TObjArray with list of all slots in list. | |
Bool_t | IsEmptySlots () |
Return kTRUE, if there are empty slots in list. | |
TGo4FitSlot * | IsObjectInSlots (TObject *obj) |
Checks, if object assign to one of slots. | |
Int_t | NumSlots () |
Returns number of slots in list. | |
TGo4FitSlot * | SetObject (const char *PlaceName, TObject *obj, Bool_t iOwned=kFALSE) |
Set object to first suitable slot, which have PlaceName name or owner of which has PlaceName full name with defined ownership flag. | |
TGo4FitSlot * | SetObject (TObject *obj, Bool_t iOwned=kFALSE) |
Set object to first suitable slot with defined ownership flag. | |
void | SetSaveFlagForObjects (Int_t iSaveFlag, const char *PlaceName=nullptr) |
Set save flag for object(s), assigned to fitter. | |
void | SetUpdateSlotList () |
Update internal list of slots (if exists). | |
Protected Member Functions | |
void | CloseLibrary () |
void | Finalize () override |
Finalize object. | |
TGo4FitParameter * | GetFuncPar (Int_t n) |
virtual TString | GetFuncParName (Int_t n) |
Int_t | GetPosParIndex (Int_t naxis) override |
Return index of parameter (if exist), which represent position of model for given axis. | |
Int_t | GetWidthParIndex (Int_t naxis) override |
Return index of parameter (if exist), which represent width of model component for given axis. | |
Bool_t | Initialize (Int_t UseBuffers=-1) override |
Initialize object. | |
Bool_t | LoadLibrary (Bool_t CloseFirst) |
Double_t | UserFunction (Double_t *Coordinates, Double_t *Parameters) override |
Another place, where user specific code can be placed for model values calculation. | |
![]() | |
Bool_t | BuffersAllocated () const |
Checks if model allocate buffers for calculations. | |
Double_t | EvaluateAndIntegrate (Int_t NumScales, const Double_t *Scales, const Double_t *Widths) |
Make integration of model inside given point, if integration specified. | |
TGo4FitParameter * | Get (Int_t n) override |
TGo4FitData * | GetAssignedConnection (Int_t n) |
Return pointer on assigned data. | |
const Int_t * | GetDataFullIndex (TGo4FitData *data, Int_t nbin) |
Int_t | GetDataIndexesSize (TGo4FitData *data) |
Double_t * | GetModelBins (const char *DataName) const |
Get model bins for specified data (if exists) | |
virtual TGo4FitParameter * | GetPosPar (Int_t naxis=0) |
Return parameter (if exist), which represent position of model for given axis. | |
virtual TGo4FitParameter * | GetWidthPar (Int_t naxis=0) |
Return parameter (if exist), which represent width of model component for given axis. | |
void | RebuildShape (Bool_t ForceBuild=kFALSE) |
Recalculates shape of object. | |
void | SetNeedToRebuild () |
Sets flag, that shape bins should be refilled next time, when RebuildShape() routine will be called. | |
![]() | |
Int_t | GetAmplIndex () const |
Returns index of amplitude parameter. | |
TGo4FitParameter * | NewAmplitude (const char *Name=nullptr, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0) |
Create amplitude parameter with specified properties. | |
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 | SetAmplIndex (Int_t iAmplIndex=-1) |
Set index of amplitude parameter. | |
![]() | |
TGo4FitParameter * | AddPar (TGo4FitParameter *par) |
void | ClearParsBlocking () |
TGo4FitParameter * | Find (const char *OwnerFullName, const char *ParName) |
TGo4FitParameter * | Find (const char *ParName) |
TGo4FitParameter * | Find (TGo4FitParameter *par) |
TGo4FitParameter * | InsertPar (TGo4FitParameter *par, Int_t indx) |
Bool_t | RemoveParByIndex (Int_t indx) |
void | SetParsOwner (TGo4FitNamed *iOwner) |
![]() | |
void | CheckDuplicatesOnSlot () |
Resolve situation, when same object assigned to several slots with ownership flag. | |
ClassDef (TGo4FitSlotList, 1) | |
void | PrepareSlotsForWriting () |
Protected Attributes | |
TString | fxFunctionName |
Function name. | |
TString | fxLibraryName |
String with library name, where function is situated. | |
TArrayI | fxPosIndex |
TArrayI | fxWidthIndex |
![]() | |
Bool_t | fbAbsoluteEps {kFALSE} |
States, if integration precision absolute or relative. | |
Bool_t | fbIntegrScaling {kFALSE} |
Scale integral to integration volume. | |
Double_t | fdIntegrEps {0} |
Integration precision. | |
Int_t | fiMaxIntegrDepth {0} |
Maximum integration depth. | |
Int_t | fiMinIntegrDepth {0} |
Minimum depth of integration. | |
![]() | |
Bool_t | fbUpdateSlotList {kFALSE} |
TObjArray * | fxSlotList {nullptr} |
Private Attributes | |
void * | fxLibrary {nullptr} |
Pointer on loaded library descriptor. | |
TUserFunction | fxUserFunction {nullptr} |
Direct pointer on function. | |
Model objects, which uses external user function to calculate model values.
The function should has such signature:
In constructor user should define name and title of object, pointer to user function, number of parameters and, optionally, using additional amplitude parameters. For instance, user function with three parameters and amplitude:
In constructor "Par0", "Par1", "Par2" and "Ampl" parameters will be created. They are accessible in usual way from fitter or model object itself. Important notice - this model object can not be saved to file and restored in proper way, because address of user function may change in between. To correctly use this object after saving and restoring routines, user should directly set address of user function to TGo4FitModelFunction object (SetUserFunction() method) before using it. Otherwise, run-time error will occur. To avoid this user should create it's own model class (see example 4) or put function to shared library (example 2). If shared library is created, it can be used in constructor like:
During initialization routine library will be loaded and function will be used for modeling. In this case, if library will be present on the same location, model object can be reused directly after storing to file and reading it back.
Definition at line 51 of file TGo4FitModelFunction.h.
TGo4FitModelFunction::TGo4FitModelFunction | ( | ) |
Default constructor.
Definition at line 24 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::TGo4FitModel(), fxFunctionName, fxLibrary, fxLibraryName, and fxUserFunction.
Referenced by Print().
TGo4FitModelFunction::TGo4FitModelFunction | ( | const char * | iName, |
TUserFunction | iUserFunction, | ||
Int_t | iNPars, | ||
Bool_t | AddAmplitude = kFALSE ) |
Creates TGo4FitModelFunction object with specified name.
Pointer on function and number of parameters should be specified. Additionally usage of amplitude parameter can be invoked. !!! Pointer on function, specified in this method, can not be correctly restored from streamer. Therefore, object can not be directly reused after streaming. SetUserFunction() should be called before.
Definition at line 29 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::TGo4FitModel(), fxFunctionName, fxLibrary, fxLibraryName, fxPosIndex, fxUserFunction, fxWidthIndex, GetFuncParName(), and TGo4FitComponent::NewParameter().
TGo4FitModelFunction::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.
Library and function name can be specified. Additionally usage of amplitude parameter can be invoked.
Definition at line 38 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::TGo4FitModel(), fxFunctionName, fxLibrary, fxLibraryName, fxPosIndex, fxUserFunction, fxWidthIndex, GetFuncParName(), and TGo4FitComponent::NewParameter().
|
virtual |
Destroys TGo4FitModelFunction object.
Definition at line 47 of file TGo4FitModelFunction.cxx.
References CloseLibrary().
|
overridevirtual |
Clear buffers, which were created by BeforeEval() method.
Reimplemented from TGo4FitModel.
Definition at line 168 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::AfterEval().
|
overridevirtual |
Prepare object to evaluations.
When usage of function from library is specified, library will be loaded at this time.
Reimplemented from TGo4FitModel.
Definition at line 161 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::BeforeEval(), and LoadLibrary().
|
inlineoverridevirtual |
Signals, that amplitude parameter can be removed from or introduced to object.
Reimplemented from TGo4FitComponent.
Definition at line 81 of file TGo4FitModelFunction.h.
|
protected |
Definition at line 215 of file TGo4FitModelFunction.cxx.
References fxLibrary.
Referenced by ~TGo4FitModelFunction(), Finalize(), LoadLibrary(), SetUserFunction(), and SetUserFunction().
|
overrideprotectedvirtual |
Finalize object.
Close library, if it was opened.
Reimplemented from TGo4FitModel.
Definition at line 155 of file TGo4FitModelFunction.cxx.
References CloseLibrary(), and TGo4FitModel::Finalize().
|
protected |
Definition at line 76 of file TGo4FitModelFunction.cxx.
References TGo4FitComponent::GetAmplIndex(), GetNumberOfFuncPar(), and TGo4FitParsList::GetPar().
Referenced by GetPosParIndex(), GetWidthParIndex(), and SetNumberOfFuncPar().
|
protectedvirtual |
Definition at line 141 of file TGo4FitModelFunction.cxx.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), and SetNumberOfFuncPar().
|
inline |
Returns function name in library.
Definition at line 107 of file TGo4FitModelFunction.h.
References fxFunctionName.
Referenced by TGo4FitPanel::Wiz_GetModelInfo().
|
inline |
Returns library name.
Definition at line 97 of file TGo4FitModelFunction.h.
References fxLibraryName.
Referenced by TGo4FitPanel::Wiz_GetModelInfo().
Int_t TGo4FitModelFunction::GetNumberOfFuncPar | ( | ) |
Returns number of parameter, which can be used by function.
Definition at line 68 of file TGo4FitModelFunction.cxx.
References TGo4FitComponent::GetAmplPar(), and TGo4FitParsList::NumPars().
Referenced by GetFuncPar(), and SetNumberOfFuncPar().
|
overrideprotectedvirtual |
Return index of parameter (if exist), which represent position of model for given axis.
Reimplemented from TGo4FitModel.
Definition at line 127 of file TGo4FitModelFunction.cxx.
References fxPosIndex, GetFuncPar(), and TGo4FitParsList::GetParIndex().
|
overrideprotectedvirtual |
Return index of parameter (if exist), which represent width of model component for given axis.
Reimplemented from TGo4FitModel.
Definition at line 134 of file TGo4FitModelFunction.cxx.
References fxWidthIndex, GetFuncPar(), and TGo4FitParsList::GetParIndex().
|
overrideprotectedvirtual |
Initialize object.
When usage of function from library is specified, library will be loaded at this time.
Reimplemented from TGo4FitModel.
Definition at line 148 of file TGo4FitModelFunction.cxx.
References TGo4FitModel::Initialize(), and LoadLibrary().
|
protected |
Definition at line 182 of file TGo4FitModelFunction.cxx.
References CloseLibrary(), fxFunctionName, fxLibrary, fxLibraryName, and fxUserFunction.
Referenced by BeforeEval(), and Initialize().
|
override |
Definition at line 242 of file TGo4FitModelFunction.cxx.
References TGo4FitModelFunction(), fxFunctionName, fxLibraryName, fxPosIndex, fxUserFunction, fxWidthIndex, and TGo4FitModel::Print().
|
inline |
Sets function name in library.
Definition at line 112 of file TGo4FitModelFunction.h.
References fxFunctionName.
Referenced by QFitModelFunctionWidget::FuncNameEdt_textChanged().
|
inline |
Sets library name.
Definition at line 102 of file TGo4FitModelFunction.h.
References fxLibraryName.
Referenced by QFitModelFunctionWidget::LibNameEdt_textChanged().
Bool_t TGo4FitModelFunction::SetNumberOfFuncPar | ( | Int_t | num | ) |
Sets number of parameters, which can be used by function.
Definition at line 85 of file TGo4FitModelFunction.cxx.
References GetFuncPar(), GetFuncParName(), GetNumberOfFuncPar(), TGo4FitComponent::NewParameter(), and TGo4FitParsList::RemovePar().
void TGo4FitModelFunction::SetPosParIndex | ( | Int_t | naxis, |
Int_t | indx = -1 ) |
Definition at line 101 of file TGo4FitModelFunction.cxx.
References fxPosIndex.
void TGo4FitModelFunction::SetUserFunction | ( | const char * | iLibraryName, |
const char * | iFunctionName ) |
Set library file name and function name.
Library will be loaded during initialization.
Definition at line 60 of file TGo4FitModelFunction.cxx.
References CloseLibrary(), fxFunctionName, fxLibraryName, and fxUserFunction.
void TGo4FitModelFunction::SetUserFunction | ( | TUserFunction | iUserFunction | ) |
Set address to user function.
Definition at line 52 of file TGo4FitModelFunction.cxx.
References CloseLibrary(), fxFunctionName, fxLibraryName, and fxUserFunction.
void TGo4FitModelFunction::SetWidthParIndex | ( | Int_t | naxis, |
Int_t | indx = -1 ) |
Definition at line 114 of file TGo4FitModelFunction.cxx.
References fxWidthIndex.
|
overrideprotectedvirtual |
Another place, where user specific code can be placed for model values calculation.
Function gets as parameter array of Coordinates and array of Parameters values. Only user-specific calculation should be done and result value should be return.
Reimplemented from TGo4FitModel.
Definition at line 173 of file TGo4FitModelFunction.cxx.
References fxUserFunction.
|
protected |
Function name.
Definition at line 169 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), TGo4FitModelFunction(), GetFunctionName(), LoadLibrary(), Print(), SetFunctionName(), SetUserFunction(), and SetUserFunction().
|
private |
Pointer on loaded library descriptor.
Definition at line 185 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), TGo4FitModelFunction(), CloseLibrary(), and LoadLibrary().
|
protected |
String with library name, where function is situated.
Definition at line 164 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), TGo4FitModelFunction(), GetLibraryName(), LoadLibrary(), Print(), SetLibraryName(), SetUserFunction(), and SetUserFunction().
|
protected |
Definition at line 171 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), GetPosParIndex(), Print(), and SetPosParIndex().
|
private |
Direct pointer on function.
Definition at line 180 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), TGo4FitModelFunction(), LoadLibrary(), Print(), SetUserFunction(), SetUserFunction(), and UserFunction().
|
protected |
Definition at line 173 of file TGo4FitModelFunction.h.
Referenced by TGo4FitModelFunction(), TGo4FitModelFunction(), GetWidthParIndex(), Print(), and SetWidthParIndex().