CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | Friends
edm::MultiAssociation< C > Class Template Reference

#include <MultiAssociation.h>

Classes

class  FastFiller
 
class  LazyFiller
 

Public Types

typedef C Collection
 
typedef boost::sub_range< const Collectionconst_range
 
typedef boost::sub_range< Collectionrange
 

Public Member Functions

bool contains (const edm::ProductID &id) const
 True if there are keys from this product id. More...
 
unsigned int dataSize () const
 Returns the number of values. More...
 
bool empty () const
 Returns true if there are no keys. More...
 
template<typename HandleType >
FastFiller fastFiller (const HandleType &handle)
 
range get (const edm::ProductID &id, unsigned int t)
 Get a range of values for this product id and index (fast) More...
 
const_range get (const edm::ProductID &id, unsigned int t) const
 Get a range of values for this product id and index (fast) More...
 
Collection getValues (const edm::ProductID &id, unsigned int t) const
 Get a copy of the values for this product id and index (slow!) More...
 
template<typename RefKey >
Collection getValues (const RefKey &r) const
 Get a copy of the values for this key (slow!) More...
 
template<typename HandleType >
LazyFiller lazyFiller (const HandleType &h, bool fillOnExit=false)
 
 MultiAssociation ()
 
template<typename RefKey >
range operator[] (const RefKey &r)
 Get a range of values for this key (fast) More...
 
template<typename RefKey >
const_range operator[] (const RefKey &r) const
 Get a range of values for this key (fast) More...
 
unsigned int size () const
 Returns the number of keys. More...
 
void swap (MultiAssociation &other)
 

Static Public Member Functions

static short Class_Version ()
 

Private Types

typedef helper::IndexRangeAssociation Indices
 

Private Attributes

Collection data_
 
Indices indices_
 

Friends

class FastFiller
 
class LazyFiller
 

Detailed Description

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

Definition at line 151 of file MultiAssociation.h.

Member Typedef Documentation

◆ Collection

template<typename C>
typedef C edm::MultiAssociation< C >::Collection

Definition at line 153 of file MultiAssociation.h.

◆ const_range

template<typename C>
typedef boost::sub_range<const Collection> edm::MultiAssociation< C >::const_range

Definition at line 154 of file MultiAssociation.h.

◆ Indices

template<typename C>
typedef helper::IndexRangeAssociation edm::MultiAssociation< C >::Indices
private

Definition at line 296 of file MultiAssociation.h.

◆ range

template<typename C>
typedef boost::sub_range<Collection> edm::MultiAssociation< C >::range

Definition at line 155 of file MultiAssociation.h.

Constructor & Destructor Documentation

◆ MultiAssociation()

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

Definition at line 157 of file MultiAssociation.h.

157 {}

Member Function Documentation

◆ Class_Version()

template<typename C>
static short edm::MultiAssociation< C >::Class_Version ( )
inlinestatic

Definition at line 293 of file MultiAssociation.h.

295 :
296  typedef helper::IndexRangeAssociation Indices;

◆ contains()

template<typename C>
bool edm::MultiAssociation< C >::contains ( const edm::ProductID id) const
inline

True if there are keys from this product id.

Definition at line 178 of file MultiAssociation.h.

178 { return indices_.contains(id); }

References edm::helper::IndexRangeAssociation::contains(), and edm::MultiAssociation< C >::indices_.

Referenced by LumiList.LumiList::__contains__().

◆ dataSize()

template<typename C>
unsigned int edm::MultiAssociation< C >::dataSize ( ) const
inline

Returns the number of values.

Definition at line 195 of file MultiAssociation.h.

195 { return data_.size(); }

References edm::MultiAssociation< C >::data_.

◆ empty()

template<typename C>
bool edm::MultiAssociation< C >::empty ( ) const
inline

Returns true if there are no keys.

Definition at line 201 of file MultiAssociation.h.

201 { return indices_.empty(); }

References edm::helper::IndexRangeAssociation::empty(), and edm::MultiAssociation< C >::indices_.

◆ fastFiller()

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

Definition at line 236 of file MultiAssociation.h.

236  {
237  return FastFiller(*this, handle);
238  }

References edm::MultiAssociation< C >::FastFiller, and patZpeak::handle.

◆ get() [1/2]

template<typename C >
MultiAssociation< C >::range edm::MultiAssociation< C >::get ( const edm::ProductID id,
unsigned int  t 
)

◆ get() [2/2]

template<typename C >
MultiAssociation< C >::const_range edm::MultiAssociation< C >::get ( const edm::ProductID id,
unsigned int  t 
) const

◆ getValues() [1/2]

template<typename C >
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 322 of file MultiAssociation.h.

323  {
324  Collection ret;
325  const_range values = get(id, key);
326  for (typename const_range::const_iterator it = values.begin(), ed = values.end(); it != ed; ++it) {
327  ret.push_back(*it);
328  }
329  return ret;
330  }

References edm::MultiAssociation< C >::get(), crabWrapper::key, runTheMatrix::ret, and contentValuesCheck::values.

◆ getValues() [2/2]

template<typename C>
template<typename RefKey >
Collection edm::MultiAssociation< C >::getValues ( const RefKey &  r) const
inline

Get a copy of the values for this key (slow!)

Definition at line 173 of file MultiAssociation.h.

173  {
174  return getValues(r.id(), r.key());
175  }

References alignCSCRings::r.

◆ lazyFiller()

template<typename C>
template<typename HandleType >
LazyFiller edm::MultiAssociation< C >::lazyFiller ( const HandleType &  h,
bool  fillOnExit = false 
)
inline

Definition at line 288 of file MultiAssociation.h.

288  {
289  return LazyFiller(*this, h, fillOnExit);
290  }

References edm::MultiAssociation< C >::LazyFiller.

◆ operator[]() [1/2]

template<typename C>
template<typename RefKey >
range edm::MultiAssociation< C >::operator[] ( const RefKey &  r)
inline

Get a range of values for this key (fast)

Definition at line 167 of file MultiAssociation.h.

167  {
168  return get(r.id(), r.key());
169  }

References edm::MultiAssociation< C >::get(), and alignCSCRings::r.

◆ operator[]() [2/2]

template<typename C>
template<typename RefKey >
const_range edm::MultiAssociation< C >::operator[] ( const RefKey &  r) const
inline

Get a range of values for this key (fast)

Definition at line 161 of file MultiAssociation.h.

161  {
162  return get(r.id(), r.key());
163  }

References edm::MultiAssociation< C >::get(), and alignCSCRings::r.

◆ size()

template<typename C>
unsigned int edm::MultiAssociation< C >::size ( void  ) const
inline

◆ swap()

template<typename C>
void edm::MultiAssociation< C >::swap ( MultiAssociation< C > &  other)
inline

Friends And Related Function Documentation

◆ FastFiller

template<typename C>
friend class FastFiller
friend

Definition at line 233 of file MultiAssociation.h.

Referenced by edm::MultiAssociation< C >::fastFiller().

◆ LazyFiller

template<typename C>
friend class LazyFiller
friend

Definition at line 285 of file MultiAssociation.h.

Referenced by edm::MultiAssociation< C >::lazyFiller().

Member Data Documentation

◆ data_

template<typename C>
Collection edm::MultiAssociation< C >::data_
private

◆ indices_

template<typename C>
Indices edm::MultiAssociation< C >::indices_
private
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:355
edm::helper::IndexRangeAssociation::range
std::pair< unsigned int, unsigned int > range
Definition: MultiAssociation.h:74
edm::MultiAssociation::FastFiller
friend class FastFiller
Definition: MultiAssociation.h:233
edm::MultiAssociation::getValues
Collection getValues(const RefKey &r) const
Get a copy of the values for this key (slow!)
Definition: MultiAssociation.h:173
patZpeak.handle
handle
Definition: patZpeak.py:23
edm::helper::IndexRangeAssociation::swap
void swap(IndexRangeAssociation &other)
Definition: MultiAssociation.cc:35
edm::MultiAssociation::range
boost::sub_range< Collection > range
Definition: MultiAssociation.h:155
edm::helper::IndexRangeAssociation::empty
bool empty() const
True if it's empty (no keys)
Definition: MultiAssociation.h:96
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
edm::MultiAssociation::Collection
C Collection
Definition: MultiAssociation.h:153
trackingPlots.other
other
Definition: trackingPlots.py:1465
edm::helper::IndexRangeAssociation::size
unsigned int size() const
Size of this collection (number of keys)
Definition: MultiAssociation.h:93
h
edm::MultiAssociation::Indices
helper::IndexRangeAssociation Indices
Definition: MultiAssociation.h:296
alignCSCRings.r
r
Definition: alignCSCRings.py:93
edm::MultiAssociation::indices_
Indices indices_
Definition: MultiAssociation.h:297
edm::MultiAssociation::data_
Collection data_
Definition: MultiAssociation.h:298
edm::MultiAssociation::LazyFiller
friend class LazyFiller
Definition: MultiAssociation.h:285
edm::MultiAssociation::get
const_range get(const edm::ProductID &id, unsigned int t) const
Get a range of values for this product id and index (fast)
Definition: MultiAssociation.h:310
crabWrapper.key
key
Definition: crabWrapper.py:19
edm::helper::IndexRangeAssociation::contains
bool contains(ProductID id) const
True if this IndexRangeAssociation has info for this product id.
Definition: MultiAssociation.cc:29
edm::MultiAssociation::const_range
boost::sub_range< const Collection > const_range
Definition: MultiAssociation.h:154
edm::helper::IndexRangeAssociation::get
range get(const edm::ProductID &id, unsigned int t) const
Definition: MultiAssociation.cc:9