CMS 3D CMS Logo

HolderToVectorTrait.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_HolderToVectorTrait_h
2 #define DataFormats_Common_HolderToVectorTrait_h
4 #include <memory>
5 
6 namespace edm {
7  namespace reftobase {
8  class RefVectorHolderBase;
9  template <typename T> class BaseVectorHolder;
10 
11  template <typename T, typename REF>
13  static std::unique_ptr<BaseVectorHolder<T> > makeVectorHolder() {
15  "InvalidHolderToVector: trying to use RefToBase built with "
16  "an internal type. RefToBase should be built passing an "
17  "object of type edm::Ref<C>. This exception should never "
18  "be thrown if a RefToBase was built from a RefProd<C>.");
19  return std::unique_ptr<BaseVectorHolder<T> >();
20  }
21  };
22 
23  template<typename T, typename REF>
25  // static_assert(sizeof(REF) == 0);
27  };
28 
29  template <typename REF>
31  static std::unique_ptr<RefVectorHolderBase> makeVectorHolder() {
33  "InvalidRefHolderToRefVector: trying to use RefToBaseVector built with "
34  "an internal type. RefToBase should be built passing an "
35  "object of type edm::RefVector<C>");
36  return std::unique_ptr<RefVectorHolderBase>();
37  }
38  };
39 
40  template<typename REF>
42  // static_assert(sizeof(REF) == 0);
44  };
45 
46  }
47 }
48 
49 //Handle specialization here
53 
54 #endif
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:82
static std::unique_ptr< RefVectorHolderBase > makeVectorHolder()
static std::unique_ptr< BaseVectorHolder< T > > makeVectorHolder()
InvalidRefHolderToRefVector< REF > type
HLT enums.
InvalidHolderToVector< T, REF > type