Public Member Functions | Protected Member Functions | Private Attributes

TGo4FitParsList Class Reference

#include <TGo4FitParsList.h>

Inheritance diagram for TGo4FitParsList:
TGo4FitNamed TGo4FitAxisTrans TGo4FitComponent TGo4FitterAbstract TGo4FitLinearTrans TGo4FitMatrixTrans TGo4FitData TGo4FitModel TGo4Fitter TGo4FitDataGraph TGo4FitDataHistogram TGo4FitDataProfile TGo4FitDataRidge TGo4FitModelFormula TGo4FitModelFromData TGo4FitModelFunction TGo4FitModelGauss1 TGo4FitModelGauss2 TGo4FitModelGaussN TGo4FitModelPolynom TModelTemplate

List of all members.

Public Member Functions

 TGo4FitParsList ()
 TGo4FitParsList (Bool_t IsParsOwned)
 TGo4FitParsList (const char *Name, const char *Title, Bool_t IsParsOwned)
virtual ~TGo4FitParsList ()
virtual Int_t NumPars ()
TGo4FitParameterGetPar (Int_t n)
Int_t GetParIndex (const TGo4FitParameter *par)
TGo4FitParameterFindPar (const char *ParName)
TGo4FitParameterFindPar (const char *OwnerFullName, const char *ParName)
TGo4FitParameterFindPar (TGo4FitParameter *par)
Double_t GetParValue (const char *ParName)
Bool_t SetParValue (const char *ParName, Double_t iValue)
void GetParsValues (Double_t *pars)
void SetParsValues (Double_t *pars)
Double_t GetParError (const char *ParName)
Bool_t SetParError (const char *ParName, Double_t iError)
virtual Bool_t SetParFixed (const char *ParName, Bool_t iFixed=kTRUE)
virtual Bool_t GetParFixed (const char *ParName)
Int_t NumFixedPars ()
Int_t NumFreePars ()
virtual Bool_t SetParRange (const char *ParName, Double_t RangeMin, Double_t RangeMax)
virtual Bool_t GetParRange (const char *ParName, Double_t &RangeMin, Double_t &RangeMax)
virtual Bool_t SetParEpsilon (const char *ParName, Double_t Epsilon)
virtual Bool_t GetParEpsilon (const char *ParName, Double_t &Epsilon)
void SetParName (Int_t n, const char *name)
const char * GetParName (Int_t n)
const char * GetParFullName (Int_t n)
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")
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.)
virtual void MemorizePars ()
virtual bool CanRollbackPars ()
virtual void RememberPars ()
Bool_t IsAllParsFixed ()
TGo4FitParameterCreatePar (const char *ParName, const char *Title, Double_t iValue=0)
Bool_t RemovePar (const char *name)
Bool_t RemovePar (TGo4FitParameter *par)
virtual void Print (Option_t *option) const
void PrintPars () const
virtual void CollectParsTo (TGo4FitParsList &list)
void ClearPars ()

Protected Member Functions

TGo4FitParameterAddPar (TGo4FitParameter *par)
TGo4FitParameterInsertPar (TGo4FitParameter *par, Int_t indx)
void SetParsOwner (TGo4FitNamed *iOwner)
void ClearParsBlocking ()
virtual TGo4FitParameterGet (Int_t n)
TGo4FitParameterFind (const char *ParName)
TGo4FitParameterFind (const char *OwnerFullName, const char *ParName)
TGo4FitParameterFind (TGo4FitParameter *par)
Bool_t RemoveParByIndex (Int_t indx)

Private Attributes

TOrdCollection fxPars
Bool_t fbCanRollbackPars

Detailed Description

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.

Definition at line 28 of file TGo4FitParsList.h.


Constructor & Destructor Documentation

TGo4FitParsList::TGo4FitParsList (  ) 

Default constructor.

Definition at line 23 of file TGo4FitParsList.cxx.

Referenced by TGo4FitModel::Initialize().

TGo4FitParsList::TGo4FitParsList ( Bool_t  IsParsOwned  ) 

Create TGo4FitParsList object and set flag of ownership of parameters object.

Definition at line 29 of file TGo4FitParsList.cxx.

References fxPars.

TGo4FitParsList::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.

Definition at line 35 of file TGo4FitParsList.cxx.

References fxPars.

TGo4FitParsList::~TGo4FitParsList (  )  [virtual]

Destroy TGo4FitParsList object.

Definition at line 41 of file TGo4FitParsList.cxx.


Member Function Documentation

virtual bool TGo4FitParsList::CanRollbackPars (  )  [inline, virtual]

Return true if parameters can be safely restored from memorized values;

Definition at line 213 of file TGo4FitParsList.h.

References fbCanRollbackPars.

Referenced by TGo4FitPanel::AboutToShowFitterMenu().

void TGo4FitParsList::ClearPars (  ) 

Remove all parameters from list. If parameters owned by list, they will be destroyed.

Definition at line 318 of file TGo4FitParsList.cxx.

References fbCanRollbackPars, and fxPars.

Referenced by TGo4FitPanel::Cmd_DeletePars(), TGo4FitterAbstract::CollectAllPars(), and TGo4FitMatrixTrans::SetNumAxis().

void TGo4FitParsList::ClearParsBlocking (  )  [protected]

Definition at line 312 of file TGo4FitParsList.cxx.

References TGo4FitParameter::ClearBlocked(), Get(), and NumPars().

Referenced by TGo4FitterAbstract::Initialize().

void TGo4FitParsList::CollectParsTo ( TGo4FitParsList list  )  [virtual]

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.

Definition at line 304 of file TGo4FitParsList.cxx.

References AddPar(), Get(), GetParIndex(), and NumPars().

Referenced by TGo4FitterAbstract::CollectAllPars(), and TGo4FitComponent::CollectParsTo().

TGo4FitParameter * TGo4FitParsList::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. Return created parameter object.

Definition at line 248 of file TGo4FitParsList.cxx.

References AddPar(), and Find().

Referenced by TGo4FitterConfig::AddParNew(), TGo4FitPanel::Cmd_AddNewPar(), TGo4FitterConfig::MakeParForProperties(), and TGo4FitMatrixTrans::SetNumAxis().

TGo4FitParameter * TGo4FitParsList::Find ( const char *  OwnerFullName,
const char *  ParName 
) [protected]
TGo4FitParameter * TGo4FitParsList::Find ( TGo4FitParameter par  )  [protected]

Definition at line 276 of file TGo4FitParsList.cxx.

References Get(), and NumPars().

TGo4FitParameter* TGo4FitParsList::FindPar ( const char *  OwnerFullName,
const char *  ParName 
) [inline]

Find parameter with given owner full name and parameter name. If no such parameters exists, return 0.

Definition at line 78 of file TGo4FitParsList.h.

References Find().

TGo4FitParameter* TGo4FitParsList::FindPar ( TGo4FitParameter par  )  [inline]

Find parameter in list. If no such parameters exists, return 0.

Definition at line 84 of file TGo4FitParsList.h.

References Find().

TGo4FitParameter* TGo4FitParsList::FindPar ( const char *  ParName  )  [inline]
Bool_t TGo4FitParsList::GetParEpsilon ( const char *  ParName,
Double_t &  Epsilon 
) [virtual]

Get epsilon value for parameter with given name. Return kTRUE, is succesfull.

Definition at line 142 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::GetEpsilon().

Referenced by TGo4FitterConfig::GetParEpsilon().

Double_t TGo4FitParsList::GetParError ( const char *  ParName  ) 

Get error value for parameter with given name. If no such parameters, return 0.

Definition at line 79 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::GetError().

Bool_t TGo4FitParsList::GetParFixed ( const char *  ParName  )  [virtual]

Return status for parameter with given name, is it fixed or not. If parameter not exist, return kFALSE.

Definition at line 100 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::GetFixed().

Referenced by TGo4FitterConfig::GetParFixed().

const char * TGo4FitParsList::GetParFullName ( Int_t  n  ) 

Return full name of parameter with given index. If index out of valid range, return 0.

Definition at line 160 of file TGo4FitParsList.cxx.

References Get(), and TGo4FitNamed::GetFullName().

Referenced by TGo4FitPanel::Button_FitterDraw(), TGo4FitMinuit::DoAction(), TGo4FitterAbstract::InitializeDependencies(), PrintPars(), and TGo4FitterAbstract::ProcessObjects().

const char * TGo4FitParsList::GetParName ( Int_t  n  ) 

Return name of parameter with given index. If index out of valid range, return 0.

Definition at line 154 of file TGo4FitParsList.cxx.

References Get().

Referenced by TGo4FitModelFormula::CompileFormula().

Bool_t TGo4FitParsList::GetParRange ( const char *  ParName,
Double_t &  RangeMin,
Double_t &  RangeMax 
) [virtual]

Get range limits for parameter with given name. If succesfull, return kTRUE.

Definition at line 128 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::GetRange().

Referenced by TGo4FitterConfig::GetParRange().

void TGo4FitParsList::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.

Definition at line 66 of file TGo4FitParsList.cxx.

References Get(), TGo4FitParameter::GetValue(), and NumPars().

Referenced by TGo4FitterAbstract::ApplyConfig(), TGo4FitModel::BeforeEval(), TGo4FitterAbstract::Finalize(), TGo4FitModel::Initialize(), and TGo4FitMatrixTrans::SetNumAxis().

Double_t TGo4FitParsList::GetParValue ( const char *  ParName  ) 

Return value of parameter with given name. If no such parameter, return 0.

Definition at line 52 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::GetValue().

Referenced by TGo4FitMinuit::DoAction(), and TXXXCalibPar::UpdateFrom().

TGo4FitParameter * TGo4FitParsList::InsertPar ( TGo4FitParameter par,
Int_t  indx 
) [protected]
Bool_t TGo4FitParsList::IsAllParsFixed (  ) 

Returns true, if all parameters in list fixed;

Definition at line 207 of file TGo4FitParsList.cxx.

References Get(), TGo4FitParameter::GetFixed(), and NumPars().

Referenced by TGo4FitData::Initialize().

void TGo4FitParsList::MemorizePars (  )  [virtual]

Memorize values of all parameters. This values can be restore later by RemeberedPars().

Definition at line 194 of file TGo4FitParsList.cxx.

References fbCanRollbackPars, Get(), TGo4FitParameter::MemorizeValue(), and NumPars().

Referenced by TGo4FitPanel::Button_PerformFit(), TGo4FitPanel::Cmd_ExecuteActions(), TGo4FitPanel::Cmd_MemorizePars(), and TGo4FitterAbstract::ProcessObjects().

Int_t TGo4FitParsList::NumFixedPars (  ) 

Return number of fixed pars

Definition at line 107 of file TGo4FitParsList.cxx.

References Get(), TGo4FitParameter::GetFixed(), and NumPars().

Referenced by NumFreePars().

Int_t TGo4FitParsList::NumFreePars (  ) 

Return number of free pars

Definition at line 115 of file TGo4FitParsList.cxx.

References NumFixedPars(), and NumPars().

Referenced by TGo4Fitter::CalculateNDF().

void TGo4FitParsList::Print ( Option_t *  option  )  const [virtual]

Default print method. Call print method for every parameter object in list.

Reimplemented from TGo4FitNamed.

Reimplemented in TGo4FitLinearTrans, and TGo4FitMatrixTrans.

Definition at line 214 of file TGo4FitParsList.cxx.

References fxPars, GetPar(), NumPars(), and TGo4FitParameter::Print().

Referenced by TGo4FitterConfig::Print().

void TGo4FitParsList::PrintPars (  )  const

Print only value and error of all parameters in list.

Definition at line 224 of file TGo4FitParsList.cxx.

References TGo4FitParameter::GetError(), GetPar(), GetParFullName(), TGo4FitParameter::GetValue(), l, and NumPars().

Referenced by Example6(), and TGo4Fitter::Print().

void TGo4FitParsList::RememberPars (  )  [virtual]

Restore parameters values, which were stored by MemorizePars() routine;

Definition at line 201 of file TGo4FitParsList.cxx.

References Get(), NumPars(), and TGo4FitParameter::RememberValue().

Referenced by TGo4FitPanel::Cmd_RememberPars(), TGo4FitPanel::Fitter_RollbackParameters(), and TGo4FitterAbstract::ProcessObjects().

Bool_t TGo4FitParsList::RemovePar ( const char *  name  ) 

Remove parameter from list with given name. If parameter owned by list, parameter will be destroyed. Return kTRUE if succesfull.

Definition at line 289 of file TGo4FitParsList.cxx.

References FindPar().

Referenced by TGo4FitPanel::Cmd_DeletePar(), RemoveParByIndex(), TGo4FitModelGaussN::SetAxisNumbers(), TGo4FitModelPolynom::SetMaxNumAxis(), TGo4FitModelFormula::SetNumberOfExprPar(), and TGo4FitModelFunction::SetNumberOfFuncPar().

Bool_t TGo4FitParsList::RemovePar ( TGo4FitParameter par  ) 

Remove parameter from list. If parameter owned by list, parameter will be destroyed. Return kTRUE if succesfull.

Definition at line 294 of file TGo4FitParsList.cxx.

References fbCanRollbackPars, and fxPars.

Bool_t TGo4FitParsList::RemoveParByIndex ( Int_t  indx  )  [protected]

Definition at line 283 of file TGo4FitParsList.cxx.

References Get(), NumPars(), and RemovePar().

Referenced by TGo4FitComponent::RemoveAmpl().

Bool_t TGo4FitParsList::SetParEpsilon ( const char *  ParName,
Double_t  Epsilon 
) [virtual]

Set epsilon value for parameter with given name. Return kTRUE, if parameter exist.

Definition at line 135 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::SetEpsilon().

Bool_t TGo4FitParsList::SetParError ( const char *  ParName,
Double_t  iError 
)

Set error value for parameter with given name. If such parameters exists, return kTRUE, otherwise kFALSE.

Definition at line 86 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::SetError().

Referenced by TGo4FitMinuit::DoAction().

Bool_t TGo4FitParsList::SetParFixed ( const char *  ParName,
Bool_t  iFixed = kTRUE 
) [virtual]

Set for parameter with given name, is it fixed or not.

Definition at line 93 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::SetFixed().

void TGo4FitParsList::SetParName ( Int_t  n,
const char *  name 
)

Set new name for parameter object with provided index.

Definition at line 149 of file TGo4FitParsList.cxx.

References Get().

Referenced by SetParsNames().

Bool_t TGo4FitParsList::SetParRange ( const char *  ParName,
Double_t  RangeMin,
Double_t  RangeMax 
) [virtual]

Set range limits for parameter with given name. Return kTRUE, if parameter exist.

Definition at line 121 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::SetRange().

void TGo4FitParsList::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. 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.

Definition at line 166 of file TGo4FitParsList.cxx.

References SetParName().

Referenced by TGo4FitPanel::CreateModel(), Example13(), and Example2().

void TGo4FitParsList::SetParsOwner ( TGo4FitNamed iOwner  )  [protected]

Definition at line 242 of file TGo4FitParsList.cxx.

References Get(), NumPars(), and TGo4FitNamed::SetOwner().

void TGo4FitParsList::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. For instance, list->SetParsValues(1,345,23); If more than 3 parameters in list, for rest 0 values will be set.

Definition at line 180 of file TGo4FitParsList.cxx.

References Get(), and TGo4FitParameter::SetValue().

void TGo4FitParsList::SetParsValues ( Double_t *  pars  ) 
Bool_t TGo4FitParsList::SetParValue ( const char *  ParName,
Double_t  iValue 
)

Set value of parameter with given name. Return kTRUE in case of success, otherwise 0.

Definition at line 59 of file TGo4FitParsList.cxx.

References Find(), and TGo4FitParameter::SetValue().

Referenced by TGo4FitMinuit::DoAction(), Example3(), and Example4().


Member Data Documentation

If true, parameters can be safely rollback

Definition at line 287 of file TGo4FitParsList.h.

Referenced by AddPar(), CanRollbackPars(), ClearPars(), InsertPar(), MemorizePars(), and RemovePar().

TOrdCollection TGo4FitParsList::fxPars [private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines