1 #ifndef DataFormats_Common_fillPtrVector_h
2 #define DataFormats_Common_fillPtrVector_h
36 template <
typename COLLECTION>
39 std::type_info
const& iToType,
40 std::vector<unsigned long>
const& iIndicies,
41 std::vector<void const*>& oPtr)
43 typedef COLLECTION product_type;
45 typedef typename product_type::const_iterator iter;
48 oPtr.reserve(iIndicies.size());
49 if(iToType ==
typeid(element_type)) {
50 for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
51 itEnd = iIndicies.end();
54 iter it = coll.begin();
55 std::advance(it, *itIndex);
57 oPtr.push_back(address);
62 for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
63 itEnd = iIndicies.end();
66 iter it = coll.begin();
67 std::advance(it, *itIndex);
74 "TypeConversionError "
75 "edm::PtrVector<> : unable to convert type ",
76 typeid(element_type).
name(),
86 template <
typename T,
typename A>
89 std::type_info
const& iToType,
90 std::vector<unsigned long>
const& iIndicies,
91 std::vector<void const*>& oPtr) {
95 template <
typename T,
typename A>
98 std::type_info
const& iToType,
99 std::vector<unsigned long>
const& iIndicies,
100 std::vector<void const*>& oPtr) {
104 template <
typename T,
typename A>
107 std::type_info
const& iToType,
108 std::vector<unsigned long>
const& iIndicies,
109 std::vector<void const*>& oPtr) {
113 template <
typename T,
typename A,
typename Comp>
116 std::type_info
const& iToType,
117 std::vector<unsigned long>
const& iIndicies,
118 std::vector<void const*>& oPtr) {
static const element_type * address(const iter &i)
void fillPtrVector(std::vector< T, A > const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
void const * pointerToBaseType(void const *ptr, TypeWithDict const &derivedType) const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void reallyfillPtrVector(COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
COLLECTION::value_type element_type