class TFGroupIter


  File:      TFGroupIterator.cpp

  Version:   1.0

  Author:    Reiner Rohlfs (GADC)

  History:   1.0   12.08.03  first released version


Function Members (Methods)

public:
TFGroupIter(const TFGroupIter& groupIter)
~TFGroupIter()
static TClass*Class()
voidClearFilterSort()
voidClearSelectors()
Bool_tFilter(const char* filter)
virtual TClass*IsA() const
Bool_tIsReadOnly()
Bool_tNext()
TFIOElement&operator*()
TFIOElement*operator->()
voidReset()
voidSetReadOnly(Bool_t readOnly = kTRUE)
voidSetSelector(TFSelector* select)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
voidSort(const char* colName)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
private:
TFGroupIter(TFGroup* group)
TFGroupIter(TFGroup* group, set<TFElementIdPtr>* done, TList* select, Bool_t readOnly)
TFGroupIter&operator=(const TFGroupIter& i_group)

Data Members

private:
TFColumn<TFElementPtr,ElementPtrFormat>&fColthe group column of its group
set<TFElementIdPtr>*fDonelist of already passed elements (TFElementPtr)
TFGroup*fGroupthe group of this iterator
TFIOElement*fLastlast element returned from Next()
TFGroupIter*fListnext chain in list;
Bool_tfReadOnlyopen children as read only if kTRUE
TFRowIterfRowIterthe row iterator
TList*fSelectlist of Selectors
Bool_tfStartkTRUE if this iterator is the first in the list of itertors

Class Charts

Inheritance Chart:
TFGroupIter

Function documentation

TFGroupIter(TFGroup* group, set<TFElementIdPtr>* done, TList* select, Bool_t readOnly)
 private constructor used by this class only
TFGroupIter(TFGroup * group)
 private constructor. Use TFGroup::MakeGroupIterator() to create a TFGroupIter
TFGroupIter(const TFGroupIter & groupIter)
~TFGroupIter()
Bool_t Next()
 "Moves" this iterator to the next TFIOElement or one of a dervied class of
 TFIOElement in a group. After the first time the TFGroupIter "points" to
 the first TFIOElement. This function returns kTRUE as long as there is a
 further TFIOElement in the group. It returns kFALSE if it has already
 "pointed" to all TFIOElements of the group. The operator *() and the
 operator->() can be used to access the actual TFIOELement this iterator
 "points to".
 All elements in all branches of the group are returned but never the same
 element twice. Assume that a child of the group is a group with some
 children and again some groups as children and so on. All elements that are
 child of any child - group of this group are searched and returned if they
 pass the selection criteria and the filter.
 Therefore this TFGroupIter never atually "points" to a TFGroup.

 Before calling the first time Next() a filter can be set (SetFilter). For more
 information on setting a filter see class TFRowIterator and its member function
 TFRowIterator::SetFilter() This function is directly called by the SetFilter()
 function of this TFGroupIter class. But in any case the filter is only
 applied to the first TFGroup and not to its children groups.

 The order of the returned elements can be sorted with the Sort() function. For
 more information how to sort the rows of a group see class TFRowIterator and its
 member function TFRowIterator::Sort(). This function is directly called by the
 Sort() function of this TFGroupIter class. But in any case only the rows of
 the first TFGroup are sorted not the rows of its children groups.

 Further it is possible to select elements the iterator "points to"  by
 the name of the elements. Call one or several times the SetSelector() function to
 define the names of returned elements. For more information how to set the
 selected element names see class description of TFNameSelector.
void Reset()
 resets the iterator, but not the filter, not the sorting and not the selection
 criteria. The Next() function can be used again to iterate through all
 TFIOElements.
void SetReadOnly(Bool_t readOnly = kTRUE)
 As default the elements returned from the operator * () and the
 operator->() are opened in readOnly mode. To open them in update
 mode set readOnly to kFALSE.
void ClearSelectors()
 clears all selectors set by the SetSelector() function
void SetSelector(TFSelector* select)
 Set one selector. The number of elements this iterator "points to"
 depend on select. For more information see TFNameSelector and the Next()
 function.
 select is adapted by this class and will be deleted by this TFGroupIter class.
TFFilePath & operator=(const TFGroupIter& i_group)
{ TString::operator=(fileName); return *this;}
Bool_t Filter(const char* filter)
{return fRowIter.Filter(filter);}
void Sort(const char* colName)
{fRowIter.Sort(colName);}
void ClearFilterSort()
{fRowIter.ClearFilterSort();}
Bool_t IsReadOnly()
{return fReadOnly;}

Author: (GADC)
Last update: Fri Mar 14 13:55:16 2008

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.