CMS 3D CMS Logo

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)
 
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...
 
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...
 
 ~FastFiller ()
 

Private Types

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

Private Attributes

MultiAssociationassoc_
 
std::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 207 of file MultiAssociation.h.

Member Typedef Documentation

◆ IndexFiller

Definition at line 229 of file MultiAssociation.h.

Constructor & Destructor Documentation

◆ FastFiller() [1/2]

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

Definition at line 210 of file MultiAssociation.h.

211  : assoc_(assoc), indexFiller_(new IndexFiller(assoc_.indices_, handle.id(), handle->size())) {}

◆ FastFiller() [2/2]

template<typename C>
edm::MultiAssociation< C >::FastFiller::FastFiller ( MultiAssociation assoc,
edm::ProductID  id,
unsigned int  size 
)
inline

Definition at line 213 of file MultiAssociation.h.

◆ ~FastFiller()

template<typename C>
edm::MultiAssociation< C >::FastFiller::~FastFiller ( )
inline

Definition at line 216 of file MultiAssociation.h.

216 {}

Member Function Documentation

◆ setValues() [1/2]

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 333 of file MultiAssociation.h.

333  {
334  indexFiller_->insert(id, key, assoc_.data_.size(), vals.size());
335  for (typename Collection::const_iterator it = vals.begin(), ed = vals.end(); it != ed; ++it) {
336  assoc_.data_.push_back(*it);
337  }
338  }

References crabWrapper::key.

◆ setValues() [2/2]

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 220 of file MultiAssociation.h.

220  {
221  setValues(k.id(), k.key(), refs);
222  }

References dqmdumpme::k.

Member Data Documentation

◆ assoc_

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

Definition at line 228 of file MultiAssociation.h.

◆ indexFiller_

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

Definition at line 230 of file MultiAssociation.h.

patZpeak.handle
handle
Definition: patZpeak.py:23
trackingPlots.assoc
assoc
Definition: trackingPlots.py:183
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::MultiAssociation::size
unsigned int size() const
Returns the number of keys.
Definition: MultiAssociation.h:198
edm::MultiAssociation::FastFiller::assoc_
MultiAssociation & assoc_
Definition: MultiAssociation.h:228
edm::MultiAssociation::indices_
Indices indices_
Definition: MultiAssociation.h:297
edm::MultiAssociation::FastFiller::setValues
void setValues(const KeyRef &k, const Collection &refs)
Sets the Collection values associated to this key, making copies of those in refs.
Definition: MultiAssociation.h:220
edm::MultiAssociation::FastFiller::IndexFiller
edm::helper::IndexRangeAssociation::FastFiller IndexFiller
Definition: MultiAssociation.h:229
edm::MultiAssociation::FastFiller::indexFiller_
std::shared_ptr< IndexFiller > indexFiller_
Definition: MultiAssociation.h:230
edm::MultiAssociation::data_
Collection data_
Definition: MultiAssociation.h:298
crabWrapper.key
key
Definition: crabWrapper.py:19