v2.10-0 (21000JUN2005)

Go4Fit
Class TGo4FitDataIter

Direct Known Subclasses:
TGo4FitDataGraphIter, TGo4FitDataHistogramIter, TGo4FitDataProfileIter, TGo4FitDataRidgeIter

abstract class TGo4FitDataIter
derived from TObject

Iterator calss for data object.
The main aim of TGo4FitDataIter class is provide an sequential access to data, containing in appropriate data object.
Each new class of data object should provide also it's own implementation for TGo4FitDataIrter class. To create iterator, MakeIter() method of data object should be used.
Iterator has two main methods: Reset() and Next(). First method resets all internal buffers of iterator and positioning pointer on first data point. Next() method shifts to next data pointer.
As argument of these methods usage of bins selection meachanizm via range conditions or amplitude threshold can be specified.
Typical usage of iterator:

TGo4FitDataIter* iter = data->MakeIter();
if (iter->Reset()) do {
// do something with values in iterator
} while (iter->Next());

Access to most iterator methods like Values(), IndexesSize() and so on can be done only after first call of Reset() method.


Field Summary
 protected Bool_tfbReachEnd
           
 protected Double_tfdStandardDeviation
           
 protected Double_tfdValue
           
 protected Int_tfiNumPoint
           
 protected TArrayIfxIndexes
           
 protected TArrayDfxScales
           
 protected TArrayDfxWidths
           

Constructor Summary
TGo4FitDataIter()
          Default constructor.

Destructor Summary
 virtual synchronized ~TGo4FitDataIter()
          Destroys TGo4FitDataIter object.

Method Summary
 Bool_tCheckPointForRange()
          Check range conditions and amplitude threshold for current point.
 Int_tCountPoints(Bool_t UseRanges)
          Counts total number of points in data object.
 TObject*CreateDrawObject(const char * ObjName)
          Create either histogram or graph object.
 TGraph*CreateGraph(const char * GraphName, Bool_t UseRanges, Bool_t SetBins)
          Create TGraph object with appropriate to data object size.
 TH1*CreateHistogram(const char * HistoName, Bool_t UseRanges, Bool_t SetBins)
          Create histogram (if possible) with appropriate to data object dimensions number and size.
 Bool_tDefineIndexesLimits(TArrayI& Limits)
          Iterate over all data points and returns maximum value for indexes.
 protected abstract const TGo4FitData*GetData()
          Return pointer on correspondent TGo4FitData object, which create iterator.
 protected Bool_tGetDeviation()
          Calculates standard deviation from GetSigmaValue() of data object.
 const Bool_tHasIndexes()
          Return kTRUE, if data object has indexes.
 const Bool_tHasWidths()
          Return kTRUE, if scale widths values exists.
 const const Int_t*Indexes()
          Return indexes for current data point.
 const Int_tIndexesSize()
          Return size (number of dimensions) of data indexes.
 virtual Bool_tNext(Bool_t UseRanges)
          Shift pointer to next data point.
 protected Bool_tNextIndex(TArrayI& Index, TArrayI& Limits)
          Producing next indexes set according limits values.
 const Int_tPoint()
          Return number of current point, starting from 0.
 protected Bool_tProduceScales(const Int_t* index, const Double_t* ownscales, const Double_t* ownwidths)
          Converts scale values.
 const Bool_tReachEnd()
          Checks, if iterator already reach end of data object.
 protected abstract Bool_tReadCurrentPoint()
          Perform specific actions to read all values from data object.
 protected Bool_tReserveArrays(Int_t NumDimen, Int_t NumOwnAxis, Bool_t HasWidth)
          Reserve buffers for indexes, scales and width values.
 virtual Bool_tReset(Bool_t UseRanges)
          Initialize iterator and positioning pointer on first point.
 const const Double_t*Scales()
          Return scale values for current data points.
 const Int_tScalesSize()
          Return size (number) of scale values for each data point.
 protected abstract Bool_tShiftToNextPoint()
          Move pointer to following data point.
 const Double_tStandardDeviation()
          Return standard deviation of bin content (Value) for current point.
 protected abstract Bool_tStartReset()
          Reset pointer and other specific values to the beggining of data.
 protected voidTransformScales(Double_t* scales)
          Transform scales values, using transformation objects in data.
 const Double_tValue()
          Return bin content (Value) for current point.
 const const Double_t*Widths()
          Return scales widths values.
 const Double_tx()
          Return current x coordinate if exists, otherwise 0
 const Double_txWidths()
          Return production of all width parameters (1 if no widths)
 const Double_ty()
          Return current y coordinate if exists, otherwise 0
 const Double_tz()
          Return current z coordinate if exists, otherwise 0

Field Detail

fbReachEnd

protected Bool_t fbReachEnd

fdStandardDeviation

protected Double_t fdStandardDeviation

fdValue

protected Double_t fdValue

fiNumPoint

protected Int_t fiNumPoint

fxIndexes

protected TArrayI fxIndexes

fxScales

protected TArrayD fxScales

fxWidths

protected TArrayD fxWidths
Constructor Detail

TGo4FitDataIter

public TGo4FitDataIter()
Default constructor.
Method Detail

~TGo4FitDataIter

public virtual synchronized ~TGo4FitDataIter()
Destroys TGo4FitDataIter object.
Method Detail

CheckPointForRange

public Bool_t CheckPointForRange()
Check range conditions and amplitude threshold for current point.

CountPoints

public Int_t CountPoints(Bool_t UseRanges)
Counts total number of points in data object.
Uses Reset() and Next() methods, therefore change pointer to the data object

CreateDrawObject

public TObject* CreateDrawObject(const char * ObjName)
Create either histogram or graph object.

CreateGraph

public TGraph* CreateGraph(const char * GraphName, Bool_t UseRanges, Bool_t SetBins)
Create TGraph object with appropriate to data object size.
If more than one scales values exists, only first will be used as X-coordinate of TGraph.
Bin content (Value()) will be used as Y-coordinate in TGraph.
If UseRanges specified, data point selection mechanizm will be involved.
If SetBins specified, bin content will be copied to histogram.

CreateHistogram

public TH1* CreateHistogram(const char * HistoName, Bool_t UseRanges, Bool_t SetBins)
Create histogram (if possible) with appropriate to data object dimensions number and size.
If UseRanges specified, data point selection mechanizm will be involved.
If SetBins specified, bin content will be copied to histogram.

DefineIndexesLimits

public Bool_t DefineIndexesLimits(TArrayI& Limits)
Iterate over all data points and returns maximum value for indexes.

GetData

protected abstract const TGo4FitData* GetData()
Return pointer on correspondent TGo4FitData object, which create iterator.
Should be implemented in derived classes.

GetDeviation

protected Bool_t GetDeviation()
Calculates standard deviation from GetSigmaValue() of data object.

HasIndexes

public const Bool_t HasIndexes()
Return kTRUE, if data object has indexes.

HasWidths

public const Bool_t HasWidths()
Return kTRUE, if scale widths values exists.

Indexes

public const const Int_t* Indexes()
Return indexes for current data point.

IndexesSize

public const Int_t IndexesSize()
Return size (number of dimensions) of data indexes.

Next

public virtual Bool_t Next(Bool_t UseRanges)
Shift pointer to next data point.
Return kTRUE, if next points exist.
If UseRanges = kTRUE (default), selection meachanizm of data points via range conditions or amplitude threshold will be involved.
Most of iterator routines should be used only after Reset() command.

NextIndex

protected Bool_t NextIndex(TArrayI& Index, TArrayI& Limits)
Producing next indexes set according limits values.

Point

public const Int_t Point()
Return number of current point, starting from 0.

ProduceScales

protected Bool_t ProduceScales(const Int_t* index, const Double_t* ownscales, const Double_t* ownwidths)
Converts scale values.
Involved when usage of binary number insted scales or axis calibration objects specified to data.

ReachEnd

public const Bool_t ReachEnd()
Checks, if iterator already reach end of data object.
This heppens, when Next() method return kFALSE value.

ReadCurrentPoint

protected abstract Bool_t ReadCurrentPoint()
Perform specific actions to read all values from data object.
Should be implemented in derived classes.

ReserveArrays

protected Bool_t ReserveArrays(Int_t NumDimen, Int_t NumOwnAxis, Bool_t HasWidth)
Reserve buffers for indexes, scales and width values.
In case of 3-D histogram they consume only 3 Int_t and 6 Double_t points.

Reset

public virtual Bool_t Reset(Bool_t UseRanges)
Initialize iterator and positioning pointer on first point.
If UseRanges = kTRUE (default), selection meachanizm of data points via range conditions or amplitude threshold will be involved.
Most of iterator routines should be used only after Reset() command.

Scales

public const const Double_t* Scales()
Return scale values for current data points.

ScalesSize

public const Int_t ScalesSize()
Return size (number) of scale values for each data point.

ShiftToNextPoint

protected abstract Bool_t ShiftToNextPoint()
Move pointer to following data point.
Should be implemented in derived classes.

StandardDeviation

public const Double_t StandardDeviation()
Return standard deviation of bin content (Value) for current point.

StartReset

protected abstract Bool_t StartReset()
Reset pointer and other specific values to the beggining of data.
Should be implemented in derived classes.

TransformScales

protected void TransformScales(Double_t* scales)
Transform scales values, using transformation objects in data.

Value

public const Double_t Value()
Return bin content (Value) for current point.

Widths

public const const Double_t* Widths()
Return scales widths values.

x

public const Double_t x()
Return current x coordinate if exists, otherwise 0

xWidths

public const Double_t xWidths()
Return production of all width parameters (1 if no widths)

y

public const Double_t y()
Return current y coordinate if exists, otherwise 0

z

public const Double_t z()
Return current z coordinate if exists, otherwise 0

Association Links

to Class TArrayI

to Class TArrayD

to Class TArrayD


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

30-06-2005