1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef UtilAlgos_SelectedOutputCollectionTrait_h
#define UtilAlgos_SelectedOutputCollectionTrait_h
/* \class helper SelectedOutputCollection
*
* \author Luca Lista, INFN
*
*/
#include "DataFormats/Common/interface/AssociationVector.h"
#include "DataFormats/Common/interface/RefToBase.h"
#include "DataFormats/Common/interface/RefToBaseVector.h"
#include "DataFormats/Common/interface/RefToBaseProd.h"
#include "DataFormats/Common/interface/RefVector.h"
#include "DataFormats/Common/interface/View.h"
namespace helper {
template <typename InputCollection>
struct SelectedOutputCollectionTrait {
typedef InputCollection type;
};
template <typename K, typename C>
struct SelectedOutputCollectionTrait<edm::AssociationVector<edm::RefProd<K>, C> > {
typedef typename edm::RefProd<K>::product_type type;
};
template <typename T, typename C>
struct SelectedOutputCollectionTrait<edm::AssociationVector<edm::RefToBaseProd<T>, C> > {
typedef typename edm::RefToBaseVector<T> type;
};
template <typename T>
struct SelectedOutputCollectionTrait<edm::View<T> > {
typedef typename edm::RefToBaseVector<T> type;
};
template <typename T>
struct SelectedOutputCollectionTrait<edm::RefToBaseVector<T> > {
typedef typename edm::RefToBaseVector<T> type;
};
template <typename C>
struct SelectedOutputCollectionTrait<edm::RefVector<C> > {
typedef typename edm::RefVector<C> type;
};
} // namespace helper
#endif
|