Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:50:12

0001 #ifndef UtilAlgos_StoreContainerTrait_h
0002 #define UtilAlgos_StoreContainerTrait_h
0003 /* \class helper::StoreContainerTrait
0004  *
0005  * \author Luca Lista, INFN
0006  */
0007 #include "DataFormats/Common/interface/RefVector.h"
0008 #include "DataFormats/Common/interface/RefToBaseVector.h"
0009 #include "DataFormats/Common/interface/PtrVector.h"
0010 #include "DataFormats/Common/interface/AssociationVector.h"
0011 
0012 namespace helper {
0013   template <typename OutputCollection>
0014   struct StoreContainerTrait {
0015     typedef std::vector<const typename OutputCollection::value_type *> type;
0016   };
0017 
0018   template <typename C>
0019   struct StoreContainerTrait<edm::RefVector<C> > {
0020     typedef edm::RefVector<C> type;
0021   };
0022 
0023   template <typename T>
0024   struct StoreContainerTrait<edm::RefToBaseVector<T> > {
0025     typedef edm::RefToBaseVector<T> type;
0026   };
0027 
0028   template <typename T>
0029   struct StoreContainerTrait<edm::PtrVector<T> > {
0030     typedef edm::PtrVector<T> type;
0031   };
0032 
0033   template <typename R, typename C>
0034   struct StoreContainerTrait<edm::AssociationVector<R, C> > {
0035     typedef typename StoreContainerTrait<typename R::product_type>::type type;
0036   };
0037 }  // namespace helper
0038 
0039 #endif