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;
46 if(iToType ==
typeid(element_type)) {
47 iter it = coll.begin();
48 std::advance(it,iIndex);
54 iter it = coll.begin();
55 std::advance(it,iIndex);
63 "edm::Ptr<> : unable to convert type ",
64 typeid(element_type).
name(),
73 template <
typename T,
typename A>
76 std::type_info
const& iToType,
82 template <
typename T,
typename A>
85 std::type_info
const& iToType,
91 template <
typename T,
typename A>
94 std::type_info
const& iToType,
100 template <
typename T,
typename A,
typename Comp>
103 std::type_info
const& iToType,
104 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)