2 #ifndef UTIL_LCIterator_include
3 #define UTIL_LCIterator_include
55 _col = evt->getCollection( name ) ;
68 s <<
" invalid iterator type : " <<
typeid( t ).name() <<
" for collection " << name <<
std::endl ;
69 throw lcio::Exception( s.
str() ) ;
88 s <<
" invalid iterator type : " <<
typeid( t ).name() <<
" for collection " <<
std::endl ;
89 throw lcio::Exception( s.
str() ) ;
const EVENT::LCCollection * operator()()
Return pointer to LCCollection, e.g.
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.
const EVENT::LCCollection * _col
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
The main event interface.
EventException used for data not available.
The generic collection used in LCIO.
int size()
Size of the collection.
const EVENT::LCCollection * operator->()
Serves as a handle to the LCCollection itself, to provide access to the collection parameters etc...
Simple convenient iterator class for LCCollections that saves some boiler plate code.