1 #ifndef DataFormats_Common_setPtr_h
2 #define DataFormats_Common_setPtr_h
35 template <
typename COLLECTION>
38 std::type_info
const& iToType,
41 typedef COLLECTION product_type;
43 typedef typename product_type::const_iterator iter;
45 if(iToType ==
typeid(element_type)) {
46 iter it = coll.begin();
47 std::advance(it,iIndex);
53 iter it = coll.begin();
54 std::advance(it,iIndex);
62 "edm::Ptr<> : unable to convert type ",
63 typeid(element_type).
name(),
72 template <
typename T,
typename A>
75 std::type_info
const& iToType,
81 template <
typename T,
typename A>
84 std::type_info
const& iToType,
90 template <
typename T,
typename A>
93 std::type_info
const& iToType,
99 template <
typename T,
typename A,
typename Comp>
102 std::type_info
const& iToType,
103 unsigned long iIndex,
static const element_type * address(const iter &i)
void const * pointerToBaseType(void const *ptr, TypeWithDict const &derivedType) const
void setPtr(std::vector< T, A > const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
COLLECTION::value_type element_type
void reallySetPtr(COLLECTION const &coll, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)