![]() |
AliPhysics
b24dc27 (b24dc27)
|
#include <AliEmcalIterableContainer.h>
Classes | |
class | iterator |
bidirectional stl iterator over the EMCAL iterable container More... | |
Public Member Functions | |
AliEmcalIterableContainerT () | |
AliEmcalIterableContainerT (const AliEmcalContainer *cont, bool useAccept) | |
AliEmcalIterableContainerT (const AliEmcalIterableContainerT< T > &ref) | |
AliEmcalIterableContainerT< T > & | operator= (const AliEmcalIterableContainerT< T > &ref) |
virtual | ~AliEmcalIterableContainerT () |
T * | operator[] (int index) const |
operator int () const | |
const AliEmcalContainer * | GetContainer () const |
int | GetEntries () const |
iterator | begin () const |
iterator | end () const |
iterator | rbegin () const |
iterator | rend () const |
Protected Member Functions | |
void | BuildAcceptIndices () |
Private Attributes | |
const AliEmcalContainer * | fkContainer |
Container to be iterated over. More... | |
TArrayI | fAcceptIndices |
Array of accepted indices. More... | |
Bool_t | fUseAccepted |
Switch between accepted and all objects. More... | |
Definition at line 54 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T >::AliEmcalIterableContainerT | ( | ) |
Default (I/O) constructor
Definition at line 168 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T >::AliEmcalIterableContainerT | ( | const AliEmcalContainer * | cont, |
bool | useAccept | ||
) |
Standard constructor, to be used by the users. Specifying the type of iteration (all vs. accepted). In case the iterator runs over accepted object, an index map is build inside the constructor.
[in] | cont | EMCAL container to iterate over |
[in] | useAccept | If true accepted objects are used in the iteration, otherwise all objects |
Definition at line 184 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T >::AliEmcalIterableContainerT | ( | const AliEmcalIterableContainerT< T > & | ref | ) |
Copy constructor. Initializing all parameters from the reference. As the container is not owner over its input container only pointers are copied.
[in] | ref | Reference for the copy |
Definition at line 199 of file AliEmcalIterableContainer.h.
|
inlinevirtual |
Destructor
Definition at line 107 of file AliEmcalIterableContainer.h.
|
inline |
Creating forward iterator at the beginning of the container (first entry).
Definition at line 130 of file AliEmcalIterableContainer.h.
Referenced by AliMCParticleContainer::accept_begin(), AliParticleContainer::accept_begin(), AliClusterContainer::accept_begin(), AliTrackContainer::accept_begin(), AliJetContainer::accept_begin(), AliMCParticleContainer::begin(), AliParticleContainer::begin(), AliClusterContainer::begin(), AliTrackContainer::begin(), and AliJetContainer::begin().
|
protected |
Build list of accepted indices inside the container. For this all objects inside the container are checked for being accepted or not.
Definition at line 263 of file AliEmcalIterableContainer.h.
Referenced by AliEmcalIterableContainerT< T >::AliEmcalIterableContainerT().
|
inline |
Creating forward iterator behind the last entry of the container.
Definition at line 137 of file AliEmcalIterableContainer.h.
Referenced by AliMCParticleContainer::accept_end(), AliParticleContainer::accept_end(), AliClusterContainer::accept_end(), AliTrackContainer::accept_end(), AliJetContainer::accept_end(), AliMCParticleContainer::end(), AliParticleContainer::end(), AliClusterContainer::end(), AliTrackContainer::end(), and AliJetContainer::end().
|
inline |
Access to underlying EMCAL container
Definition at line 121 of file AliEmcalIterableContainer.h.
int AliEmcalIterableContainerT< T >::GetEntries | ( | ) | const |
Return the number of objects to iterate over (depending on whether the iterator loops over all or only accepted objects)
Definition at line 231 of file AliEmcalIterableContainer.h.
Referenced by AliEmcalIterableContainerT< T >::end(), AliJetContainer::GetNAcceptedJets(), AliEmcalIterableContainerT< T >::operator int(), and AliEmcalIterableContainerT< T >::rbegin().
|
inline |
Integer conversion operator: Returning the size if the container (number of entries)
Definition at line 115 of file AliEmcalIterableContainer.h.
AliEmcalIterableContainerT< T > & AliEmcalIterableContainerT< T >::operator= | ( | const AliEmcalIterableContainerT< T > & | ref | ) |
Assignment operator. As the container is not owner over the input container only pointers are copied
[in] | ref | Reference for assignment |
Definition at line 215 of file AliEmcalIterableContainer.h.
T * AliEmcalIterableContainerT< T >::operator[] | ( | int | index | ) | const |
Array index operator. Returns object of the container at the position provided by the parameter index. The operator distinguishes between all and accepted objects:
[in] | index | Index of the object inside the container to access |
Definition at line 251 of file AliEmcalIterableContainer.h.
|
inline |
Creating backward iterator at the end of the container (last entry).
Definition at line 144 of file AliEmcalIterableContainer.h.
Referenced by AliMCParticleContainer::accept_rbegin(), AliParticleContainer::accept_rbegin(), AliClusterContainer::accept_rbegin(), AliTrackContainer::accept_rbegin(), AliJetContainer::accept_rbegin(), AliMCParticleContainer::rbegin(), AliParticleContainer::rbegin(), AliClusterContainer::rbegin(), AliTrackContainer::rbegin(), and AliJetContainer::rbegin().
|
inline |
Creating backward iterator before the beginning of the container.
Definition at line 151 of file AliEmcalIterableContainer.h.
Referenced by AliMCParticleContainer::accept_rend(), AliParticleContainer::accept_rend(), AliClusterContainer::accept_rend(), AliTrackContainer::accept_rend(), AliJetContainer::accept_rend(), AliMCParticleContainer::rend(), AliParticleContainer::rend(), AliClusterContainer::rend(), AliTrackContainer::rend(), and AliJetContainer::rend().
|
private |
Array of accepted indices.
Definition at line 158 of file AliEmcalIterableContainer.h.
Referenced by AliEmcalIterableContainerT< T >::operator=().
|
private |
Container to be iterated over.
Definition at line 157 of file AliEmcalIterableContainer.h.
Referenced by AliEmcalIterableContainerT< T >::GetContainer(), and AliEmcalIterableContainerT< T >::operator=().
|
private |
Switch between accepted and all objects.
Definition at line 159 of file AliEmcalIterableContainer.h.
Referenced by AliEmcalIterableContainerT< T >::AliEmcalIterableContainerT(), and AliEmcalIterableContainerT< T >::operator=().