CMS 3D CMS Logo

StoreContainerTrait.h

Go to the documentation of this file.
00001 #ifndef UtilAlgos_StoreContainerTrait_h
00002 #define UtilAlgos_StoreContainerTrait_h
00003 /* \class helper::StoreContainerTrait
00004  *
00005  * \author Luca Lista, INFN
00006  */
00007 #include "DataFormats/Common/interface/RefVector.h"
00008 #include "DataFormats/Common/interface/RefToBaseVector.h"
00009 #include "DataFormats/Common/interface/PtrVector.h"
00010 #include "DataFormats/Common/interface/AssociationVector.h"
00011 
00012 namespace helper {
00013   template<typename OutputCollection>
00014     struct StoreContainerTrait {
00015       typedef std::vector<const typename OutputCollection::value_type *> type;
00016   };
00017 
00018   template<typename C>
00019   struct StoreContainerTrait<edm::RefVector<C> > {
00020     typedef edm::RefVector<C> type;
00021   };
00022 
00023   template<typename T>
00024   struct StoreContainerTrait<edm::RefToBaseVector<T> > {
00025     typedef edm::RefToBaseVector<T> type;
00026   };
00027 
00028   template<typename T>
00029   struct StoreContainerTrait<edm::PtrVector<T> > {
00030     typedef edm::PtrVector<T> type;
00031   };
00032 
00033   template<typename R, typename C>
00034    struct StoreContainerTrait<edm::AssociationVector<R, C> > {
00035      typedef typename StoreContainerTrait<typename R::product_type>::type type;
00036   };
00037 }
00038 
00039 #endif

Generated on Tue Jun 9 17:42:36 2009 for CMSSW by  doxygen 1.5.4