1 #ifndef canvas_Persistency_Common_getElementAddresses_h 2 #define canvas_Persistency_Common_getElementAddresses_h 12 template <
class COLLECTION>
14 const std::type_info& iToType,
15 const std::vector<unsigned long>& iIndices,
16 std::vector<void const*>& oPtr);
20 const std::type_info& iToType,
21 const std::vector<unsigned long>& iIndices,
22 std::vector<void const*>& oPtr);
25 class value_type_helper;
31 static std::string
const&
34 static std::string
const pair_stem_s(
"std::pair<");
41 static size_t const pair_stem_offset_s =
pair_stem().size();
42 return pair_stem_offset_s;
55 static std::string
const mapped_type =
56 cet::demangle_symbol(
typeid(T).name());
65 template <
class COLLECTION>
68 const std::type_info& iToType,
69 const std::vector<unsigned long>& iIndices,
70 std::vector<void const*>& oPtr)
72 typedef COLLECTION product_type;
73 oPtr.reserve(iIndices.size());
75 itEnd = iIndices.end();
78 auto it = coll.begin();
79 advance(it, *itIndex);
88 const std::type_info& iToType,
89 const std::vector<unsigned long>& iIndices,
90 std::vector<void const*>& oPtr)
92 typedef cet::map_vector<T> product_type;
95 std::string
const wanted_type =
98 oPtr.reserve(iIndices.size());
102 itEnd = iIndices.end();
105 iter it = obj.find(cet::map_vector_key(*itIndex));
112 itEnd = iIndices.end();
116 obj.getOrNull(cet::map_vector_key(*itIndex)), iToType));
void const * maybeCastObj(element_type const *address, std::type_info const &tiTo)
bool starts_with_pair(std::string const &type_name, size_t pos=0)
static std::string const & pair_stem()
std::string uniform_type_name(std::type_info const &tid)
static size_t pair_stem_offset()
void getElementAddresses(COLLECTION const &coll, const std::type_info &iToType, const std::vector< unsigned long > &iIndices, std::vector< void const * > &oPtr)