![]() |
AliPhysics
master (3d17d9d)
|
bidirectional stl iterator over the EMCAL iterable container More...
#include <AliEmcalIterableContainer.h>
Public Member Functions | |
iterator (const AliEmcalIterableContainerT< T, STAR > *cont, int currentpos, bool forward=true) | |
Content of class AliEmcalIterableContainerT<T, STAR>::Iterator ///. More... | |
iterator (const iterator &ref) | |
iterator & | operator= (const iterator &ref) |
~iterator () | |
bool | operator!= (const iterator &ref) const |
bool | operator== (const iterator &ret) const |
iterator & | operator++ () |
iterator | operator++ (int) |
iterator & | operator-- () |
iterator | operator-- (int) |
STAR::star_return_type | operator* () |
STAR::arrow_return_type | operator-> () |
int | current_index () const |
const AliTLorentzVector & | get_momentum () const |
Private Member Functions | |
iterator () | |
void | update_current_element () |
Private Attributes | |
const AliEmcalIterableContainerT< T, STAR > * | fkData |
container with data More... | |
int | fCurrent |
current index in the container More... | |
bool | fForward |
use forward or backward direction More... | |
momentum_object_pair | fCurrentElement |
current element pair (momentum, pointer object) More... | |
bidirectional stl iterator over the EMCAL iterable container
stl iterator corresponding to the EMCAL iterable container. The iterator iterates over all object in the EMCAL iterable container as specified in its constructor (all or accepted). It can be both forward or backward iterator.
As stl iterator it implements the operators required for an iterator
In case of c++11 the iterator also allows range-based iteration.
Definition at line 118 of file AliEmcalIterableContainer.h.
EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator | ( | const AliEmcalIterableContainerT< T, STAR > * | cont, |
int | currentpos, | ||
bool | forward = true |
||
) |
Content of class AliEmcalIterableContainerT<T, STAR>::Iterator ///.
Constructor of the iterator. Setting underlying data, starting position of the iterator, and direction.
Iterators should be constructed by the iterable container via the functions begin, end, rbegin and rend. Direct use of the constructor by the users is discouraged.
[in] | cont | EMCAL container to iterate over |
[in] | currentpos | starting position for the iteration |
[in] | forward | Direction of the iteration. If true, the iteration is performed in forward direction, otherwise in backward direction. |
Definition at line 361 of file AliEmcalIterableContainer.h.
EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator | ( | const iterator & | ref | ) |
|
inline |
Definition at line 123 of file AliEmcalIterableContainer.h.
|
private |
|
inline |
Definition at line 136 of file AliEmcalIterableContainer.h.
|
inline |
Definition at line 137 of file AliEmcalIterableContainer.h.
bool EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator!= | ( | const iterator & | ref | ) | const |
Comparison operator for unequalness. Comparison is performed based on the position inside the container
[in] | ref | Reference for comparison |
Definition at line 408 of file AliEmcalIterableContainer.h.
|
inline |
Definition at line 133 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T, STAR >::iterator & EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++ | ( | ) |
Prefix increment operator. Incrementing / decrementing position of the iterator based on the direction.
Definition at line 428 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++().
AliEmcalIterableContainerT< T, STAR >::iterator EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++ | ( | int | index | ) |
Postfix increment operator. Incrementing / decrementing the position of the iterator based on the direction. This operator requires a copy of itself.
[in] | index | Not used |
Definition at line 460 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T, STAR >::iterator & EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator-- | ( | ) |
Prefix decrement operator. Decrementing / incrementing the position of the iterator based on the direction.
Definition at line 443 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator--().
AliEmcalIterableContainerT< T, STAR >::iterator EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator-- | ( | int | index | ) |
Postfix decrement operator. Decrementing / incrementing the position of the iterator based on the direction. This operator requires a copy of itself.
[in] | index | Not used |
Definition at line 474 of file AliEmcalIterableContainer.h.
|
inline |
Definition at line 134 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T, STAR >::iterator & EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator= | ( | const iterator & | ref | ) |
Assignment operator. Only pointers are copied as the iterator does not own its container.
[in] | ref | Reference for the assignment |
Definition at line 392 of file AliEmcalIterableContainer.h.
bool EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator== | ( | const iterator & | ret | ) | const |
Comparison operator for equalness. Comparison is performed based on the position inside the container
[in] | ref | Reference for comparison |
Definition at line 418 of file AliEmcalIterableContainer.h.
|
inlineprivate |
Definition at line 147 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator--(), and EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator=().
|
private |
current index in the container
Definition at line 143 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator!=(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator--(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator=(), and EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator==().
|
private |
current element pair (momentum, pointer object)
Definition at line 145 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator().
|
private |
use forward or backward direction
Definition at line 144 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator++(), EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator--(), and EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator=().
|
private |
container with data
Definition at line 142 of file AliEmcalIterableContainer.h.
Referenced by EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::iterator(), and EMCALIterableContainer::AliEmcalIterableContainerT< T, STAR >::iterator::operator=().