GSI Object Oriented Online Offline (Go4) GO4-6.4.0
|
Abstract fitter class. More...
#include <TGo4FitterAbstract.h>
Public Member Functions | |
TGo4FitterAbstract () | |
Default constructor. | |
TGo4FitterAbstract (const char *iName, const char *iTitle) | |
Create TGo4FitterAbstract object with given name and title. | |
virtual | ~TGo4FitterAbstract () |
Destroy TGo4FitterAbstract object. | |
void | AddAction (TGo4FitterAction *Action) |
Add action to action list. | |
void | AddActionAt (TGo4FitterAction *Action, Int_t indx) |
Add action to action list at specified index. | |
TGo4FitterOutput * | AddOutputAction (const char *Action, const char *Option=nullptr) |
Creates and add TGo4FitterOutput action with given parameters to actions list. | |
void | AddSimpleMinuit () |
Creates and add TGo4FitMinuit object to actions list. | |
Bool_t | ApplyConfig (TGo4FitterConfig *Config) |
Set active configuration object. | |
Double_t | CalculateFitFunction (Double_t *pars=nullptr) |
Calculates value of fit function. | |
void | Clear (Option_t *option="") override |
Clear fitter. | |
void | CopyParsValuesFrom (TGo4FitterAbstract *fitter) |
If provided fitter has a same list of parameters, their values will be copied to fitter. | |
void | DeleteAction (TGo4FitterAction *action) |
Remove action from actions list and destroy it. | |
void | DeleteActions () |
Remove and delete all actions from actions list. | |
void | DeleteOutputActions () |
Remove and delete all output actions from actions list. | |
void | DoAction (Int_t indx) |
Executes specified action from actions list. | |
void | DoAction (TGo4FitterAction *Action) |
Executes specified action. | |
void | DoActions (Bool_t AllowFitterChange=kFALSE, TObjArray *Actions=nullptr) |
Executes actions list. | |
TGo4FitterAction * | GetAction (Int_t num) |
Returns pointer on action with given index. | |
Int_t | GetNumActions () const |
Returns number of action in actions list. | |
Int_t | GetNumResults () const |
Return number of result values. | |
Bool_t | GetParEpsilon (const char *ParName, Double_t &Epsilon) override |
Return kTRUE, if epsilon value specified for parameter. | |
Bool_t | GetParFixed (const char *ParName) override |
Return kTRUE, if parameter should be fixed. | |
Bool_t | GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax) override |
Return kTRUE, if range condition specified for parameter and range boundaries. | |
Double_t | GetResultFF () const |
Return result value of fit function. | |
Int_t | GetResultNDF () const |
Return result value of number of degree of freedom. | |
const TArrayD * | GetResults () |
Returns pointer on array of result values. | |
Double_t | GetResultValue (Int_t n) const |
Return value of result with given index. | |
Bool_t | IsParsAsResults () const |
Return kTRUE, if parameters were taken as result values. | |
Bool_t | IsSuitableConfig (TGo4FitterConfig *Config) |
Checks, if config object corresponds to fitter parameters. | |
Int_t | NeedPadsNumber () |
Returns required number of TPad for actions output. | |
Int_t | NumPars () override |
Return total number of parameters, which should be fitted. | |
void | Print (Option_t *option="") const override |
Print information about fitter to standard output. | |
void | PrintResults () const |
Print result values to standard output. | |
TObjArray * | ProcessObjects (TObjArray *objs, Bool_t CloneFitter=kTRUE, Bool_t OnlyRequired=kTRUE, TObjArray *rownames=nullptr, TObjArray *colnames=nullptr) |
void | ReplaceAction (TGo4FitterAction *action, Int_t dir) |
Shift action in action list upward (dir=-1) or downward (dir=+1). | |
void | SetPad (Int_t indx, TVirtualPad *pad) |
Set pad, which will be used for output of TGo4FitterOutput object. | |
void | SetParsListChange () |
Should be used, when number of parameters are changed. | |
![]() | |
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. | |
virtual void | CollectParsTo (TGo4FitParsList &list) |
Add all parameters to provided TGo4FitParsList object. | |
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. | |
Double_t | GetParError (const char *ParName) |
Get error value for parameter with given name. | |
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. | |
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 | CheckParsListChanging () |
If appropriate flag sets (via SetParsListChange() method), function recollect all parameters from all objects, associated to fitter. | |
virtual void | CollectAllPars () |
Should collect parameters from all associated to fitter objects. | |
virtual Double_t | DoCalculation () |
Calculates value of fit function according current values of parameters. | |
virtual Int_t | DoNDFCalculation () |
Calculates number of dimensions of freedom; Should be implemented in inherited classes. | |
void | ExecuteDependencies (Double_t *pars) |
Execute dependencies in currently associated configuration (if exist). | |
virtual void | Finalize () |
Remove all buffer, created in Initialize() routine. | |
void | FinalizeDependencies (TObjArray &Dependencies) |
Relese memory, allocated for dependency executions. | |
virtual void | FinalizeFitterData () |
Finalize fitter data. | |
TGo4FitParameter * | Get (Int_t n) override |
Return pointer on parameter of given index. | |
virtual Bool_t | InitFitterData () |
Initialize fitter data. | |
virtual Bool_t | Initialize () |
Initialize fitter. | |
Bool_t | InitializeDependencies (TObjArray &Dependencies, Bool_t BlockPars, Bool_t DoInit) |
Initialize a list of dependencies (TGo4FitDependecy object), which used in configuration. | |
Bool_t | IsInitialized () const |
Return kTRUE, if Initialize() was done. | |
void | RunDependenciesList (TObjArray &Dependencies, Double_t *pars) |
Execute dependency equations. | |
![]() | |
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 | |
Bool_t | fbInitializationDone {kFALSE} |
Flag showing, that initialization was complete. | |
Bool_t | fbNeedToFinalize {kFALSE} |
Flag, showing, that finalize method should be called before fitter will be destroyed. | |
Bool_t | fbParsAsResults {kFALSE} |
Bool_t | fbParsChange {kFALSE} |
Boolean variable, showing that number of parameters is changed. | |
TObjArray | fxActions |
Array of actions objects (inherited from TGo4FitterAction). | |
TGo4FitterConfig * | fxCurrentConfig {nullptr} |
Pointer on currently activated config object. | |
TArrayD | fxResults |
Array of result values. | |
![]() | |
Bool_t | fbUpdateSlotList {kFALSE} |
TObjArray * | fxSlotList {nullptr} |
Abstract fitter class.
This is abstract class, which implement a general behavior of fitter. It has a list of all parameters (class inherited from TGo4FitParsList) and function, which should be fitted. It has a list of action, which may be performed on the fitter. The specific things, like list of data and list of models, are implemented in inherited TGo4Fitter class.
Definition at line 36 of file TGo4FitterAbstract.h.
TGo4FitterAbstract::TGo4FitterAbstract | ( | ) |
Default constructor.
Definition at line 33 of file TGo4FitterAbstract.cxx.
References TGo4FitParsList::TGo4FitParsList(), TGo4FitSlotList::TGo4FitSlotList(), fbInitializationDone, fbNeedToFinalize, fbParsAsResults, fbParsChange, fxActions, and fxResults.
Referenced by TGo4Fitter::TGo4Fitter(), TGo4Fitter::TGo4Fitter(), TGo4Fitter::TGo4Fitter(), CopyParsValuesFrom(), and ProcessObjects().
TGo4FitterAbstract::TGo4FitterAbstract | ( | const char * | iName, |
const char * | iTitle ) |
Create TGo4FitterAbstract object with given name and title.
TGo4FitterAbstract object should not be create directly, because it is abstract class. TGo4Fitter or other implementation class should be used.
Definition at line 39 of file TGo4FitterAbstract.cxx.
References TGo4FitParsList::TGo4FitParsList(), TGo4FitSlotList::TGo4FitSlotList(), fbInitializationDone, fbNeedToFinalize, fbParsAsResults, fbParsChange, fxActions, and fxResults.
|
virtual |
Destroy TGo4FitterAbstract object.
Definition at line 46 of file TGo4FitterAbstract.cxx.
References fbNeedToFinalize, and Finalize().
void TGo4FitterAbstract::AddAction | ( | TGo4FitterAction * | Action | ) |
Add action to action list.
Action is a object, derived from TGo4FitterAction class. Action object always owned by fitter, thus it will be destroyed when fitter is destroing. Therefore, stack object should not be added to fitter.
Definition at line 300 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by TGo4Fitter::AddAmplEstimation(), AddOutputAction(), AddSimpleMinuit(), BuildFitter(), TGo4FitPanel::Button_PerformFit(), and TGo4FitPanel::Cmd_AddNewAction().
void TGo4FitterAbstract::AddActionAt | ( | TGo4FitterAction * | Action, |
Int_t | indx ) |
Add action to action list at specified index.
Definition at line 305 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by Example11(), and TGo4FitPanel::GetPeakFinder().
TGo4FitterOutput * TGo4FitterAbstract::AddOutputAction | ( | const char * | Action, |
const char * | Option = nullptr ) |
Creates and add TGo4FitterOutput action with given parameters to actions list.
Definition at line 535 of file TGo4FitterAbstract.cxx.
References AddAction().
Referenced by TGo4FitPanel::Cmd_AddNewAction(), and Example3().
void TGo4FitterAbstract::AddSimpleMinuit | ( | ) |
Creates and add TGo4FitMinuit object to actions list.
TGo4FitMinuit object contain the only command: MIGRAD 500 1
Definition at line 528 of file TGo4FitterAbstract.cxx.
References AddAction(), and TGo4FitMinuit::AddCommand().
Referenced by TGo4Fitter::AddStandardActions(), TGo4FitPanel::Cmd_AddNewAction(), Example13(), and Example8().
Bool_t TGo4FitterAbstract::ApplyConfig | ( | TGo4FitterConfig * | Config | ) |
Set active configuration object.
This function calls in TGo4FitterConfig::DoAction() method.
Definition at line 200 of file TGo4FitterAbstract.cxx.
References CollectAllPars(), FinalizeDependencies(), fxCurrentConfig, TGo4FitParsList::GetParsValues(), InitializeDependencies(), NumPars(), RunDependenciesList(), and TGo4FitParsList::SetParsValues().
Referenced by TGo4FitterConfig::DoAction(), and Finalize().
Double_t TGo4FitterAbstract::CalculateFitFunction | ( | Double_t * | pars = nullptr | ) |
Calculates value of fit function.
Fitter should be initialized before. Instead of using values of parameters (from parameters list) array of values can be sets directly.
Definition at line 259 of file TGo4FitterAbstract.cxx.
References DoCalculation(), ExecuteDependencies(), and TGo4FitParsList::SetParsValues().
|
inlineprotected |
If appropriate flag sets (via SetParsListChange() method), function recollect all parameters from all objects, associated to fitter.
Definition at line 289 of file TGo4FitterAbstract.h.
References CollectAllPars(), and fbParsChange.
Referenced by DoActions(), Get(), and NumPars().
|
override |
Clear fitter.
Removes and delete all actions from actions list.
Definition at line 52 of file TGo4FitterAbstract.cxx.
References DeleteActions().
Referenced by TGo4Fitter::Clear().
|
protectedvirtual |
Should collect parameters from all associated to fitter objects.
This function should be extend in inherited classes.
Reimplemented in TGo4Fitter.
Definition at line 58 of file TGo4FitterAbstract.cxx.
References TGo4FitParsList::ClearPars(), fbParsChange, and fxCurrentConfig.
Referenced by ApplyConfig(), CheckParsListChanging(), TGo4Fitter::CollectAllPars(), CopyParsValuesFrom(), Initialize(), and IsSuitableConfig().
void TGo4FitterAbstract::CopyParsValuesFrom | ( | TGo4FitterAbstract * | fitter | ) |
If provided fitter has a same list of parameters, their values will be copied to fitter.
Definition at line 66 of file TGo4FitterAbstract.cxx.
References TGo4FitterAbstract(), CollectAllPars(), TGo4FitParsList::FindPar(), Get(), TGo4FitNamed::GetFullName(), TGo4FitParameter::GetValue(), NumPars(), and TGo4FitParameter::SetValue().
void TGo4FitterAbstract::DeleteAction | ( | TGo4FitterAction * | action | ) |
Remove action from actions list and destroy it.
Definition at line 317 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by TGo4FitPanel::Button_PerformFit(), and TGo4FitPanel::Cmd_DeleteAction().
|
inline |
Remove and delete all actions from actions list.
Definition at line 144 of file TGo4FitterAbstract.h.
References fxActions.
Referenced by Clear(), and TGo4FitPanel::Cmd_DeleteActions().
void TGo4FitterAbstract::DeleteOutputActions | ( | ) |
Remove and delete all output actions from actions list.
Definition at line 542 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by TGo4FitPanel::Cmd_DeleteOutputActions().
void TGo4FitterAbstract::DoAction | ( | Int_t | indx | ) |
Executes specified action from actions list.
Definition at line 388 of file TGo4FitterAbstract.cxx.
References DoAction(), and GetAction().
void TGo4FitterAbstract::DoAction | ( | TGo4FitterAction * | Action | ) |
Executes specified action.
Definition at line 371 of file TGo4FitterAbstract.cxx.
References TGo4FitterAction::DoAction(), Finalize(), Initialize(), and TGo4FitterAction::NeedBuffers().
Referenced by TGo4FitPanel::Button_PeakFinder(), TGo4FitPanel::Cmd_ExecuteAction(), and DoAction().
void TGo4FitterAbstract::DoActions | ( | Bool_t | AllowFitterChange = kFALSE, |
TObjArray * | Actions = nullptr ) |
Executes actions list.
First Initialize() method will be called to create buffers (if required by actions). Then for each action in actions list will be called DoAction() method. AllowFitterChange flag specify, if action which may change fitter, can be executed. Alternative array with actions can also be specified to function. In the end Finalize() method close all buffers.
Definition at line 340 of file TGo4FitterAbstract.cxx.
References TGo4FitterAction::CanChangeFitter(), CheckParsListChanging(), TGo4FitterAction::DoAction(), Finalize(), fxActions, Initialize(), and TGo4FitterAction::NeedBuffers().
Referenced by TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::Cmd_ExecuteActions(), Example1(), Example10(), Example11(), Example12(), Example13(), Example2(), Example3(), Example4(), Example5(), Example6(), Example7(), Example8(), and ProcessObjects().
|
inlineprotectedvirtual |
Calculates value of fit function according current values of parameters.
Should be implemented in inherited classes.
Reimplemented in TGo4Fitter.
Definition at line 295 of file TGo4FitterAbstract.h.
Referenced by CalculateFitFunction(), and Finalize().
|
inlineprotectedvirtual |
Calculates number of dimensions of freedom; Should be implemented in inherited classes.
Reimplemented in TGo4Fitter.
Definition at line 301 of file TGo4FitterAbstract.h.
Referenced by Finalize().
|
protected |
Execute dependencies in currently associated configuration (if exist).
Definition at line 170 of file TGo4FitterAbstract.cxx.
References fxCurrentConfig, and RunDependenciesList().
Referenced by TGo4Fitter::CalculateFitFunction(), and CalculateFitFunction().
|
protectedvirtual |
Remove all buffer, created in Initialize() routine.
Definition at line 269 of file TGo4FitterAbstract.cxx.
References ApplyConfig(), DoCalculation(), DoNDFCalculation(), TGo4FitDependency::ExecuteDependency(), fbInitializationDone, fbNeedToFinalize, FinalizeFitterData(), fxCurrentConfig, fxResults, TGo4FitParsList::GetParsValues(), and NumPars().
Referenced by ~TGo4FitterAbstract(), DoAction(), DoActions(), and Initialize().
|
protected |
Relese memory, allocated for dependency executions.
Definition at line 162 of file TGo4FitterAbstract.cxx.
References TGo4FitDependency::Finalize().
Referenced by ApplyConfig().
|
inlineprotectedvirtual |
Finalize fitter data.
Called during Finalize() method. Should be reimplemented in derived classes.
Reimplemented in TGo4Fitter.
Definition at line 335 of file TGo4FitterAbstract.h.
Referenced by Finalize().
|
inlineoverrideprotectedvirtual |
Return pointer on parameter of given index.
First check, if parameters should be recollected.
Reimplemented from TGo4FitParsList.
Definition at line 280 of file TGo4FitterAbstract.h.
References CheckParsListChanging(), and TGo4FitParsList::Get().
Referenced by CopyParsValuesFrom().
TGo4FitterAction * TGo4FitterAbstract::GetAction | ( | Int_t | num | ) |
Returns pointer on action with given index.
Definition at line 310 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by TGo4FitPanel::Button_PerformFit(), DoAction(), TGo4FitPanel::GetPeakFinder(), NeedPadsNumber(), SetPad(), and TGo4FitPanel::UpdateItem().
|
inline |
Returns number of action in actions list.
Definition at line 134 of file TGo4FitterAbstract.h.
References fxActions.
Referenced by TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::FillPopupForItem(), TGo4FitPanel::GetPeakFinder(), NeedPadsNumber(), SetPad(), and TGo4FitPanel::UpdateItem().
|
inline |
Return number of result values.
Definition at line 217 of file TGo4FitterAbstract.h.
References fxResults.
Referenced by QFitTableWidget::FillSpecificData(), GetResultValue(), PrintResults(), and ProcessObjects().
|
overridevirtual |
Return kTRUE, if epsilon value specified for parameter.
If configuration object assigned to fitter, epsilon value will be tested there first and only then original parameter configuration will be used.
Reimplemented from TGo4FitParsList.
Definition at line 99 of file TGo4FitterAbstract.cxx.
References fxCurrentConfig, and TGo4FitParsList::GetParEpsilon().
Referenced by TGo4FitMinuit::DoAction().
|
overridevirtual |
Return kTRUE, if parameter should be fixed.
If configuration object assigned to fitter, this flag will be tested there first and only then original parameter configuration will be used.
Reimplemented from TGo4FitParsList.
Definition at line 81 of file TGo4FitterAbstract.cxx.
References fxCurrentConfig, and TGo4FitParsList::GetParFixed().
Referenced by TGo4FitMinuit::DoAction().
|
overridevirtual |
Return kTRUE, if range condition specified for parameter and range boundaries.
If configuration object assigned to fitter, range values will be tested there first and only then original parameter configuration will be used.
Reimplemented from TGo4FitParsList.
Definition at line 89 of file TGo4FitterAbstract.cxx.
References fxCurrentConfig, and TGo4FitParsList::GetParRange().
Referenced by TGo4FitMinuit::DoAction().
Double_t TGo4FitterAbstract::GetResultFF | ( | ) | const |
Return result value of fit function.
Definition at line 594 of file TGo4FitterAbstract.cxx.
References fxResults.
Referenced by TGo4FitPanel::FillParsWidget(), QFitTableWidget::FillSpecificData(), and PrintResults().
Int_t TGo4FitterAbstract::GetResultNDF | ( | ) | const |
Return result value of number of degree of freedom.
Definition at line 587 of file TGo4FitterAbstract.cxx.
References fxResults.
Referenced by TGo4FitPanel::FillParsWidget(), QFitTableWidget::FillSpecificData(), and PrintResults().
|
inline |
Returns pointer on array of result values.
Definition at line 240 of file TGo4FitterAbstract.h.
References fxResults.
Referenced by ProcessObjects().
Double_t TGo4FitterAbstract::GetResultValue | ( | Int_t | n | ) | const |
Return value of result with given index.
Normally at the end of execution of actions list values of parameters stores to results array. This array can be accessed later by GetNumResults(), GetResultValue() or GetResults() methods. If configuration was assigned during action, it may provide alternative way to calculating result values, which will be stored in fitter.
Definition at line 580 of file TGo4FitterAbstract.cxx.
References fxResults, and GetNumResults().
Referenced by QFitTableWidget::FillSpecificData(), and PrintResults().
|
inlineprotectedvirtual |
Initialize fitter data.
Called during Initialize() method. Should be reimplemented in derived classes.
Reimplemented in TGo4Fitter.
Definition at line 328 of file TGo4FitterAbstract.h.
Referenced by Initialize().
|
protectedvirtual |
Initialize fitter.
Called automatically before any actions execution.
Definition at line 236 of file TGo4FitterAbstract.cxx.
References TGo4FitSlotList::CheckObjects(), TGo4FitParsList::ClearParsBlocking(), CollectAllPars(), fbInitializationDone, fbNeedToFinalize, Finalize(), and InitFitterData().
Referenced by DoAction(), and DoActions().
|
protected |
Initialize a list of dependencies (TGo4FitDependecy object), which used in configuration.
Definition at line 109 of file TGo4FitterAbstract.cxx.
References TGo4FitParsList::Find(), TGo4FitDependency::GetExpression(), TGo4FitDependency::GetParameter(), TGo4FitParsList::GetParFullName(), TGo4FitParsList::GetParIndex(), TGo4FitDependency::Initialize(), NumPars(), and TGo4FitParameter::SetBlocked().
Referenced by ApplyConfig(), and IsSuitableConfig().
|
inlineprotected |
Return kTRUE, if Initialize() was done.
Definition at line 263 of file TGo4FitterAbstract.h.
References fbInitializationDone.
Referenced by TGo4FitAmplEstimation::CalculateWithBuffers().
|
inline |
Return kTRUE, if parameters were taken as result values.
Definition at line 212 of file TGo4FitterAbstract.h.
References fbParsAsResults.
Referenced by ProcessObjects().
Bool_t TGo4FitterAbstract::IsSuitableConfig | ( | TGo4FitterConfig * | Config | ) |
Checks, if config object corresponds to fitter parameters.
Definition at line 176 of file TGo4FitterAbstract.cxx.
References CollectAllPars(), fxCurrentConfig, TGo4FitterConfig::GetParsDepend(), TGo4FitterConfig::GetParsInit(), TGo4FitterConfig::GetResults(), and InitializeDependencies().
Int_t TGo4FitterAbstract::NeedPadsNumber | ( | ) |
Returns required number of TPad for actions output.
Currently only "Draw" command of TGo4FitterOutput method requires pad for output.
Definition at line 554 of file TGo4FitterAbstract.cxx.
References GetAction(), GetNumActions(), and TGo4FitterOutput::NeedPad().
|
inlineoverridevirtual |
Return total number of parameters, which should be fitted.
Parameters are collects from all associated objects like data or models.
Reimplemented from TGo4FitParsList.
Definition at line 66 of file TGo4FitterAbstract.h.
References CheckParsListChanging(), and TGo4FitParsList::NumPars().
Referenced by ApplyConfig(), CopyParsValuesFrom(), TGo4FitMinuit::DoAction(), Finalize(), InitializeDependencies(), and ProcessObjects().
|
override |
Print information about fitter to standard output.
Definition at line 610 of file TGo4FitterAbstract.cxx.
References fxActions, TGo4FitNamed::Print(), and TGo4FitParsList::Print().
Referenced by TGo4FitterOutput::DoAction(), and TGo4Fitter::Print().
void TGo4FitterAbstract::PrintResults | ( | ) | const |
Print result values to standard output.
Definition at line 601 of file TGo4FitterAbstract.cxx.
References GetNumResults(), GetResultFF(), GetResultNDF(), and GetResultValue().
Referenced by TGo4Fitter::Print().
TObjArray * TGo4FitterAbstract::ProcessObjects | ( | TObjArray * | objs, |
Bool_t | CloneFitter = kTRUE, | ||
Bool_t | OnlyRequired = kTRUE, | ||
TObjArray * | rownames = nullptr, | ||
TObjArray * | colnames = nullptr ) |
Definition at line 393 of file TGo4FitterAbstract.cxx.
References TGo4FitterAbstract(), DoActions(), TGo4FitSlot::GetClass(), GetNumResults(), TGo4FitSlot::GetObject(), TGo4FitParsList::GetParFullName(), GetResults(), TGo4FitSlotList::GetSlot(), IsParsAsResults(), TGo4FitSlot::IsRequired(), TGo4FitSlot::IsSuitable(), TGo4FitParsList::MemorizePars(), NumPars(), TGo4FitSlotList::NumSlots(), TGo4FitParsList::RememberPars(), and TGo4FitSlot::SetObject().
void TGo4FitterAbstract::ReplaceAction | ( | TGo4FitterAction * | action, |
Int_t | dir ) |
Shift action in action list upward (dir=-1) or downward (dir=+1).
Definition at line 328 of file TGo4FitterAbstract.cxx.
References fxActions.
Referenced by TGo4FitPanel::Cmd_MoveAction().
|
protected |
Execute dependency equations.
Definition at line 156 of file TGo4FitterAbstract.cxx.
Referenced by ApplyConfig(), and ExecuteDependencies().
void TGo4FitterAbstract::SetPad | ( | Int_t | indx, |
TVirtualPad * | pad ) |
Set pad, which will be used for output of TGo4FitterOutput object.
If pad will not be set or command will not create new pad, current gPad object will be used for output. Thus, if several "Draw" command occur, result of last command will be seen on current pad.
Definition at line 565 of file TGo4FitterAbstract.cxx.
References GetAction(), GetNumActions(), TGo4FitterOutput::NeedPad(), and TGo4FitterOutput::SetPad().
|
inline |
Should be used, when number of parameters are changed.
Next time, when somebody will access fitter parameter list, fitter automatically recollect parameters from associated objects.
Definition at line 76 of file TGo4FitterAbstract.h.
References fbParsChange.
Referenced by TGo4Fitter::AddData(), TGo4Fitter::AddModel(), TGo4Fitter::AddModel(), TGo4Fitter::AssignModelTo(), TGo4Fitter::ClearModelAssignmentTo(), TGo4Fitter::DeleteAllData(), TGo4Fitter::DeleteAllModels(), TGo4Fitter::DeleteModelsAssosiatedTo(), TGo4Fitter::RemoveData(), and TGo4Fitter::RemoveModel().
|
protected |
Flag showing, that initialization was complete.
Definition at line 362 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), Finalize(), Initialize(), and IsInitialized().
|
protected |
Flag, showing, that finalize method should be called before fitter will be destroyed.
Definition at line 367 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), ~TGo4FitterAbstract(), Finalize(), and Initialize().
|
protected |
Definition at line 369 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), and IsParsAsResults().
|
protected |
Boolean variable, showing that number of parameters is changed.
Definition at line 357 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), CheckParsListChanging(), CollectAllPars(), and SetParsListChange().
|
protected |
Array of actions objects (inherited from TGo4FitterAction).
Definition at line 340 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), AddAction(), AddActionAt(), DeleteAction(), DeleteActions(), DeleteOutputActions(), DoActions(), GetAction(), GetNumActions(), Print(), and ReplaceAction().
|
protected |
Pointer on currently activated config object.
Definition at line 352 of file TGo4FitterAbstract.h.
Referenced by ApplyConfig(), CollectAllPars(), ExecuteDependencies(), Finalize(), GetParEpsilon(), GetParFixed(), GetParRange(), and IsSuitableConfig().
|
protected |
Array of result values.
If no specific configuration is used, this just values of fitter parameters. Result array creates in the end of actions execution.
Definition at line 347 of file TGo4FitterAbstract.h.
Referenced by TGo4FitterAbstract(), TGo4FitterAbstract(), Finalize(), GetNumResults(), GetResultFF(), GetResultNDF(), GetResults(), and GetResultValue().