2 #ifndef UTIL_LCIterator_include
3 #define UTIL_LCIterator_include
8 #include "EVENT/LCEvent.h"
9 #include "EVENT/LCCollection.h"
56 _col = evt->getCollection( name ) ;
69 s <<
" invalid iterator type : " <<
typeid( t ).name() <<
" for collection " << name << std::endl ;
89 s <<
" invalid iterator type : " <<
typeid( t ).name() <<
" for collection " << std::endl ;
Base exception class for LCIO - all other exceptions extend this.
Definition: Exceptions.h:21
EVENT::LCCollection * operator()()
Return pointer to LCCollection, e.g.
Definition: LCIterator.h:117
virtual LCObject * getElementAt(int index) const =0
Returns pointer to element at index - no range check, use getNumberOfEntries().
T * next()
Returns the next element as long as there is one, otherwise 0 is returned.
Definition: LCIterator.h:97
EVENT::LCCollection * operator->()
Serves as a handle to the LCCollection itself, to provide access to the collection parameters etc...
Definition: LCIterator.h:113
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
The main event interface.
Definition: LCEvent.h:30
EventException used for data not available.
Definition: Exceptions.h:60
The generic collection used in LCIO.
Definition: LCCollection.h:29
int size()
Size of the collection.
Definition: LCIterator.h:108
Simple convenient iterator class for LCCollections that saves some boiler plate code.
Definition: LCIterator.h:39