File indexing completed on 2024-04-06 12:03:50
0001 #ifndef DataFormats_Common_CloneTrait_h
0002 #define DataFormats_Common_CloneTrait_h
0003 #include "DataFormats/Common/interface/CopyPolicy.h"
0004 #include "DataFormats/Common/interface/OwnVector.h"
0005 #include "DataFormats/Common/interface/View.h"
0006 #include "DataFormats/Common/interface/RefToBaseVector.h"
0007 #include <vector>
0008
0009 namespace edm {
0010 namespace clonehelper {
0011 template <typename T>
0012 struct CloneTrait;
0013
0014 template <typename T>
0015 struct CloneTrait<std::vector<T> > {
0016 typedef CopyPolicy<T> type;
0017 };
0018
0019 template <typename T>
0020 struct CloneTrait<edm::OwnVector<T> > {
0021 typedef ClonePolicy<T> type;
0022 };
0023
0024 template <typename T>
0025 struct CloneTrait<edm::View<T> > {
0026 typedef ClonePolicy<T> type;
0027 };
0028
0029 template <typename T>
0030 struct CloneTrait<edm::RefToBaseVector<T> > {
0031 typedef CopyPolicy<RefToBase<T> > type;
0032 };
0033
0034 }
0035 }
0036
0037 #endif