CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes
edm::MultiAssociation< C >::FastFiller Class Reference

#include <MultiAssociation.h>

Public Member Functions

template<typename HandleType >
 FastFiller (MultiAssociation &assoc, const HandleType &handle)
 
 FastFiller (MultiAssociation &assoc, edm::ProductID id, unsigned int size)
 
template<typename KeyRef >
void setValues (const KeyRef &k, const Collection &refs)
 Sets the Collection values associated to this key, making copies of those in refs. More...
 
void setValues (const edm::ProductID &id, unsigned int key, const Collection &refs)
 Sets the Collection values associated to this key, making copies of those in refs. More...
 
 ~FastFiller ()
 

Private Types

typedef
edm::helper::IndexRangeAssociation::FastFiller 
IndexFiller
 

Private Attributes

MultiAssociationassoc_
 
boost::shared_ptr< IndexFillerindexFiller_
 

Detailed Description

template<typename C>
class edm::MultiAssociation< C >::FastFiller

FastFiller for the MultiAssociation. It is fast, but it requires to fill items in strict key order. You can have a single FastFiller for a given map at time You can't access the map for this collection while filling it

Definition at line 209 of file MultiAssociation.h.

Member Typedef Documentation

Definition at line 228 of file MultiAssociation.h.

Constructor & Destructor Documentation

template<typename C>
template<typename HandleType >
edm::MultiAssociation< C >::FastFiller::FastFiller ( MultiAssociation assoc,
const HandleType &  handle 
)
inline

Definition at line 212 of file MultiAssociation.h.

212  :
213  assoc_(assoc), indexFiller_(new IndexFiller(assoc_.indices_, handle.id(), handle->size())) {}
edm::helper::IndexRangeAssociation::FastFiller IndexFiller
tuple handle
Definition: patZpeak.py:22
boost::shared_ptr< IndexFiller > indexFiller_
template<typename C>
edm::MultiAssociation< C >::FastFiller::FastFiller ( MultiAssociation assoc,
edm::ProductID  id,
unsigned int  size 
)
inline

Definition at line 215 of file MultiAssociation.h.

215  :
216  assoc_(assoc), indexFiller_(new IndexFiller(assoc_.indices_, id, size)) {}
unsigned int size() const
Returns the number of keys.
edm::helper::IndexRangeAssociation::FastFiller IndexFiller
boost::shared_ptr< IndexFiller > indexFiller_
template<typename C>
edm::MultiAssociation< C >::FastFiller::~FastFiller ( )
inline

Definition at line 218 of file MultiAssociation.h.

218 {}

Member Function Documentation

template<typename C>
template<typename KeyRef >
void edm::MultiAssociation< C >::FastFiller::setValues ( const KeyRef &  k,
const Collection refs 
)
inline

Sets the Collection values associated to this key, making copies of those in refs.

Definition at line 222 of file MultiAssociation.h.

References edm::MultiAssociation< C >::FastFiller::setValues().

Referenced by edm::MultiAssociation< C >::LazyFiller::fill(), and edm::MultiAssociation< C >::FastFiller::setValues().

222 { setValues(k.id(), k.key(), refs); }
int k[5][pyjets_maxn]
void setValues(const KeyRef &k, const Collection &refs)
Sets the Collection values associated to this key, making copies of those in refs.
template<typename C >
void edm::MultiAssociation< C >::FastFiller::setValues ( const edm::ProductID id,
unsigned int  key,
const Collection refs 
)

Sets the Collection values associated to this key, making copies of those in refs.

Definition at line 323 of file MultiAssociation.h.

323  {
324  indexFiller_->insert(id, key, assoc_.data_.size(), vals.size());
325  for (typename Collection::const_iterator it = vals.begin(), ed = vals.end(); it != ed; ++it) {
326  assoc_.data_.push_back(*it);
327  }
328  }
boost::shared_ptr< IndexFiller > indexFiller_
list key
Definition: combine.py:13

Member Data Documentation

template<typename C>
MultiAssociation& edm::MultiAssociation< C >::FastFiller::assoc_
private

Definition at line 227 of file MultiAssociation.h.

template<typename C>
boost::shared_ptr<IndexFiller> edm::MultiAssociation< C >::FastFiller::indexFiller_
private

Definition at line 229 of file MultiAssociation.h.