CMS 3D CMS Logo

edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef > Class Template Reference

#include <DataFormats/Common/interface/OneToOneGeneric.h>

List of all members.

Public Types

typedef ValRef data_type
 insert val type
typedef index index_type
 index type
typedef KeyRef key_type
 insert key type
typedef std::map< index_type,
map_assoc
map_type
 map type
typedef helpers::KeyVal
< keyrefprod_type,
valrefprod_type
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 *,
const typename
CVal::value_type * > 
transient_map_type
 transient map type
typedef std::vector< const
typename CVal::value_type * > 
transient_val_vector
 transient val vector
typedef ValRef 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 &v)
 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, map_assoc iv)
 return values collection

Private Types

typedef KeyRefProd keyrefprod_type
 reference to "key" collection
typedef index map_assoc
 internal map associated data
typedef ValRefProd valrefprod_type
 reference to "value" collection


Detailed Description

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
class edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >

Definition at line 13 of file OneToOneGeneric.h.


Member Typedef Documentation

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef ValRef edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::data_type

insert val type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 27 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef index edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::index_type

index type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 29 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef KeyRef edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::key_type

insert key type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 25 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef KeyRefProd edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::keyrefprod_type [private]

reference to "key" collection

Definition at line 15 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef index edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::map_assoc [private]

internal map associated data

Definition at line 19 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef std::map<index_type, map_assoc> edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::map_type

map type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 31 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef helpers::KeyVal<keyrefprod_type, valrefprod_type> edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::ref_type

reference set type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 33 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef std::vector<const typename CKey::value_type *> edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transient_key_vector

transient key vector

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 38 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef std::map<const typename CKey::value_type *, const typename CVal::value_type *> edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transient_map_type

transient map type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 36 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef std::vector<const typename CVal::value_type *> edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transient_val_vector

transient val vector

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 40 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef ValRef edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::val_type

values reference collection type

Reimplemented in edm::OneToOne< CKey, CVal, index >.

Definition at line 23 of file OneToOneGeneric.h.

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
typedef ValRefProd edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::valrefprod_type [private]

reference to "value" collection

Definition at line 17 of file OneToOneGeneric.h.


Member Function Documentation

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static void edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::insert ( ref_type ref,
map_type m,
const key_type k,
const data_type v 
) [inline, static]

insert in the map

Definition at line 42 of file OneToOneGeneric.h.

00043                                                                 {
00044       if (k.isNull() || v.isNull())
00045         throw edm::Exception(edm::errors::InvalidReference)
00046           << "can't insert null references in AssociationMap";
00047       if (ref.key.isNull()) {
00048         ref.key = keyrefprod_type(k);
00049         ref.val = valrefprod_type(v);
00050       }
00051       helpers::checkRef(ref.key, k); helpers::checkRef(ref.val, v);
00052       index_type ik = index_type(k.key()), iv = index_type(v.key());
00053       m[ik] = iv;
00054     }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static map_type::size_type edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::size ( const map_assoc v  )  [inline, static]

size of data_type

Definition at line 60 of file OneToOneGeneric.h.

00060 { return 1; }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static void edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::sort ( map_type  )  [inline, static]

sort

Definition at line 62 of file OneToOneGeneric.h.

00062 { }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static transient_key_vector edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transientKeyVector ( const ref_type ref,
const map_type map 
) [inline, static]

fill transient key vector

Definition at line 76 of file OneToOneGeneric.h.

00076                                                                                                {
00077       transient_key_vector m;
00078       const CKey & ckey = * ref.key;
00079       for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i)
00080         m.push_back(& ckey[i->first]);
00081       return m;
00082     }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static transient_map_type edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transientMap ( const ref_type ref,
const map_type map 
) [inline, static]

fill transient map

Definition at line 64 of file OneToOneGeneric.h.

00064                                                                                        {
00065       transient_map_type m;
00066       const CKey & ckey = * ref.key;
00067       const CVal & cval = * ref.val;
00068       for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i) {
00069         const typename CKey::value_type * k = & ckey[i->first];
00070         const typename CVal::value_type * v = & cval[i->second];
00071         m.insert(std::make_pair(k, v));
00072       }
00073       return m;
00074     }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static transient_val_vector edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::transientValVector ( const ref_type ref,
const map_type map 
) [inline, static]

fill transient val vector

Definition at line 84 of file OneToOneGeneric.h.

00084                                                                                                {
00085       transient_val_vector m;
00086       const CVal & cval = * ref.val;
00087       for(typename map_type::const_iterator i = map.begin(); i != map.end(); ++ i)
00088         m.push_back(& cval[i->second]);
00089       return m;
00090     }

template<typename CKey, typename CVal, typename index = unsigned int, typename KeyRefProd = typename helper::MapRefViewTrait<CKey>::refprod_type, typename ValRefProd = typename helper::MapRefViewTrait<CVal>::refprod_type, typename KeyRef = typename helper::MapRefViewTrait<CKey>::ref_type, typename ValRef = typename helper::MapRefViewTrait<CVal>::ref_type>
static val_type edm::OneToOneGeneric< CKey, CVal, index, KeyRefProd, ValRefProd, KeyRef, ValRef >::val ( const ref_type ref,
map_assoc  iv 
) [inline, static]

return values collection

Definition at line 56 of file OneToOneGeneric.h.

00056                                                             {
00057       return val_type(ref.val, iv);
00058     }


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:41:59 2009 for CMSSW by  doxygen 1.5.4