LCIO
02.17
|
Templated helper class that is an std::vector<T*> of the elements in the LCCollection. More...
#include <LCTypedVector.h>
Public Member Functions | |
LCTypedVector ()=default | |
LCTypedVector (const LCTypedVector &)=delete | |
LCTypedVector & | operator= (const LCTypedVector &)=delete |
LCTypedVector (EVENT::LCCollection *collection) | |
EVENT::LCCollection * | col () |
![]() | |
T * | assign (T *...args) |
T * | at (T *...args) |
T * | back (T *...args) |
T * | begin (T *...args) |
T * | capacity (T *...args) |
T * | cbegin (T *...args) |
T * | cend (T *...args) |
T * | clear (T *...args) |
T * | crbegin (T *...args) |
T * | crend (T *...args) |
T * | data (T *...args) |
T * | emplace (T *...args) |
T * | emplace_back (T *...args) |
T * | empty (T *...args) |
T * | end (T *...args) |
T * | erase (T *...args) |
T * | front (T *...args) |
T * | get_allocator (T *...args) |
T * | insert (T *...args) |
T * | max_size (T *...args) |
T * | operator= (T *...args) |
T * | operator[] (T *...args) |
T * | pop_back (T *...args) |
T * | push_back (T *...args) |
T * | rbegin (T *...args) |
T * | rend (T *...args) |
T * | reserve (T *...args) |
T * | resize (T *...args) |
T * | shrink_to_fit (T *...args) |
T * | size (T *...args) |
T * | swap (T *...args) |
T * | vector (T *...args) |
T * | ~vector (T *...args) |
Protected Attributes | |
EVENT::LCCollection * | _col |
Additional Inherited Members | |
![]() | |
T * | elements |
STL member. More... | |
Templated helper class that is an std::vector<T*> of the elements in the LCCollection.
This can be used, e.g. if the objects are to be passed to an algorithm in terms of iterators. For example:
LCTypedVector<SimTrackerHits> sim( evt->getCollection("tpc") ) ;
LCCollectionVec* trackerHits = new LCCollectionVec( LCIO::TRACKERHIT ) ;
std::transform( sim.begin(), sim.end(), std::back_inserter( *trackerHits ) , digitizer ) ;
Note that instantiating an LCTypedVector involves copying and casting of the pointers in the collection. In a future release of LCIO this might not be neccessary any more.
Definition at line 29 of file LCTypedVector.h.
|
default |
|
delete |
|
inline |
Definition at line 36 of file LCTypedVector.h.
References UTIL::LCTypedVector< T >::_col, EVENT::LCCollection::getElementAt(), EVENT::LCCollection::getNumberOfElements(), EVENT::LCCollection::getTypeName(), std::vector< T * >::resize(), and std::stringstream::str().
|
inline |
Definition at line 56 of file LCTypedVector.h.
References UTIL::LCTypedVector< T >::_col.
|
delete |
|
protected |
Definition at line 59 of file LCTypedVector.h.
Referenced by UTIL::LCTypedVector< T >::col(), and UTIL::LCTypedVector< T >::LCTypedVector().