1 #ifndef DataFormats_Common_OneToValue_h
2 #define DataFormats_Common_OneToValue_h
9 template<
typename CKey,
typename Val,
typename index =
unsigned int>
25 typedef std::map<index_type, map_assoc>
map_type;
39 "can't insert null references in AssociationMap");
40 if (ref.
key.isNull()) {
58 const CKey & ckey = * ref.
key;
59 for(
typename map_type::const_iterator
i = map.begin();
i != map.end(); ++
i) {
61 m.insert(std::make_pair(k,
i->second));
68 const CKey & ckey = * ref.
key;
69 for(
typename map_type::const_iterator
i = map.begin();
i != map.end(); ++
i)
70 m.push_back(& ckey[
i->first]);
76 for(
typename map_type::const_iterator
i = map.begin();
i != map.end(); ++
i)
77 m.push_back(
i->second);
Val map_assoc
internal map associated data
helpers::Key< KeyRefProd > ref_type
reference set type
index index_type
index type
static void sort(map_type &)
sort
Val val_type
values reference collection type
static map_type::size_type size(const map_assoc &)
size of data_type
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
static val_type val(const ref_type &ref, const map_assoc &v)
return values collection
std::vector< const typename CKey::value_type * > transient_key_vector
transient key vector
static transient_map_type transientMap(const ref_type &ref, const map_type &map)
fill transient map
bool isNull() const
Checks for null.
static transient_key_vector transientKeyVector(const ref_type &ref, const map_type &map)
fill transient key vector
edm::Ref< CKey > key_type
insert key type
static void insert(ref_type &ref, map_type &m, const key_type &k, const data_type &v)
insert in the map
Container::value_type value_type
edm::RefProd< CKey > KeyRefProd
reference to "key" collection
Val data_type
insert val type
std::map< index_type, map_assoc > map_type
map type
static transient_val_vector transientValVector(const ref_type &ref, const map_type &map)
fill transient val vector
key_type key() const
Accessor for product key.
std::vector< Val > transient_val_vector
transient val vector
std::map< const typename CKey::value_type *, Val > transient_map_type
transient map type
void checkRef(const RP &rp, const R &r)
throw if r hasn't the same id as rp