v2.10-0 (21000JUN2005)

Go4Fit
Class TGo4FitParsList

Direct Known Subclasses:
TGo4FitAxisTrans, TGo4FitComponent, TGo4FitterAbstract

class TGo4FitParsList
derived from TGo4FitNamed

List of TGo4FitParameter objects.
Contain list of parameters and provides access to parameters properties via names.
Parameters objects may owned or not owned by TGo4FitParsList object.


Field Summary
 private Bool_tfbCanRollbackPars
          If true, parameters can be safely rollback
 private TOrdCollectionfxPars
           

Fields inherited from class TNamed
fName, fTitle

Constructor Summary
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.

Destructor Summary
 virtual synchronized ~TGo4FitParsList()
          Destroy TGo4FitParsList object.

Method Summary
 protected TGo4FitParameter*AddPar(TGo4FitParameter* par)
           
 virtual boolCanRollbackPars()
          Return true if parameters can be safely restored from memorized values;
 voidClearPars()
          Remove all parameters from list.
 protected voidClearParsBlocking()
           
 virtual voidCollectParsTo(TGo4FitParsList& list)
          Add all parameters to provided TGo4FitParsList object.
 TGo4FitParameter*CreatePar(const char * ParName, const char * Title, Double_t iValue)
          Create new TGo4FitParameter object with given name, title and parameter value, and put this object to the list.
 protected TGo4FitParameter*Find(const char * ParName)
           
 protected TGo4FitParameter*Find(const char * OwnerFullName, const char * ParName)
           
 protected TGo4FitParameter*Find(TGo4FitParameter* par)
           
 TGo4FitParameter*FindPar(const char * ParName)
          Find parameter object with given name.
 TGo4FitParameter*FindPar(const char * OwnerFullName, const char * ParName)
          Find parameter with given owner full name and parameter name.
 TGo4FitParameter*FindPar(TGo4FitParameter* par)
          Find parameter in list.
 protected virtual TGo4FitParameter*Get(Int_t n)
           
 TGo4FitParameter*GetPar(Int_t n)
          Return parameter according given index.
 virtual Bool_tGetParEpsilon(const char * ParName, Double_t& Epsilon)
          Get epsilon value for parameter with given name.
 Double_tGetParError(const char * ParName)
          Get error value for parameter with given name.
 virtual Bool_tGetParFixed(const char * ParName)
          Return status for parameter with given name, is it fixed or not.
 const const char *GetParFullName(Int_t n)
          Return full name of parameter with given index.
 Int_tGetParIndex(const TGo4FitParameter* par)
          Return index of given parameter in list.
 const const char *GetParName(Int_t n)
          Return name of parameter with given index.
 virtual Bool_tGetParRange(const char * ParName, Double_t& RangeMin, Double_t& RangeMax)
          Get range limits for parameter with given name.
 voidGetParsValues(Double_t* pars)
          Copy values of all parameters in list to provided array.
 Double_tGetParValue(const char * ParName)
          Return value of parameter with given name.
 protected TGo4FitParameter*InsertPar(TGo4FitParameter* par, Int_t indx)
           
 Bool_tIsAllParsFixed()
          Returns true, if all parameters in list fixed;
 virtual voidMemorizePars()
          Memorize values of all parameters.
 Int_tNumFixedPars()
          Return number of fixed pars
 Int_tNumFreePars()
          Return number of free pars
 virtual Int_tNumPars()
          Return number of parameters in list.
 virtual const voidPrint(Option_t* option)
          Default print method.
 const voidPrintPars()
          Print only value and error of all parameters in list.
 virtual voidRememberPars()
          Restore parameters values, which were stored by MemorizePars() routine;
 Bool_tRemovePar(const char * name)
          Remove parameter from list with given name.
 Bool_tRemovePar(TGo4FitParameter* par)
          Remove parameter from list.
 protected Bool_tRemoveParByIndex(Int_t indx)
           
 virtual Bool_tSetParEpsilon(const char * ParName, Double_t Epsilon)
          Set epsilon value for parameter with given name.
 Bool_tSetParError(const char * ParName, Double_t iError)
          Set error value for parameter with given name.
 virtual Bool_tSetParFixed(const char * ParName, Bool_t iFixed)
          Set for parameter with given name, is it fixed or not.
 voidSetParName(Int_t n, const char * name)
          Set new name for parameter object with provided index.
 virtual Bool_tSetParRange(const char * ParName, Double_t RangeMin, Double_t RangeMax)
          Set range limits for parameter with given name.
 voidSetParsNames(const char * name0, const char * name1, const char * name2, const char * name3, const char * name4, const char * name5, const char * name6, const char * name7, const char * name8, const char * name9)
          Set names of first 10 parameters.
 protected voidSetParsOwner(TGo4FitNamed* iOwner)
           
 voidSetParsValues(Double_t* pars)
          Set value for all parameters from array.
 voidSetParsValues(Double_t par0, Double_t par1, Double_t par2, Double_t par3, Double_t par4, Double_t par5, Double_t par6, Double_t par7, Double_t par8, Double_t par9)
          Set values for first 10 parameters.
 Bool_tSetParValue(const char * ParName, Double_t iValue)
          Set value of parameter with given name.

Methods inherited from class Go4Fit.TGo4FitNamed
GetFullName, GetOwner, GetOwnerFullName, SetOwner

Methods inherited from class TNamed
operator=, Clear, Clone, Compare, Copy, FillBuffer, GetName, GetTitle, Hash, IsSortable, SetName, SetNameTitle, SetTitle, ls, Sizeof, Class, Class_Name, Class_Version, Dictionary, IsA, ShowMembers, Streamer, StreamerNVirtual, DeclFileName, ImplFileLine, ImplFileName, DeclFileLine

Field Detail

fbCanRollbackPars

private Bool_t fbCanRollbackPars
If true, parameters can be safely rollback

fxPars

private TOrdCollection fxPars
Constructor Detail

TGo4FitParsList

public TGo4FitParsList()
Default constructor.

TGo4FitParsList

public TGo4FitParsList(Bool_t IsParsOwned)
Create TGo4FitParsList object and set flag of ownership of parameters object.

TGo4FitParsList

public 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.
Method Detail

~TGo4FitParsList

public virtual synchronized ~TGo4FitParsList()
Destroy TGo4FitParsList object.
Method Detail

AddPar

protected TGo4FitParameter* AddPar(TGo4FitParameter* par)

CanRollbackPars

public virtual bool CanRollbackPars()
Return true if parameters can be safely restored from memorized values;

ClearPars

public void ClearPars()
Remove all parameters from list.
If parameters owned by list, they will be destroyed.

ClearParsBlocking

protected void ClearParsBlocking()

CollectParsTo

public virtual void CollectParsTo(TGo4FitParsList& list)
Add all parameters to provided TGo4FitParsList object.
User should take care, that both source and destination have not ownership flag at same time, otherwise it can cause error during these lists destroyment.

CreatePar

public TGo4FitParameter* CreatePar(const char * ParName, const char * Title, Double_t iValue)
Create new TGo4FitParameter object with given name, title and parameter value, and put this object to the list.
Return created parameter object.

Find

protected TGo4FitParameter* Find(const char * ParName)

Find

protected TGo4FitParameter* Find(const char * OwnerFullName, const char * ParName)

Find

protected TGo4FitParameter* Find(TGo4FitParameter* par)

FindPar

public TGo4FitParameter* FindPar(const char * ParName)
Find parameter object with given name.
Name can be both name or full name of TGo4FitParameter object. If no such parameters exists, return 0.

FindPar

public TGo4FitParameter* FindPar(const char * OwnerFullName, const char * ParName)
Find parameter with given owner full name and parameter name.
If no such parameters exists, return 0.

FindPar

public TGo4FitParameter* FindPar(TGo4FitParameter* par)
Find parameter in list.
If no such parameters exists, return 0.

Get

protected virtual TGo4FitParameter* Get(Int_t n)

GetPar

public TGo4FitParameter* GetPar(Int_t n)
Return parameter according given index.
If index out of valid range, return 0.

GetParEpsilon

public virtual Bool_t GetParEpsilon(const char * ParName, Double_t& Epsilon)
Get epsilon value for parameter with given name.
Return kTRUE, is succesfull.

GetParError

public Double_t GetParError(const char * ParName)
Get error value for parameter with given name.
If no such parameters, return 0.

GetParFixed

public virtual Bool_t GetParFixed(const char * ParName)
Return status for parameter with given name, is it fixed or not.
If parameter not exist, return kFALSE.

GetParFullName

public const const char * GetParFullName(Int_t n)
Return full name of parameter with given index.
If index out of valid range, return 0.

GetParIndex

public Int_t GetParIndex(const TGo4FitParameter* par)
Return index of given parameter in list.
If parameter not in list, return -1.

GetParName

public const const char * GetParName(Int_t n)
Return name of parameter with given index.
If index out of valid range, return 0.

GetParRange

public virtual Bool_t GetParRange(const char * ParName, Double_t& RangeMin, Double_t& RangeMax)
Get range limits for parameter with given name.
If succesfull, return kTRUE.

GetParsValues

public void GetParsValues(Double_t* pars)
Copy values of all parameters in list to provided array.
Array should have at lest NumPars() elements, otherwise routine can cause error.

GetParValue

public Double_t GetParValue(const char * ParName)
Return value of parameter with given name.
If no such parameter, return 0.

InsertPar

protected TGo4FitParameter* InsertPar(TGo4FitParameter* par, Int_t indx)

IsAllParsFixed

public Bool_t IsAllParsFixed()
Returns true, if all parameters in list fixed;

MemorizePars

public virtual void MemorizePars()
Memorize values of all parameters.
This values can be restore later by RemeberedPars().

NumFixedPars

public Int_t NumFixedPars()
Return number of fixed pars

NumFreePars

public Int_t NumFreePars()
Return number of free pars

NumPars

public virtual Int_t NumPars()
Return number of parameters in list.

Print

public virtual const void Print(Option_t* option)
Default print method.
Call print method for every parameter object in list.

PrintPars

public const void PrintPars()
Print only value and error of all parameters in list.

RememberPars

public virtual void RememberPars()
Restore parameters values, which were stored by MemorizePars() routine;

RemovePar

public Bool_t RemovePar(const char * name)
Remove parameter from list with given name.
If parameter owned by list, parameter will be destroyed.
Return kTRUE if succesfull.

RemovePar

public Bool_t RemovePar(TGo4FitParameter* par)
Remove parameter from list.
If parameter owned by list, parameter will be destroyed.
Return kTRUE if succesfull.

RemoveParByIndex

protected Bool_t RemoveParByIndex(Int_t indx)

SetParEpsilon

public virtual Bool_t SetParEpsilon(const char * ParName, Double_t Epsilon)
Set epsilon value for parameter with given name.
Return kTRUE, if parameter exist.

SetParError

public Bool_t SetParError(const char * ParName, Double_t iError)
Set error value for parameter with given name.
If such parameters exists, return kTRUE, otherwise kFALSE.

SetParFixed

public virtual Bool_t SetParFixed(const char * ParName, Bool_t iFixed)
Set for parameter with given name, is it fixed or not.

SetParName

public void SetParName(Int_t n, const char * name)
Set new name for parameter object with provided index.

SetParRange

public virtual Bool_t SetParRange(const char * ParName, Double_t RangeMin, Double_t RangeMax)
Set range limits for parameter with given name.
Return kTRUE, if parameter exist.

SetParsNames

public void SetParsNames(const char * name0, const char * name1, const char * name2, const char * name3, const char * name4, const char * name5, const char * name6, const char * name7, const char * name8, const char * name9)
Set names of first 10 parameters.
For instance:
list->SetParsNames("CoefK","CoefB","Const").
If there are more then 3 parameters in list, for the rest parameters standard names will be applied: "Par3", "Par4" and so on.

SetParsOwner

protected void SetParsOwner(TGo4FitNamed* iOwner)

SetParsValues

public void SetParsValues(Double_t* pars)
Set value for all parameters from array.

SetParsValues

public void SetParsValues(Double_t par0, Double_t par1, Double_t par2, Double_t par3, Double_t par4, Double_t par5, Double_t par6, Double_t par7, Double_t par8, Double_t par9)
Set values for first 10 parameters.
For instance,
list->SetParsValues(1,345,23);
If more than 3 parameters in list, for rest 0 values will be set.

SetParValue

public Bool_t SetParValue(const char * ParName, Double_t iValue)
Set value of parameter with given name.
Return kTRUE in case of success, otherwise 0.

Association Links

to Class TOrdCollection

to Class TGo4FitParameter

Label TOrdCollection
Supplier Cardinality 0..*
Type aggregation

J.Adamczewski, M.Al-Turany, D.Bertini, H.G.Essel, S.Linev

30-06-2005