#include <DataFormats/Common/interface/OneToValue.h>
Public Types | |
typedef Val | data_type |
insert val type | |
typedef index | index_type |
index type | |
typedef edm::Ref< CKey > | key_type |
insert key type | |
typedef std::map< index_type, map_assoc > | map_type |
map type | |
typedef helpers::Key< KeyRefProd > | ref_type |
reference set type | |
typedef std::vector< const typename CKey::value_type * > | transient_key_vector |
transient key vector | |
typedef std::map< const typename CKey::value_type *, Val > | transient_map_type |
transient map type | |
typedef std::vector< Val > | transient_val_vector |
transient val vector | |
typedef Val | val_type |
values reference collection type | |
Static Public Member Functions | |
static void | insert (ref_type &ref, map_type &m, const key_type &k, const data_type &v) |
insert in the map | |
static map_type::size_type | size (const map_assoc &) |
size of data_type | |
static void | sort (map_type &) |
sort | |
static transient_key_vector | transientKeyVector (const ref_type &ref, const map_type &map) |
fill transient key vector | |
static transient_map_type | transientMap (const ref_type &ref, const map_type &map) |
fill transient map | |
static transient_val_vector | transientValVector (const ref_type &ref, const map_type &map) |
fill transient val vector | |
static val_type | val (const ref_type &ref, const map_assoc &v) |
return values collection | |
Private Types | |
typedef edm::RefProd< CKey > | KeyRefProd |
reference to "key" collection | |
typedef Val | map_assoc |
internal map associated data |
Definition at line 10 of file OneToValue.h.
typedef Val edm::OneToValue< CKey, Val, index >::data_type |
typedef index edm::OneToValue< CKey, Val, index >::index_type |
typedef edm::Ref<CKey> edm::OneToValue< CKey, Val, index >::key_type |
typedef edm::RefProd<CKey> edm::OneToValue< CKey, Val, index >::KeyRefProd [private] |
typedef Val edm::OneToValue< CKey, Val, index >::map_assoc [private] |
typedef std::map<index_type, map_assoc> edm::OneToValue< CKey, Val, index >::map_type |
typedef helpers::Key<KeyRefProd> edm::OneToValue< CKey, Val, index >::ref_type |
typedef std::vector<const typename CKey::value_type *> edm::OneToValue< CKey, Val, index >::transient_key_vector |
typedef std::map<const typename CKey::value_type *, Val> edm::OneToValue< CKey, Val, index >::transient_map_type |
typedef std::vector<Val> edm::OneToValue< CKey, Val, index >::transient_val_vector |
typedef Val edm::OneToValue< CKey, Val, index >::val_type |
static void edm::OneToValue< CKey, Val, index >::insert | ( | ref_type & | ref, | |
map_type & | m, | |||
const key_type & | k, | |||
const data_type & | v | |||
) | [inline, static] |
insert in the map
Definition at line 35 of file OneToValue.h.
References edm::helpers::checkRef(), edm::errors::InvalidReference, edm::Ref< C, T, F >::isNull(), edm::Ref< C, T, F >::key(), and edm::helpers::Key< K >::key.
00036 { 00037 if (k.isNull()) 00038 throw edm::Exception(edm::errors::InvalidReference) 00039 << "can't insert null references in AssociationMap"; 00040 if (ref.key.isNull()) { 00041 ref.key = KeyRefProd(k); 00042 } 00043 helpers::checkRef(ref.key, k); 00044 index_type ik = index_type(k.key()); 00045 m[ik] = v; 00046 }
static map_type::size_type edm::OneToValue< CKey, Val, index >::size | ( | const map_assoc & | ) | [inline, static] |
static void edm::OneToValue< CKey, Val, index >::sort | ( | map_type & | ) | [inline, static] |
static transient_key_vector edm::OneToValue< CKey, Val, index >::transientKeyVector | ( | const ref_type & | ref, | |
const map_type & | map | |||
) | [inline, static] |
fill transient key vector
Definition at line 66 of file OneToValue.h.
References i, edm::helpers::Key< K >::key, and m.
00066 { 00067 transient_key_vector m; 00068 const CKey & ckey = * ref.key; 00069 for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i) 00070 m.push_back(& ckey[i->first]); 00071 return m; 00072 }
static transient_map_type edm::OneToValue< CKey, Val, index >::transientMap | ( | const ref_type & | ref, | |
const map_type & | map | |||
) | [inline, static] |
fill transient map
Definition at line 56 of file OneToValue.h.
References i, k, edm::helpers::Key< K >::key, and m.
00056 { 00057 transient_map_type m; 00058 const CKey & ckey = * ref.key; 00059 for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i) { 00060 const typename CKey::value_type * k = & ckey[i->first]; 00061 m.insert(std::make_pair(k, i->second)); 00062 } 00063 return m; 00064 }
static transient_val_vector edm::OneToValue< CKey, Val, index >::transientValVector | ( | const ref_type & | ref, | |
const map_type & | map | |||
) | [inline, static] |
static val_type edm::OneToValue< CKey, Val, index >::val | ( | const ref_type & | ref, | |
const map_assoc & | v | |||
) | [inline, static] |
return values collection
Definition at line 48 of file OneToValue.h.
00048 { 00049 return v; 00050 }