Project
Loading...
Searching...
No Matches
o2::emcal::EventHandler< CellInputType >::EventIterator Class Reference

#include <EventHandler.h>

Inherits std::iterator_traits< EventData< CellInputType > >.

Public Member Functions

 EventIterator (const EventHandler &handler, int eventID, bool forward)
 Constructor, initializing the iterator.
 
 EventIterator (const EventIterator &other)=default
 Copy constructor.
 
EventIteratoroperator= (const EventIterator &other)=default
 Assignment operator.
 
 ~EventIterator ()=default
 Destructor.
 
bool operator== (const EventIterator &rhs) const
 Check for equalness.
 
bool operator!= (const EventIterator &rhs) const
 Check for not equalness.
 
EventIteratoroperator++ ()
 Prefix incrementation operator.
 
EventIterator operator++ (int)
 Postfix incrementation operator.
 
EventIteratoroperator-- ()
 Prefix decrementation operator.
 
EventIterator operator-- (int)
 Postfix decrementation operator.
 
EventData< CellInputType > * operator* ()
 Get pointer to the current event.
 
EventData< CellInputType > & operator& ()
 Get reference to the current event.
 
int current_index () const
 Get the index of the current event.
 

Detailed Description

template<class CellInputType>
class o2::emcal::EventHandler< CellInputType >::EventIterator

Definition at line 218 of file EventHandler.h.

Constructor & Destructor Documentation

◆ EventIterator() [1/2]

template<class CellInputType >
EventHandler::EventIterator::EventIterator ( const EventHandler handler,
int  eventID,
bool  forward 
)

Constructor, initializing the iterator.

Parameters
handlerEvent handler to iterate over
eventIDEvent ID from which to start the iteration
forwardDirection of the iteration (true = forward)

Definition at line 212 of file EventHandler.cxx.

◆ EventIterator() [2/2]

template<class CellInputType >
o2::emcal::EventHandler< CellInputType >::EventIterator::EventIterator ( const EventIterator other)
default

Copy constructor.

Parameters
otherReference for the copy

◆ ~EventIterator()

template<class CellInputType >
o2::emcal::EventHandler< CellInputType >::EventIterator::~EventIterator ( )
default

Destructor.

Member Function Documentation

◆ current_index()

template<class CellInputType >
int o2::emcal::EventHandler< CellInputType >::EventIterator::current_index ( ) const
inline

Get the index of the current event.

Returns
Index of the current event

Definition at line 279 of file EventHandler.h.

◆ operator!=()

template<class CellInputType >
bool o2::emcal::EventHandler< CellInputType >::EventIterator::operator!= ( const EventIterator rhs) const
inline

Check for not equalness.

Parameters
rhsIterator to compare to
Returns
True if iterators are different, false otherwise

Check is done on same event handler, event ID and direction

Definition at line 251 of file EventHandler.h.

◆ operator&()

template<class CellInputType >
EventData< CellInputType > & o2::emcal::EventHandler< CellInputType >::EventIterator::operator& ( )
inline

Get reference to the current event.

Returns
Reference to the current event of the iterator

Definition at line 275 of file EventHandler.h.

◆ operator*()

template<class CellInputType >
EventData< CellInputType > * o2::emcal::EventHandler< CellInputType >::EventIterator::operator* ( )
inline

Get pointer to the current event.

Returns
Pointer to the current event

Definition at line 271 of file EventHandler.h.

◆ operator++() [1/2]

template<class CellInputType >
EventHandler< CellInputType >::EventIterator & EventHandler::EventIterator::operator++ ( )

Prefix incrementation operator.

Returns
Iterator after incrementation

Definition at line 227 of file EventHandler.cxx.

◆ operator++() [2/2]

template<class CellInputType >
EventHandler< CellInputType >::EventIterator EventHandler::EventIterator::operator++ ( int  )

Postfix incrementation operator.

Returns
Iterator before incrementation

Definition at line 239 of file EventHandler.cxx.

◆ operator--() [1/2]

template<class CellInputType >
EventHandler< CellInputType >::EventIterator & EventHandler::EventIterator::operator-- ( )

Prefix decrementation operator.

Returns
Iterator after decrementation

Definition at line 247 of file EventHandler.cxx.

◆ operator--() [2/2]

template<class CellInputType >
EventHandler< CellInputType >::EventIterator EventHandler::EventIterator::operator-- ( int  )

Postfix decrementation operator.

Returns
Iterator before decrementation

Definition at line 259 of file EventHandler.cxx.

◆ operator=()

template<class CellInputType >
EventIterator & o2::emcal::EventHandler< CellInputType >::EventIterator::operator= ( const EventIterator other)
default

Assignment operator.

Parameters
otherReference for assignment
Returns
Iterator after assignment

◆ operator==()

template<class CellInputType >
bool o2::emcal::EventHandler< CellInputType >::EventIterator::operator== ( const EventIterator rhs) const

Check for equalness.

Parameters
rhsIterator to compare to
Returns
True if iterators are the same, false otherwise

Check is done on same event handler, event ID and direction


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