#include <MultiAssociation.h>
Public Member Functions | |
void | fill () noexcept(false) |
template<typename HandleType > | |
LazyFiller (MultiAssociation &assoc, const HandleType &handle, bool fillOnExit=false) | |
void | setFillOnExit (bool fillOnExit) |
If set to true, the LazyFiller wil call 'fill()' when it goes out of scope. 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... | |
template<typename KeyRef > | |
void | swapValues (const KeyRef &k, Collection &refs) |
~LazyFiller () noexcept(false) | |
Private Types | |
typedef std::map< unsigned int, Collection > | TempValues |
Private Attributes | |
MultiAssociation & | assoc_ |
bool | fillOnExit_ |
ProductID | id_ |
unsigned int | size_ |
std::shared_ptr< TempValues > | tempValues_ |
LazyFiller for the MultiAssociation. It is slower than FastFiller, as it keeps a copy of the input before filling it (unless you use swapValues) Anyway it has no constraints on the order of the keys, or the number of fillers It can also be copied around by value without cloning its keys (e.g to put it into a std::vector) If you set fillOnExit to 'true', it will fill the MultiAssociation automatically when going out of scope
Definition at line 247 of file MultiAssociation.h.
|
private |
Definition at line 280 of file MultiAssociation.h.
|
inline |
Definition at line 250 of file MultiAssociation.h.
|
inlinenoexcept |
Definition at line 256 of file MultiAssociation.h.
References edm::MultiAssociation< C >::LazyFiller::fill(), and edm::MultiAssociation< C >::LazyFiller::fillOnExit_.
|
noexcept |
Does the real filling. Until this is called, the map is not modified at all. Calling this twice won't have any effect (but you can't modify a LazyFiller after calling 'fill()') Implementation note: inside, it just makes a FastFiller and uses it.
Definition at line 359 of file MultiAssociation.h.
References trigObjTnPSource_cfi::filler.
Referenced by edm::MultiAssociation< C >::LazyFiller::~LazyFiller().
|
inline |
If set to true, the LazyFiller wil call 'fill()' when it goes out of scope.
Definition at line 268 of file MultiAssociation.h.
References edm::MultiAssociation< C >::LazyFiller::fillOnExit_.
void edm::MultiAssociation< C >::LazyFiller::setValues | ( | const KeyRef & | k, |
const Collection & | refs | ||
) |
Sets the Collection values associated to this key, making copies of those in refs.
Definition at line 344 of file MultiAssociation.h.
References dqmdumpme::k, and edm::helper::IndexRangeAssociation::throwUnexpectedProductID().
void edm::MultiAssociation< C >::LazyFiller::swapValues | ( | const KeyRef & | k, |
Collection & | refs | ||
) |
Swaps the Collection values associated to this key with the ones in 'ref' This is expected to be faster than 'setValues'.
Definition at line 352 of file MultiAssociation.h.
References dqmdumpme::k, and edm::helper::IndexRangeAssociation::throwUnexpectedProductID().
|
private |
Definition at line 281 of file MultiAssociation.h.
|
private |
Definition at line 285 of file MultiAssociation.h.
Referenced by edm::MultiAssociation< C >::LazyFiller::setFillOnExit(), and edm::MultiAssociation< C >::LazyFiller::~LazyFiller().
|
private |
Definition at line 282 of file MultiAssociation.h.
|
private |
Definition at line 283 of file MultiAssociation.h.
|
private |
Definition at line 284 of file MultiAssociation.h.