Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef UtilAlgos_SelectedOutputCollectionTrait_h
0002 #define UtilAlgos_SelectedOutputCollectionTrait_h
0003 /* \class helper SelectedOutputCollection
0004  *
0005  * \author Luca Lista, INFN
0006  *
0007  */
0008 #include "DataFormats/Common/interface/AssociationVector.h"
0009 #include "DataFormats/Common/interface/RefToBase.h"
0010 #include "DataFormats/Common/interface/RefToBaseVector.h"
0011 #include "DataFormats/Common/interface/RefToBaseProd.h"
0012 #include "DataFormats/Common/interface/RefVector.h"
0013 #include "DataFormats/Common/interface/View.h"
0014 
0015 namespace helper {
0016 
0017   template <typename InputCollection>
0018   struct SelectedOutputCollectionTrait {
0019     typedef InputCollection type;
0020   };
0021 
0022   template <typename K, typename C>
0023   struct SelectedOutputCollectionTrait<edm::AssociationVector<edm::RefProd<K>, C> > {
0024     typedef typename edm::RefProd<K>::product_type type;
0025   };
0026 
0027   template <typename T, typename C>
0028   struct SelectedOutputCollectionTrait<edm::AssociationVector<edm::RefToBaseProd<T>, C> > {
0029     typedef typename edm::RefToBaseVector<T> type;
0030   };
0031 
0032   template <typename T>
0033   struct SelectedOutputCollectionTrait<edm::View<T> > {
0034     typedef typename edm::RefToBaseVector<T> type;
0035   };
0036 
0037   template <typename T>
0038   struct SelectedOutputCollectionTrait<edm::RefToBaseVector<T> > {
0039     typedef typename edm::RefToBaseVector<T> type;
0040   };
0041 
0042   template <typename C>
0043   struct SelectedOutputCollectionTrait<edm::RefVector<C> > {
0044     typedef typename edm::RefVector<C> type;
0045   };
0046 
0047 }  // namespace helper
0048 
0049 #endif