Public Member Functions | Protected Member Functions | Private Attributes

TGo4FitComponent Class Reference

#include <TGo4FitComponent.h>

Inheritance diagram for TGo4FitComponent:
TGo4FitParsList TGo4FitSlotList TGo4FitNamed TGo4FitData TGo4FitModel TGo4FitDataGraph TGo4FitDataHistogram TGo4FitDataProfile TGo4FitDataRidge TGo4FitModelFormula TGo4FitModelFromData TGo4FitModelFunction TGo4FitModelGauss1 TGo4FitModelGauss2 TGo4FitModelGaussN TGo4FitModelPolynom TModelTemplate

List of all members.

Public Member Functions

 TGo4FitComponent ()
 TGo4FitComponent (const char *iName, const char *iTitle)
virtual ~TGo4FitComponent ()
TGo4FitParameterGetAmplPar ()
const char * GetAmplName ()
const char * GetAmplFullName ()
Double_t GetAmplValue ()
void SetAmplValue (Double_t iAmpl)
Double_t GetAmplError ()
void SetAmplError (Double_t iError)
Bool_t MakeAmpl (Bool_t isFixed=kFALSE)
Bool_t RemoveAmpl ()
virtual Bool_t CanAmplTouch ()
void SetRange (Int_t naxis, Double_t min, Double_t max)
void ExcludeRange (Int_t naxis, Double_t min, Double_t max)
void SetRangeMin (Int_t naxis, Double_t value)
void SetRangeMax (Int_t naxis, Double_t value)
void AddRangeCut (TCutG *cut, Bool_t exclude=kFALSE)
void ClearRanges (Int_t naxis=-1)
Bool_t IsAnyRangeLimits ()
Bool_t GetRangeMin (Int_t naxis, Double_t &value)
Bool_t GetRangeMax (Int_t naxis, Double_t &value)
Int_t GetNumRangeCondition () const
void GetRangeCondition (Int_t n, Int_t &typ, Int_t &naxis, Double_t &left, Double_t &right) const
void SetRangeCondition (Int_t n, Int_t typ, Int_t naxis, Double_t left, Double_t right)
void AddRangeCondition (Int_t typ, Int_t naxis, Double_t left, Double_t right)
void RemoveRangeCondition (Int_t n)
Int_t GetNumRangeCut () const
TCutG * GetRangeCut (Int_t n) const
Bool_t IsRangeCutExcluding (Int_t n)
void SetRangeCutExcluding (Int_t n, Bool_t exclude=kTRUE)
void RemoveRangeCut (Int_t n)
Bool_t CheckRangeConditions (const Double_t *values, Int_t numaxis)
virtual void CollectParsTo (TGo4FitParsList &list)
void SetUseBuffers (Bool_t iUse)
Bool_t GetUseBuffers ()
virtual void Print (Option_t *option) const

Protected Member Functions

TGo4FitParameterNewParameter (const char *Name, const char *Title, Double_t iValue=0., Bool_t Fixed=kFALSE, Int_t AtIndx=-1)
TGo4FitParameterNewAmplitude (const char *Name=0, Double_t iValue=0., Bool_t IsFixed=kFALSE, Int_t AtIndx=0)
Int_t GetAmplIndex ()
void SetAmplIndex (Int_t iAmplIndex=-1)

Private Attributes

TArrayI fxRangeAxis
TArrayD fxRangeValue
TObjArray fxCuts
Int_t fiAmplIndex
Bool_t fbUseBuffers

Detailed Description

Basic absrtact class, combining common properties of data and model.

Definition at line 29 of file TGo4FitComponent.h.


Constructor & Destructor Documentation

TGo4FitComponent::TGo4FitComponent (  ) 

Default constructor.

Definition at line 23 of file TGo4FitComponent.cxx.

TGo4FitComponent::TGo4FitComponent ( const char *  iName,
const char *  iTitle 
)

Creates TGo4FitComponent object.

Definition at line 27 of file TGo4FitComponent.cxx.

References fxCuts.

TGo4FitComponent::~TGo4FitComponent (  )  [virtual]

Destroys TGo4FitComponent object.

Definition at line 33 of file TGo4FitComponent.cxx.


Member Function Documentation

void TGo4FitComponent::AddRangeCondition ( Int_t  typ,
Int_t  naxis,
Double_t  left,
Double_t  right 
)

Add new range condition. For exact meaning of parameters see GetRangeCondition() method.

Definition at line 165 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and SetRangeCondition().

Referenced by ExcludeRange(), SetRange(), SetRangeMax(), and SetRangeMin().

void TGo4FitComponent::AddRangeCut ( TCutG *  cut,
Bool_t  exclude = kFALSE 
)

Add TCutG object as range condition for two-dimensional case. Region, defined by TCutG object, can be included or excluded from consideration according value of exclude flag.

Definition at line 223 of file TGo4FitComponent.cxx.

References fxCuts, and kExcludeCut.

Referenced by AddRangeCut(), TGo4FitPanel::Cmd_AddRangeCondition(), and Example13().

virtual Bool_t TGo4FitComponent::CanAmplTouch (  )  [inline, virtual]

Signals, if amplitude parameter can be removed from or introduced to object.

Reimplemented in TGo4FitData, TGo4FitModelFormula, and TGo4FitModelFunction.

Definition at line 101 of file TGo4FitComponent.h.

Referenced by TGo4FitPanel::ChangeModelPar(), and TGo4FitPanel::FillNamedWidget().

Bool_t TGo4FitComponent::CheckRangeConditions ( const Double_t *  values,
Int_t  numaxis 
)
void TGo4FitComponent::ClearRanges ( Int_t  naxis = -1  ) 

Clear all range conditions for given axis. If naxis=-1, all range conditions will be removed.

Definition at line 200 of file TGo4FitComponent.cxx.

References fxCuts, fxRangeAxis, and fxRangeValue.

Referenced by TGo4FitPanel::Button_SimpleFit(), TGo4FitPanel::Cmd_RemoveRangeConditions(), TGo4FitPanel::Wiz_DataClearRangesBtn_clicked(), and TGo4FitPanel::Wiz_TakeCurrentRange().

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

Collect all parameters to provided parameters list object. Not only parameters of TGo4FitComponent copies to list. All parameters, which are situated in incpsulated objects, also will be copied to this list.

Definition at line 357 of file TGo4FitComponent.cxx.

References TGo4FitParsList::CollectParsTo(), TGo4FitSlot::GetObject(), TGo4FitSlot::GetOwned(), TGo4FitSlotList::GetSlot(), and TGo4FitSlotList::NumSlots().

Referenced by TGo4Fitter::CollectAllPars(), and TGo4FitModel::Initialize().

void TGo4FitComponent::ExcludeRange ( Int_t  naxis,
Double_t  min,
Double_t  max 
)

Exclude axis range from consideration.

Definition at line 188 of file TGo4FitComponent.cxx.

References AddRangeCondition().

Referenced by TGo4FitPanel::Cmd_AddRangeCondition().

Double_t TGo4FitComponent::GetAmplError (  ) 

Return error of amplitude parameter. If none, return 0.

Definition at line 79 of file TGo4FitComponent.cxx.

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

Referenced by TGo4Fitter::PrintAmpls().

const char * TGo4FitComponent::GetAmplFullName (  ) 

Returns full name of amplitude parameter. If none, return 0.

Definition at line 65 of file TGo4FitComponent.cxx.

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

Referenced by TGo4Fitter::PrintAmpls().

Int_t TGo4FitComponent::GetAmplIndex (  )  [inline, protected]

Returns index of amplitude parameter.

Definition at line 258 of file TGo4FitComponent.h.

References fiAmplIndex.

Referenced by TGo4FitModelFormula::GetExprPar(), TGo4FitModelFunction::GetFuncPar(), TGo4FitModel::RebuildShape(), and RemoveAmpl().

const char * TGo4FitComponent::GetAmplName (  ) 

Returns name of amplitude parameter. If none, return 0.

Definition at line 60 of file TGo4FitComponent.cxx.

References GetAmplPar().

Int_t TGo4FitComponent::GetNumRangeCondition (  )  const [inline]
Int_t TGo4FitComponent::GetNumRangeCut (  )  const

Returns number of range cuts, assigned to object.

Definition at line 228 of file TGo4FitComponent.cxx.

References fxCuts.

Referenced by CheckRangeConditions(), TGo4FitPanel::Cmd_AddRangeCondition(), GetRangeMax(), GetRangeMin(), IsAnyRangeLimits(), Print(), and TGo4FitPanel::UpdateItem().

void TGo4FitComponent::GetRangeCondition ( Int_t  n,
Int_t &  typ,
Int_t &  naxis,
Double_t &  left,
Double_t &  right 
) const

Return value for specified range condition.

Following procedures produces correspondent values: typ=0: SetRange() typ=1: ExcludeRange() typ=2: SetRangeMin() right not defined typ=3: SetRangeMax() left not defined

Definition at line 103 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Referenced by CheckRangeConditions(), TGo4FitGuiArrow::ExecuteEvent(), QFitRangeWidget::FillSpecificData(), TGo4FitGuiArrow::Locate(), TGo4FitPanel::PaintRange(), Print(), and TGo4FitPanel::SetItemText().

TCutG * TGo4FitComponent::GetRangeCut ( Int_t  n  )  const
Bool_t TGo4FitComponent::GetRangeMax ( Int_t  naxis,
Double_t &  value 
)

Defines maximum allowed value for given range. Returns kFALSE, if no range condition were specified for given axis.

Definition at line 278 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, GetNumRangeCut(), GetRangeCut(), and kExcludeCut.

Bool_t TGo4FitComponent::GetRangeMin ( Int_t  naxis,
Double_t &  value 
)

Defines minimum allowed value for given range. Returns kFALSE, if no range condition were specified for given axis.

Definition at line 255 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, GetNumRangeCut(), GetRangeCut(), and kExcludeCut.

Bool_t TGo4FitComponent::GetUseBuffers (  )  [inline]

Returns flag of usage of additional buffers. Buffers can only be created in Initialize procedure..

Definition at line 236 of file TGo4FitComponent.h.

References fbUseBuffers.

Referenced by TGo4FitPanel::FillNamedWidget(), and TGo4FitPanel::UpdateWizStackWidget().

Bool_t TGo4FitComponent::IsAnyRangeLimits (  ) 

Return kTRUE, if any range conditions were introduced.

Definition at line 219 of file TGo4FitComponent.cxx.

References GetNumRangeCondition(), and GetNumRangeCut().

Referenced by TGo4FitPanel::FillPopupForItem(), TGo4FitModel::Initialize(), and TGo4FitPanel::UpdateWizStackWidget().

Bool_t TGo4FitComponent::IsRangeCutExcluding ( Int_t  n  ) 

Return kTRUE if cut eclude range

Definition at line 236 of file TGo4FitComponent.cxx.

References GetRangeCut(), and kExcludeCut.

Referenced by QFitRangeCutWidget::FillSpecificData().

Bool_t TGo4FitComponent::MakeAmpl ( Bool_t  isFixed = kFALSE  ) 

Create amplitude parameter and adds it to parameters list. Typically amplitude is situated in the beggining of parameters list.

Definition at line 89 of file TGo4FitComponent.cxx.

References GetAmplPar(), NewAmplitude(), and TGo4FitParameter::SetFixed().

Referenced by QFitDataWidget::AmplChk_toggled(), and TGo4FitPanel::ChangeModelPar().

TGo4FitParameter * TGo4FitComponent::NewAmplitude ( const char *  Name = 0,
Double_t  iValue = 0.,
Bool_t  IsFixed = kFALSE,
Int_t  AtIndx = 0 
) [protected]
Bool_t TGo4FitComponent::RemoveAmpl (  ) 

Remove amplitude parameter from parameters list.

Definition at line 96 of file TGo4FitComponent.cxx.

References GetAmplIndex(), GetAmplPar(), TGo4FitParsList::RemoveParByIndex(), and SetAmplIndex().

Referenced by QFitDataWidget::AmplChk_toggled(), and TGo4FitPanel::ChangeModelPar().

void TGo4FitComponent::RemoveRangeCondition ( Int_t  n  ) 

Removes specified range condition.

Definition at line 171 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Referenced by TGo4FitPanel::Cmd_RemoveRangeCondition().

void TGo4FitComponent::RemoveRangeCut ( Int_t  n  ) 

Delete range cut with specified index.

Definition at line 246 of file TGo4FitComponent.cxx.

References fxCuts, and GetRangeCut().

Referenced by TGo4FitPanel::Cmd_RemoveRangeCondition().

void TGo4FitComponent::SetAmplError ( Double_t  iError  ) 
void TGo4FitComponent::SetAmplIndex ( Int_t  iAmplIndex = -1  )  [inline, protected]

Set index of amplitude parameter.

Definition at line 263 of file TGo4FitComponent.h.

References fiAmplIndex.

Referenced by NewAmplitude(), and RemoveAmpl().

void TGo4FitComponent::SetRange ( Int_t  naxis,
Double_t  min,
Double_t  max 
)
void TGo4FitComponent::SetRangeCondition ( Int_t  n,
Int_t  typ,
Int_t  naxis,
Double_t  left,
Double_t  right 
)

Change specified range condition. Range condition should already exists before calling of these procedure. For exact meaning of parameters see GetRangeCondition() method.

Definition at line 137 of file TGo4FitComponent.cxx.

References fxRangeAxis, fxRangeValue, and GetNumRangeCondition().

Referenced by AddRangeCondition(), TGo4FitGuiArrow::ExecuteEvent(), and QFitRangeWidget::GetRangeData().

void TGo4FitComponent::SetRangeCutExcluding ( Int_t  n,
Bool_t  exclude = kTRUE 
)

Set type of range cut (excluding or including)

Definition at line 241 of file TGo4FitComponent.cxx.

References GetRangeCut(), and kExcludeCut.

Referenced by QFitRangeCutWidget::ExcludeCutChk_toggled().

void TGo4FitComponent::SetRangeMax ( Int_t  naxis,
Double_t  value 
)

Set maximum axis value, taken into consideration. All lager values will be removed from consideration independently from other range conditions.

Definition at line 196 of file TGo4FitComponent.cxx.

References AddRangeCondition().

Referenced by TGo4FitPanel::Cmd_AddRangeCondition().

void TGo4FitComponent::SetRangeMin ( Int_t  naxis,
Double_t  value 
)

Set minimum axis value, taken into consideration. All smaller values will be removed from consideration independently from other range conditions.

Definition at line 192 of file TGo4FitComponent.cxx.

References AddRangeCondition().

Referenced by TGo4FitPanel::Cmd_AddRangeCondition().

void TGo4FitComponent::SetUseBuffers ( Bool_t  iUse  )  [inline]

Sets usage of additional buffers. Buffers can only be created in Initialize procedure..

Definition at line 230 of file TGo4FitComponent.h.

References fbUseBuffers.

Referenced by TGo4FitPanel::ChangeModelPar(), QFitDataWidget::UseBuffersChk_toggled(), TGo4FitPanel::Wiz_DataBufChk_toggled(), and TGo4FitPanel::Wiz_ModelBufChk_toggled().


Member Data Documentation

Specify usage of buffers after initialization

Definition at line 290 of file TGo4FitComponent.h.

Referenced by GetUseBuffers(), and SetUseBuffers().

Index of amplitude parameter (-1 if none)

Definition at line 285 of file TGo4FitComponent.h.

Referenced by GetAmplIndex(), GetAmplPar(), Print(), SetAmplError(), SetAmplIndex(), and SetAmplValue().

TObjArray TGo4FitComponent::fxCuts [private]

Array of TCutG objects, used for range selection.

Definition at line 280 of file TGo4FitComponent.h.

Referenced by AddRangeCut(), ClearRanges(), GetNumRangeCut(), GetRangeCut(), RemoveRangeCut(), and TGo4FitComponent().

TArrayI TGo4FitComponent::fxRangeAxis [private]

Array for range conditions storage (axis indexes)

Definition at line 270 of file TGo4FitComponent.h.

Referenced by AddRangeCondition(), ClearRanges(), GetNumRangeCondition(), GetRangeCondition(), GetRangeMax(), GetRangeMin(), RemoveRangeCondition(), and SetRangeCondition().

TArrayD TGo4FitComponent::fxRangeValue [private]

Array for range values storaging.

Definition at line 275 of file TGo4FitComponent.h.

Referenced by AddRangeCondition(), ClearRanges(), GetRangeCondition(), GetRangeMax(), GetRangeMin(), RemoveRangeCondition(), and SetRangeCondition().


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