AliPhysics  95775ff (95775ff)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 
 iterator (const iterator &ref)
 
 ~iterator ()
 
iteratoroperator= (const iterator &rhs)
 
Bool_t operator!= (const iterator &aIter) const
 
iteratoroperator++ ()
 
iterator operator++ (int)
 
iteratoroperator-- ()
 
iterator operator-- (int)
 
TObjectoperator* () const
 

Private Member Functions

 iterator ()
 

Private Attributes

const THistManagerfkArray
 
Int_t fCurrentPos
 
Int_t fNext
 
THMIDirection_t fDirection
 

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 59 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 72 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 610 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 617 of file THistManager.cxx.

THistManager::iterator::~iterator ( )
inline

Destructor

Definition at line 96 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 634 of file THistManager.cxx.

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 666 of file THistManager.cxx.

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 638 of file THistManager.cxx.

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 646 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 652 of file THistManager.cxx.

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 660 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 624 of file THistManager.cxx.

Member Data Documentation

Int_t THistManager::iterator::fCurrentPos
private

Definition at line 157 of file THistManager.h.

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

THMIDirection_t THistManager::iterator::fDirection
private

Definition at line 159 of file THistManager.h.

Referenced by operator=().

const THistManager* THistManager::iterator::fkArray
private

Definition at line 156 of file THistManager.h.

Referenced by operator=().

Int_t THistManager::iterator::fNext
private

Definition at line 158 of file THistManager.h.

Referenced by operator=().


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