#include <MultiAssociation.h>
Classes | |
class | FastFiller |
class | LazyFiller |
Public Types | |
typedef C | Collection |
typedef boost::sub_range < const Collection > | const_range |
typedef boost::sub_range < Collection > | range |
Public Member Functions | |
bool | contains (const edm::ProductID &id) const |
True if there are keys from this product id. | |
unsigned int | dataSize () const |
Returns the number of values. | |
bool | empty () const |
Returns true if there are no keys. | |
template<typename HandleType > | |
FastFiller | fastFiller (const HandleType &handle) |
const_range | get (const edm::ProductID &id, unsigned int t) const |
Get a range of values for this product id and index (fast) | |
range | get (const edm::ProductID &id, unsigned int t) |
Get a range of values for this product id and index (fast) | |
Collection | getValues (const edm::ProductID &id, unsigned int t) const |
Get a copy of the values for this product id and index (slow!) | |
template<typename RefKey > | |
Collection | getValues (const RefKey &r) const |
Get a copy of the values for this key (slow!) | |
template<typename HandleType > | |
LazyFiller | lazyFiller (const HandleType &h, bool fillOnExit=false) |
MultiAssociation () | |
template<typename RefKey > | |
const_range | operator[] (const RefKey &r) const |
Get a range of values for this key (fast) | |
template<typename RefKey > | |
range | operator[] (const RefKey &r) |
Get a range of values for this key (fast) | |
unsigned int | size () const |
Returns the number of keys. | |
void | swap (MultiAssociation &other) |
Private Types | |
typedef helper::IndexRangeAssociation | Indices |
Private Attributes | |
Collection | data_ |
Indices | indices_ |
Friends | |
class | FastFiller |
class | LazyFiller |
Definition at line 152 of file MultiAssociation.h.
typedef C edm::MultiAssociation< C >::Collection |
Definition at line 154 of file MultiAssociation.h.
typedef boost::sub_range<const Collection> edm::MultiAssociation< C >::const_range |
Definition at line 155 of file MultiAssociation.h.
typedef helper::IndexRangeAssociation edm::MultiAssociation< C >::Indices [private] |
Definition at line 284 of file MultiAssociation.h.
typedef boost::sub_range<Collection> edm::MultiAssociation< C >::range |
Definition at line 156 of file MultiAssociation.h.
edm::MultiAssociation< C >::MultiAssociation | ( | ) | [inline] |
Definition at line 158 of file MultiAssociation.h.
{}
bool edm::MultiAssociation< C >::contains | ( | const edm::ProductID & | id | ) | const [inline] |
True if there are keys from this product id.
Definition at line 179 of file MultiAssociation.h.
References edm::helper::IndexRangeAssociation::contains(), and edm::MultiAssociation< C >::indices_.
unsigned int edm::MultiAssociation< C >::dataSize | ( | ) | const [inline] |
Returns the number of values.
Definition at line 196 of file MultiAssociation.h.
References edm::MultiAssociation< C >::data_.
{ return data_.size(); }
bool edm::MultiAssociation< C >::empty | ( | ) | const [inline] |
Returns true if there are no keys.
Definition at line 202 of file MultiAssociation.h.
References edm::helper::IndexRangeAssociation::empty(), and edm::MultiAssociation< C >::indices_.
FastFiller edm::MultiAssociation< C >::fastFiller | ( | const HandleType & | handle | ) | [inline] |
Definition at line 234 of file MultiAssociation.h.
References edm::MultiAssociation< C >::FastFiller.
{ return FastFiller(*this, handle); }
MultiAssociation< C >::const_range edm::MultiAssociation< C >::get | ( | const edm::ProductID & | id, |
unsigned int | t | ||
) | const |
Get a range of values for this product id and index (fast)
Definition at line 297 of file MultiAssociation.h.
References edm::MultiAssociation< C >::data_, edm::helper::IndexRangeAssociation::get(), and edm::MultiAssociation< C >::indices_.
{ Indices::range idxrange = indices_.get(id,key); return const_range(data_.begin()+idxrange.first, data_.begin()+idxrange.second); }
MultiAssociation< C >::range edm::MultiAssociation< C >::get | ( | const edm::ProductID & | id, |
unsigned int | t | ||
) |
Get a range of values for this product id and index (fast)
Definition at line 304 of file MultiAssociation.h.
References edm::MultiAssociation< C >::data_, edm::helper::IndexRangeAssociation::get(), and edm::MultiAssociation< C >::indices_.
Collection edm::MultiAssociation< C >::getValues | ( | const RefKey & | r | ) | const [inline] |
Get a copy of the values for this key (slow!)
Definition at line 174 of file MultiAssociation.h.
MultiAssociation< C >::Collection edm::MultiAssociation< C >::getValues | ( | const edm::ProductID & | id, |
unsigned int | t | ||
) | const |
Get a copy of the values for this product id and index (slow!)
Definition at line 312 of file MultiAssociation.h.
References combine::key, runTheMatrix::ret, and makeHLTPrescaleTable::values.
{ Collection ret; const_range values = get(id,key); for (typename const_range::const_iterator it = values.begin(), ed = values.end(); it != ed; ++it) { ret.push_back(*it); } return ret; }
LazyFiller edm::MultiAssociation< C >::lazyFiller | ( | const HandleType & | h, |
bool | fillOnExit = false |
||
) | [inline] |
Definition at line 278 of file MultiAssociation.h.
References edm::MultiAssociation< C >::LazyFiller.
{ return LazyFiller(*this, h, fillOnExit); }
const_range edm::MultiAssociation< C >::operator[] | ( | const RefKey & | r | ) | const [inline] |
Get a range of values for this key (fast)
Definition at line 162 of file MultiAssociation.h.
range edm::MultiAssociation< C >::operator[] | ( | const RefKey & | r | ) | [inline] |
Get a range of values for this key (fast)
Definition at line 168 of file MultiAssociation.h.
unsigned int edm::MultiAssociation< C >::size | ( | void | ) | const [inline] |
Returns the number of keys.
Definition at line 199 of file MultiAssociation.h.
References edm::MultiAssociation< C >::indices_, and edm::helper::IndexRangeAssociation::size().
void edm::MultiAssociation< C >::swap | ( | MultiAssociation< C > & | other | ) | [inline] |
Definition at line 190 of file MultiAssociation.h.
References edm::MultiAssociation< C >::data_, edm::MultiAssociation< C >::indices_, and edm::helper::IndexRangeAssociation::swap().
friend class FastFiller [friend] |
Definition at line 231 of file MultiAssociation.h.
Referenced by edm::MultiAssociation< C >::fastFiller().
friend class LazyFiller [friend] |
Definition at line 275 of file MultiAssociation.h.
Referenced by edm::MultiAssociation< C >::lazyFiller().
Collection edm::MultiAssociation< C >::data_ [private] |
Definition at line 286 of file MultiAssociation.h.
Referenced by edm::MultiAssociation< C >::dataSize(), edm::MultiAssociation< C >::get(), edm::MultiAssociation< C >::FastFiller::setValues(), and edm::MultiAssociation< C >::swap().
Indices edm::MultiAssociation< C >::indices_ [private] |
Definition at line 285 of file MultiAssociation.h.
Referenced by edm::MultiAssociation< C >::contains(), edm::MultiAssociation< C >::empty(), edm::MultiAssociation< C >::get(), edm::MultiAssociation< C >::size(), and edm::MultiAssociation< C >::swap().