CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Static Public Member Functions | Private Types
edm::OneToValue< CKey, Val, index > Class Template Reference

#include <OneToValue.h>

Public Types

typedef Val data_type
 insert val type More...
 
typedef index index_type
 index type More...
 
typedef edm::Ref< CKey > key_type
 insert key type More...
 
typedef std::map< index_type,
map_assoc
map_type
 map type More...
 
typedef helpers::Key< KeyRefProdref_type
 reference set type More...
 
typedef std::vector< const
typename CKey::value_type * > 
transient_key_vector
 transient key vector More...
 
typedef std::map< const
typename CKey::value_type
*, Val > 
transient_map_type
 transient map type More...
 
typedef std::vector< Val > transient_val_vector
 transient val vector More...
 
typedef Val val_type
 values reference collection type More...
 

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 More...
 
static map_type::size_type size (const map_assoc &)
 size of data_type More...
 
static void sort (map_type &)
 sort More...
 
static transient_key_vector transientKeyVector (const ref_type &ref, const map_type &map)
 fill transient key vector More...
 
static transient_map_type transientMap (const ref_type &ref, const map_type &map)
 fill transient map More...
 
static transient_val_vector transientValVector (const ref_type &ref, const map_type &map)
 fill transient val vector More...
 
static val_type val (const ref_type &ref, const map_assoc &v)
 return values collection More...
 

Private Types

typedef edm::RefProd< CKey > KeyRefProd
 reference to "key" collection More...
 
typedef Val map_assoc
 internal map associated data More...
 

Detailed Description

template<typename CKey, typename Val, typename index = unsigned int>
class edm::OneToValue< CKey, Val, index >

Definition at line 10 of file OneToValue.h.

Member Typedef Documentation

template<typename CKey, typename Val, typename index = unsigned int>
typedef Val edm::OneToValue< CKey, Val, index >::data_type

insert val type

Definition at line 21 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef index edm::OneToValue< CKey, Val, index >::index_type

index type

Definition at line 23 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef edm::Ref<CKey> edm::OneToValue< CKey, Val, index >::key_type

insert key type

Definition at line 19 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef edm::RefProd<CKey> edm::OneToValue< CKey, Val, index >::KeyRefProd
private

reference to "key" collection

Definition at line 12 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef Val edm::OneToValue< CKey, Val, index >::map_assoc
private

internal map associated data

Definition at line 14 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef std::map<index_type, map_assoc> edm::OneToValue< CKey, Val, index >::map_type

map type

Definition at line 25 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef helpers::Key<KeyRefProd> edm::OneToValue< CKey, Val, index >::ref_type

reference set type

Definition at line 27 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef std::vector<const typename CKey::value_type *> edm::OneToValue< CKey, Val, index >::transient_key_vector

transient key vector

Definition at line 31 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef std::map<const typename CKey::value_type *, Val> edm::OneToValue< CKey, Val, index >::transient_map_type

transient map type

Definition at line 29 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef std::vector<Val> edm::OneToValue< CKey, Val, index >::transient_val_vector

transient val vector

Definition at line 33 of file OneToValue.h.

template<typename CKey, typename Val, typename index = unsigned int>
typedef Val edm::OneToValue< CKey, Val, index >::val_type

values reference collection type

Definition at line 17 of file OneToValue.h.

Member Function Documentation

template<typename CKey, typename Val, typename index = unsigned int>
static void edm::OneToValue< CKey, Val, index >::insert ( ref_type ref,
map_type m,
const key_type k,
const data_type v 
)
inlinestatic

insert in the map

Definition at line 35 of file OneToValue.h.

Referenced by BeautifulSoup.PageElement::append().

36  {
37  if (k.isNull())
39  "can't insert null references in AssociationMap");
40  if (ref.key.isNull()) {
41  ref.key = KeyRefProd(k);
42  }
43  helpers::checkRef(ref.key, k);
44  index_type ik = index_type(k.key());
45  m[ik] = v;
46  }
index index_type
index type
Definition: OneToValue.h:23
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
Definition: EDMException.cc:81
edm::RefProd< CKey > KeyRefProd
reference to &quot;key&quot; collection
Definition: OneToValue.h:12
int k[5][pyjets_maxn]
void checkRef(const RP &rp, const R &r)
throw if r hasn&#39;t the same id as rp
mathSSE::Vec4< T > v
template<typename CKey, typename Val, typename index = unsigned int>
static map_type::size_type edm::OneToValue< CKey, Val, index >::size ( const map_assoc )
inlinestatic

size of data_type

Definition at line 52 of file OneToValue.h.

52 { return 1; }
template<typename CKey, typename Val, typename index = unsigned int>
static void edm::OneToValue< CKey, Val, index >::sort ( map_type )
inlinestatic

sort

Definition at line 54 of file OneToValue.h.

Referenced by hltFindDuplicates.ModuleList::group().

54 { }
template<typename CKey, typename Val, typename index = unsigned int>
static transient_key_vector edm::OneToValue< CKey, Val, index >::transientKeyVector ( const ref_type ref,
const map_type map 
)
inlinestatic

fill transient key vector

Definition at line 66 of file OneToValue.h.

66  {
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]);
71  return m;
72  }
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:160
std::vector< const typename CKey::value_type * > transient_key_vector
transient key vector
Definition: OneToValue.h:31
template<typename CKey, typename Val, typename index = unsigned int>
static transient_map_type edm::OneToValue< CKey, Val, index >::transientMap ( const ref_type ref,
const map_type map 
)
inlinestatic

fill transient map

Definition at line 56 of file OneToValue.h.

56  {
58  const CKey & ckey = * ref.key;
59  for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i) {
60  const typename CKey::value_type * k = & ckey[i->first];
61  m.insert(std::make_pair(k, i->second));
62  }
63  return m;
64  }
int i
Definition: DBlmapReader.cc:9
Container::value_type value_type
dictionary map
Definition: Association.py:160
int k[5][pyjets_maxn]
std::map< const typename CKey::value_type *, Val > transient_map_type
transient map type
Definition: OneToValue.h:29
template<typename CKey, typename Val, typename index = unsigned int>
static transient_val_vector edm::OneToValue< CKey, Val, index >::transientValVector ( const ref_type ref,
const map_type map 
)
inlinestatic

fill transient val vector

Definition at line 74 of file OneToValue.h.

74  {
76  for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i)
77  m.push_back(i->second);
78  return m;
79  }
int i
Definition: DBlmapReader.cc:9
dictionary map
Definition: Association.py:160
std::vector< Val > transient_val_vector
transient val vector
Definition: OneToValue.h:33
template<typename CKey, typename Val, typename index = unsigned int>
static val_type edm::OneToValue< CKey, Val, index >::val ( const ref_type ref,
const map_assoc v 
)
inlinestatic

return values collection

Definition at line 48 of file OneToValue.h.

48  {
49  return v;
50  }
mathSSE::Vec4< T > v