LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Attributes | List of all members
UTIL::LCTypedVector< T > Class Template Reference

Templated helper class that is an std::vector<T*> of the elements in the LCCollection. More...

#include <LCTypedVector.h>

+ Inheritance diagram for UTIL::LCTypedVector< T >:

Public Member Functions

 LCTypedVector ()=default
 
 LCTypedVector (const LCTypedVector &)=delete
 
LCTypedVectoroperator= (const LCTypedVector &)=delete
 
 LCTypedVector (EVENT::LCCollection *collection)
 
EVENT::LCCollectioncol ()
 
- Public Member Functions inherited from std::vector< T * >
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

- Public Attributes inherited from std::vector< T * >
T * elements
 STL member. More...
 

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.3 2007-02-19 17:38:46 gaede Exp

Definition at line 29 of file LCTypedVector.h.

Constructor & Destructor Documentation

template<class T >
UTIL::LCTypedVector< T >::LCTypedVector ( )
default
template<class T >
UTIL::LCTypedVector< T >::LCTypedVector ( const LCTypedVector< T > &  )
delete
template<class T >
UTIL::LCTypedVector< T >::LCTypedVector ( EVENT::LCCollection collection)
inline

Member Function Documentation

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

Definition at line 56 of file LCTypedVector.h.

References UTIL::LCTypedVector< T >::_col.

template<class T >
LCTypedVector& UTIL::LCTypedVector< T >::operator= ( const LCTypedVector< T > &  )
delete

Member Data Documentation

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

The documentation for this class was generated from the following file: