Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TGo4FitModelFromData Class Reference

Model object, which is uses TGo4FitData object to produce model bins. More...

#include <TGo4FitModelFromData.h>

Inheritance diagram for TGo4FitModelFromData:

TGo4FitModel TGo4FitComponent TGo4FitParsList TGo4FitSlotList TGo4FitNamed List of all members.

Public Methods

 TGo4FitModelFromData ()
 Default constructor. More...

 TGo4FitModelFromData (const char *iName, TGo4FitData *iDataAsModel=0, Bool_t Amplitude=kTRUE)
 Creates TGo4FitModelFromData object with given name. More...

 TGo4FitModelFromData (const char *iName, TH1 *, Bool_t iOwned=kFALSE, Bool_t Amplitude=kTRUE)
 Creates TGo4FitModelFromData object with given name, which uses external histogram as model component. More...

 ~TGo4FitModelFromData ()
 Destroy TGo4FitModelFromData object. More...

TGo4FitDataGetDataAsModel () const
 Return pointer on TGo4FitData object, which is used as model component. More...

void SetDataAsModel (TGo4FitData *iData, Bool_t iOwned)
 Sets pointer on TGo4FitData object with ownership flag. More...

virtual void FillSlotList (TSeqCollection *list)
 Add ponter on slot, which should contain TGo4FitData object, to a slots list. More...

virtual void Print (Option_t *option) const
 Print information on standard output. More...

virtual Bool_t BeforeEval (Int_t)
 Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function. More...

virtual Double_t EvalN (const Double_t *v)
 Calculates value of model according current parameters values and provided axes values. More...

virtual Double_t EvaluateAtPoint (TGo4FitData *data, Int_t nbin, Bool_t UseRanges=kTRUE)
 Evaluate model value for specified data point. More...

virtual Double_t EvaluateAtPoint (TGo4FitDataIter *iter, Bool_t UseRanges=kTRUE)
 Evaluate model value for point, specified by current values of iterator. More...

virtual void AfterEval ()
 Clear buffers, which were created by BeforeEval() method. More...


Protected Methods

virtual Bool_t Initialize (Int_t UseBuffers=-1)
 Initialize object. More...

Double_t FindDataPoint (Int_t NumIndexes, const Int_t *Indexes)

Protected Attributes

TGo4FitSlot fxData
 Slot for TGo4FitData object, which is used as model component. More...


Private Attributes

TGo4FitDataIterfxIter

Detailed Description

Model object, which is uses TGo4FitData object to produce model bins.

In constructor one should just specify data object (it may be TGo4FitDataHistogram or other), which will be used as model. Optionally, amplitude parameter can be created. For instance:

TH1* histo = GetHistogramSomewhere(); TGo4FitDataHistogram *h = new TGo4FitDataHistogram("hdata", histo, kFALSE); TGo4FitModelFromData *m = new TGo4FitModelFromData("hmodel", h, kFALSE);

The dimensions and bins number on each axis of data object, used in model, should be absolutely the same, as in data object, which should be fitted. Assigned data object will be owned by TGo4FitModelFromData object. But data source object (histogram "histo" in example) may not be owned by object and may be provided later by SetObject() method of fitter.

TGo4Fitter *fitter = GetFitterSomewhere(); TH1* histo = GetHistogramSomewhere(); fitter->SetObject(histo, "hdata");

The name of data object "hdata" instead of model object "hmodel" should be used, when assigning data to TGo4FitModelFromData object via SetObject() method of fitter.

Definition at line 40 of file TGo4FitModelFromData.h.


Constructor & Destructor Documentation

TGo4FitModelFromData::TGo4FitModelFromData  
 

Default constructor.

Definition at line 25 of file TGo4FitModelFromData.cxx.

TGo4FitModelFromData::TGo4FitModelFromData const char *    iName,
TGo4FitData   iDataAsModel = 0,
Bool_t    Amplitude = kTRUE
 

Creates TGo4FitModelFromData object with given name.

Pointer on TGo4FitData object and usage of amplitude can be specified.

Definition at line 28 of file TGo4FitModelFromData.cxx.

TGo4FitModelFromData::TGo4FitModelFromData const char *    iName,
TH1 *   ,
Bool_t    iOwned = kFALSE,
Bool_t    Amplitude = kTRUE
 

Creates TGo4FitModelFromData object with given name, which uses external histogram as model component.

In constructor TGo4FitDataHistogram object will be created, to which histogram will be assigned. Additionally ownership flag for histogram and usage of amplitude can be specified.

Definition at line 34 of file TGo4FitModelFromData.cxx.

References SetDataAsModel().

TGo4FitModelFromData::~TGo4FitModelFromData  
 

Destroy TGo4FitModelFromData object.

Definition at line 41 of file TGo4FitModelFromData.cxx.

References fxIter.


Member Function Documentation

TGo4FitData* TGo4FitModelFromData::GetDataAsModel   const [inline]
 

Return pointer on TGo4FitData object, which is used as model component.

Definition at line 69 of file TGo4FitModelFromData.h.

References fxData, and TGo4FitSlot::GetObject().

Referenced by BeforeEval(), FillSlotList(), Initialize(), and Print().

void TGo4FitModelFromData::SetDataAsModel TGo4FitData   iData,
Bool_t    iOwned
 

Sets pointer on TGo4FitData object with ownership flag.

Definition at line 45 of file TGo4FitModelFromData.cxx.

References fxData, TGo4FitSlot::SetObject(), and TGo4FitSlotList::SetUpdateSlotList().

Referenced by TGo4FitModelFromData().

void TGo4FitModelFromData::FillSlotList TSeqCollection *    list [virtual]
 

Add ponter on slot, which should contain TGo4FitData object, to a slots list.

Reimplemented from TGo4FitSlotList.

Definition at line 86 of file TGo4FitModelFromData.cxx.

References TGo4FitData::FillSlotList(), TGo4FitSlotList::FillSlotList(), fxData, and GetDataAsModel().

void TGo4FitModelFromData::Print Option_t *    option const [virtual]
 

Print information on standard output.

Reimplemented from TGo4FitModel.

Definition at line 92 of file TGo4FitModelFromData.cxx.

References GetDataAsModel(), TGo4FitData::Print(), and TGo4FitModel::Print().

Bool_t TGo4FitModelFromData::BeforeEval Int_t    [virtual]
 

Prepares (if necesary) some intermediate variables to be able calculate values of model via EvalN() function.

Number of axis, which will be used in evaluations, should be specified.

Reimplemented from TGo4FitModel.

Definition at line 63 of file TGo4FitModelFromData.cxx.

References fxIter, GetDataAsModel(), TGo4FitData::MakeIter(), and TGo4FitDataIter::Reset().

virtual Double_t TGo4FitModelFromData::EvalN const Double_t *    v [inline, virtual]
 

Calculates value of model according current parameters values and provided axes values.

BeforeEval(), EvalN() & AfterEval() virtual methods provides general interface, where user-specific code should be situated.

Reimplemented from TGo4FitModel.

Definition at line 87 of file TGo4FitModelFromData.h.

Double_t TGo4FitModelFromData::EvaluateAtPoint TGo4FitData   data,
Int_t    nbin,
Bool_t    UseRanges = kTRUE
[virtual]
 

Evaluate model value for specified data point.

All scales values will be take from data buffers, therefore data should be initialized.

Reimplemented from TGo4FitModel.

Definition at line 71 of file TGo4FitModelFromData.cxx.

References FindDataPoint(), TGo4FitModel::GetDataFullIndex(), and TGo4FitModel::GetDataIndexesSize().

Double_t TGo4FitModelFromData::EvaluateAtPoint TGo4FitDataIter   iter,
Bool_t    UseRanges = kTRUE
[virtual]
 

Evaluate model value for point, specified by current values of iterator.

Reimplemented from TGo4FitModel.

Definition at line 76 of file TGo4FitModelFromData.cxx.

References FindDataPoint(), TGo4FitDataIter::Indexes(), and TGo4FitDataIter::IndexesSize().

void TGo4FitModelFromData::AfterEval   [virtual]
 

Clear buffers, which were created by BeforeEval() method.

Reimplemented from TGo4FitModel.

Definition at line 81 of file TGo4FitModelFromData.cxx.

References fxIter.

Bool_t TGo4FitModelFromData::Initialize Int_t    UseBuffers = -1 [protected, virtual]
 

Initialize object.

Reimplemented from TGo4FitModel.

Definition at line 50 of file TGo4FitModelFromData.cxx.

References TGo4FitModel::GetAssignedConnection(), GetDataAsModel(), TGo4FitModel::Initialize(), TGo4FitData::IsCompatibleData(), n, and TGo4FitModel::NumAssigments().

Double_t TGo4FitModelFromData::FindDataPoint Int_t    NumIndexes,
const Int_t *    Indexes
[protected]
 

Definition at line 98 of file TGo4FitModelFromData.cxx.

References fxIter, TGo4FitDataIter::Indexes(), TGo4FitDataIter::IndexesSize(), TGo4FitDataIter::Next(), TGo4FitDataIter::ReachEnd(), and TGo4FitDataIter::Value().

Referenced by EvaluateAtPoint().


Member Data Documentation

TGo4FitSlot TGo4FitModelFromData::fxData [protected]
 

Slot for TGo4FitData object, which is used as model component.

@label slot for TGo4FitData

Definition at line 107 of file TGo4FitModelFromData.h.

Referenced by FillSlotList(), GetDataAsModel(), and SetDataAsModel().

TGo4FitDataIter* TGo4FitModelFromData::fxIter [private]
 

Definition at line 110 of file TGo4FitModelFromData.h.

Referenced by AfterEval(), BeforeEval(), FindDataPoint(), and ~TGo4FitModelFromData().


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 10:56:41 2005 for Go4-v2.10-5 by doxygen1.2.15