File indexing completed on 2024-04-06 12:01:16
0001 #ifndef UtilAlgos_StoreContainerTrait_h
0002 #define UtilAlgos_StoreContainerTrait_h
0003
0004
0005
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 }
0038
0039 #endif