AliPhysics  32e057f (32e057f)
THistManager::iterator Class Reference

stl-iterator for the histogram manager More...

#include <THistManager.h>

Inheritance diagram for THistManager::iterator:

Public Types

enum  THMIDirection_t { kTHMIforward = 0, kTHMIbackward = 1 }
 Direction for the iteration. More...
 

Public Member Functions

 iterator (const THistManager *hmgr, Int_t currentpos, THMIDirection_t dir=kTHMIforward)
 Constructor. More...
 
 iterator (const iterator &ref)
 Copy constructor. More...
 
 ~iterator ()
 
iteratoroperator= (const iterator &rhs)
 
Bool_t operator!= (const iterator &aIter) const
 Comparison operator for unequalness. More...
 
iteratoroperator++ ()
 Prefix increment operator. More...
 
iterator operator++ (int)
 Postfix increment operator. More...
 
iteratoroperator-- ()
 Prefix decrement operator. More...
 
iterator operator-- (int)
 Postfix decrement operator. More...
 
TObjectoperator* () const
 Dereferncing operator. More...
 

Private Member Functions

 iterator ()
 

Private Attributes

const THistManagerfkArray
 Underlying histmanager to iterate over. More...
 
Int_t fCurrentPos
 Current position of the iterator in the histmanager. More...
 
Int_t fNext
 Next position in the histmanager. More...
 
THMIDirection_t fDirection
 Direction of the iterator. More...
 

Detailed Description

stl-iterator for the histogram manager

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Lawrence Berkeley National Laboratory

stl-type iterator for the histogram manager. Iterating over primary content of the histogram manager. In case histograms are organized in groups, the primary content will be histogram groups, with the data structure THashList. The iterator is implemented as bidirectional iterator, providing forward and backward iteration.

Definition at line 115 of file THistManager.h.

Member Enumeration Documentation

Direction for the iteration.

Switch for the firection of the iteration. Currently the iterator is implemented as bi-directional iterator, providing only forward and backward iteration.

Enumerator
kTHMIforward 

Forward iteration.

kTHMIbackward 

Backward iteration.

Definition at line 128 of file THistManager.h.

Constructor & Destructor Documentation

THistManager::iterator::iterator ( const THistManager hmgr,
Int_t  currentpos,
THMIDirection_t  dir = kTHMIforward 
)

Constructor.

Initializing the histogram manager to be iterated over, the starting position for the iteration, and the direction of the iteration.

Parameters
[in]hmgrHistogram manager to be iterated over, containing the data
[in]currentposStarting position for the iteration
[in]dirDirection of the iteration

/// Implementation of THistManager::iterator /// ///

Definition at line 668 of file THistManager.cxx.

THistManager::iterator::iterator ( const iterator ref)

Copy constructor.

Initializing all values from the reference.

Parameters
[in]refReference for the copy

Definition at line 675 of file THistManager.cxx.

THistManager::iterator::~iterator ( )
inline

Destructor

Definition at line 155 of file THistManager.h.

THistManager::iterator::iterator ( )
private

Member Function Documentation

bool THistManager::iterator::operator!= ( const iterator aIter) const

Comparison operator for unequalness.

The comparison is performed based on the current position of the iterator.

Parameters
[in]otheriterator to compare to
Returns
True if the iterators are not equal

Definition at line 692 of file THistManager.cxx.

Referenced by ~iterator().

TObject * THistManager::iterator::operator* ( ) const

Dereferncing operator.

Providing access to the object connected to the current state of the iterator. Objects might be histograms or THashLists in case of wheter groups are defined or not.

Returns
Object connected ot the current state of the iterator

Definition at line 724 of file THistManager.cxx.

Referenced by ~iterator().

THistManager::iterator & THistManager::iterator::operator++ ( )

Prefix increment operator.

Incrementing / decrementing the current position of the iterator based on the direction.

Returns
State after incrementation

Definition at line 696 of file THistManager.cxx.

Referenced by operator++(), and ~iterator().

THistManager::iterator THistManager::iterator::operator++ ( int  )

Postfix increment operator.

Incrementing / decrementing the current position of the iterator based on the direction, but returning the state before iteration

Returns
State before incrementation

Definition at line 704 of file THistManager.cxx.

THistManager::iterator & THistManager::iterator::operator-- ( )

Prefix decrement operator.

Decrementing / incrementing the current position of the iterator based on the direction.

Returns
State after decrementation

Definition at line 710 of file THistManager.cxx.

Referenced by operator--(), and ~iterator().

THistManager::iterator THistManager::iterator::operator-- ( int  )

Postfix decrement operator.

Decrementing / incrementing the current position of the iterator based on the direction, but returning the state before iteration

Returns
State before decrementation

Definition at line 718 of file THistManager.cxx.

THistManager::iterator & THistManager::iterator::operator= ( const iterator rhs)

Assignment operator. Initializing all values from the reference.

Parameters
[in]ref
Returns
iterator after assignment.

Definition at line 682 of file THistManager.cxx.

Referenced by THistManager::GetListOfHistograms(), and ~iterator().

Member Data Documentation

Int_t THistManager::iterator::fCurrentPos
private

Current position of the iterator in the histmanager.

Definition at line 225 of file THistManager.h.

Referenced by operator!=(), operator*(), operator++(), operator--(), and operator=().

THMIDirection_t THistManager::iterator::fDirection
private

Direction of the iterator.

Definition at line 227 of file THistManager.h.

Referenced by operator++(), operator--(), and operator=().

const THistManager* THistManager::iterator::fkArray
private

Underlying histmanager to iterate over.

Definition at line 224 of file THistManager.h.

Referenced by operator*(), and operator=().

Int_t THistManager::iterator::fNext
private

Next position in the histmanager.

Definition at line 226 of file THistManager.h.

Referenced by operator=().


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