Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

UTIL::LCTypedVector< T > Class Template Reference

#include <LCTypedVector.h>

List of all members.

Public Member Functions

 LCTypedVector (EVENT::LCCollection *col)
EVENT::LCCollectioncol ()

Protected Attributes

EVENT::LCCollection_col


Detailed Description

template<class T>
class UTIL::LCTypedVector< T >

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.

Author:
gaede
Version:
Id
LCTypedVector.h,v 1.2 2006/03/28 17:18:49 gaede Exp

Definition at line 29 of file LCTypedVector.h.


Constructor & Destructor Documentation

template<class T>
UTIL::LCTypedVector< T >::LCTypedVector EVENT::LCCollection col  )  [inline]
 

Definition at line 33 of file LCTypedVector.h.

References EVENT::LCCollection::getElementAt(), and EVENT::LCCollection::getTypeName().


Member Function Documentation

template<class T>
EVENT::LCCollection* UTIL::LCTypedVector< T >::col  )  [inline]
 

Definition at line 53 of file LCTypedVector.h.


Member Data Documentation

template<class T>
EVENT::LCCollection* UTIL::LCTypedVector< T >::_col [protected]
 

Definition at line 56 of file LCTypedVector.h.


The documentation for this class was generated from the following file:
Generated on Sun Jun 3 06:32:40 2007 for A TPC Tracking Environment by  doxygen 1.3.9.1