KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
KVEvent::Iterator Class Reference

Examples
ExampleINDRAAnalysis.cpp, and KVEvent_iterator_example.C.

Definition at line 188 of file KVEvent.h.

Public Types

typedef std::ptrdiff_t difference_type
 
typedef std::forward_iterator_tag iterator_category
 
typedef KVNucleuspointer
 
typedef KVNucleusreference
 
enum  Type { Null , All , OK , Group }
 
typedef KVNucleus value_type
 

Public Member Functions

 Iterator ()
 
 Iterator (const Iterator &i)
 
 Iterator (const KVEvent &e, Type t=Type::All, const TString &grp="")
 
 Iterator (const KVEvent *e, Type t=Type::All, const TString &grp="")
 
virtual ~Iterator ()
 
template<typename PointerType >
PointerType * get_pointer () const
 
template<typename ReferenceType >
ReferenceType & get_reference () const
 
Bool_t IsIterating () const
 
Bool_t operator!= (const Iterator &it) const
 
KVNucleusoperator* () const
 
const Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator= (const Iterator &rhs)
 
Bool_t operator== (const Iterator &it) const
 
void Reset (Type t=Type::Null, TString grp="")
 
void SetIsIterating (Bool_t on=kTRUE)
 

Static Public Member Functions

static Iterator End ()
 

Private Member Functions

Bool_t AcceptableIteration ()
 
KVNucleuscurrent () const
 

Private Attributes

TString fGroup
 
TIter fIter
 internal iterator used by GetNextParticle() More...
 
Bool_t fIterating
 
Type fType
 

#include <KVEvent.h>

Member Typedef Documentation

◆ difference_type

typedef std::ptrdiff_t KVEvent::Iterator::difference_type

Definition at line 192 of file KVEvent.h.

◆ iterator_category

typedef std::forward_iterator_tag KVEvent::Iterator::iterator_category

Definition at line 190 of file KVEvent.h.

◆ pointer

Definition at line 193 of file KVEvent.h.

◆ reference

Definition at line 194 of file KVEvent.h.

◆ value_type

Definition at line 191 of file KVEvent.h.

Member Enumeration Documentation

◆ Type

Enumerator
Null 
All 
OK 
Group 

Definition at line 196 of file KVEvent.h.

Constructor & Destructor Documentation

◆ Iterator() [1/4]

KVEvent::Iterator::Iterator ( )
inline

Definition at line 233 of file KVEvent.h.

◆ Iterator() [2/4]

KVEvent::Iterator::Iterator ( const Iterator i)
inline

Definition at line 243 of file KVEvent.h.

◆ Iterator() [3/4]

KVEvent::Iterator::Iterator ( const KVEvent e,
Type  t = Type::All,
const TString grp = "" 
)
inline

Construct an iterator object to read in sequence the particles in event *e. By default, opt="" and all particles are included in the iteration. opt is a case-insensitive option controlling the iteration: opt="ok"/"OK": only particles whose KVParticle::IsOK() method returns kTRUE are iterated over opt=any other non-empty string: only particles belonging to the given group i.e. KVParticle::BelongsToGroup(opt) returns kTRUE

set iterator to first particle of event corresponding to selection

Definition at line 251 of file KVEvent.h.

◆ Iterator() [4/4]

KVEvent::Iterator::Iterator ( const KVEvent e,
Type  t = Type::All,
const TString grp = "" 
)
inline

Construct an iterator object to read in sequence the particles in event *e. By default, opt="" and all particles are included in the iteration. opt is a case-insensitive option controlling the iteration: opt="ok"/"OK": only particles whose KVParticle::IsOK() method returns kTRUE are iterated over opt=any other non-empty string: only particles belonging to the given group i.e. KVParticle::BelongsToGroup(opt) returns kTRUE

set iterator to first particle of event corresponding to selection

Definition at line 272 of file KVEvent.h.

◆ ~Iterator()

virtual KVEvent::Iterator::~Iterator ( )
inlinevirtual

Definition at line 351 of file KVEvent.h.

Member Function Documentation

◆ AcceptableIteration()

Bool_t KVEvent::Iterator::AcceptableIteration ( )
inlineprivate

Returns kTRUE if the current particle in the iteration corresponds to the selection criteria (if any)

Definition at line 208 of file KVEvent.h.

◆ current()

KVNucleus* KVEvent::Iterator::current ( ) const
inlineprivate

Returns pointer to current particle in iteration Resets fIterating flag to kFALSE at end of list

Definition at line 226 of file KVEvent.h.

◆ End()

static Iterator KVEvent::Iterator::End ( void  )
inlinestatic
Examples
KVEvent_iterator_example.C.

Definition at line 347 of file KVEvent.h.

◆ get_pointer()

template<typename PointerType >
PointerType* KVEvent::Iterator::get_pointer ( ) const
inline

Definition at line 299 of file KVEvent.h.

◆ get_reference()

template<typename ReferenceType >
ReferenceType& KVEvent::Iterator::get_reference ( ) const
inline

Definition at line 304 of file KVEvent.h.

◆ IsIterating()

Bool_t KVEvent::Iterator::IsIterating ( ) const
inline

returns kTRUE if iteration is in progress

Definition at line 373 of file KVEvent.h.

◆ operator!=()

Bool_t KVEvent::Iterator::operator!= ( const Iterator it) const
inline

returns kTRUE if the 2 iterators are not pointing to the same particle

Definition at line 308 of file KVEvent.h.

◆ operator*()

KVNucleus& KVEvent::Iterator::operator* ( ) const
inline

Returns reference to current particle in iteration

Definition at line 292 of file KVEvent.h.

◆ operator++() [1/2]

const Iterator& KVEvent::Iterator::operator++ ( )
inline

Prefix ++ operator Advance iterator to next particle in event compatible with selection

Definition at line 318 of file KVEvent.h.

◆ operator++() [2/2]

Iterator KVEvent::Iterator::operator++ ( int  )
inline

Postfix ++ operator Advance iterator to next particle in event compatible with selection

Definition at line 327 of file KVEvent.h.

◆ operator=()

Iterator& KVEvent::Iterator::operator= ( const Iterator rhs)
inline

copy-assignment operator

Definition at line 335 of file KVEvent.h.

◆ operator==()

Bool_t KVEvent::Iterator::operator== ( const Iterator it) const
inline

returns kTRUE if the 2 iterators are pointing to the same particle

Definition at line 313 of file KVEvent.h.

◆ Reset()

void KVEvent::Iterator::Reset ( Type  t = Type::Null,
TString  grp = "" 
)
inline

Reuse iterator, start iteration again Reset() - use same selection criteria Reset(Type t[, TString gr]) - change selection criteria

Definition at line 353 of file KVEvent.h.

◆ SetIsIterating()

void KVEvent::Iterator::SetIsIterating ( Bool_t  on = kTRUE)
inline

set fIterating flag

Definition at line 378 of file KVEvent.h.

Member Data Documentation

◆ fGroup

TString KVEvent::Iterator::fGroup
private

Definition at line 207 of file KVEvent.h.

◆ fIter

TIter KVEvent::Iterator::fIter
private

internal iterator used by GetNextParticle()

Definition at line 204 of file KVEvent.h.

◆ fIterating

Bool_t KVEvent::Iterator::fIterating
mutableprivate

Definition at line 206 of file KVEvent.h.

◆ fType

Type KVEvent::Iterator::fType
private

Definition at line 205 of file KVEvent.h.


The documentation for this class was generated from the following file: