CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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)
 
const_range get (const edm::ProductID &id, unsigned int t) const
 Get a range of values for this product id and index (fast) More...
 
range get (const edm::ProductID &id, unsigned int t)
 Get a range of values for this product id and index (fast) More...
 
template<typename RefKey >
Collection getValues (const RefKey &r) const
 Get a copy of the values for this key (slow!) 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 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) More...
 
template<typename RefKey >
range operator[] (const RefKey &r)
 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 153 of file MultiAssociation.h.

Member Typedef Documentation

◆ Collection

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

Definition at line 155 of file MultiAssociation.h.

◆ const_range

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

Definition at line 156 of file MultiAssociation.h.

◆ Indices

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

Definition at line 298 of file MultiAssociation.h.

◆ range

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

Definition at line 157 of file MultiAssociation.h.

Constructor & Destructor Documentation

◆ MultiAssociation()

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

Definition at line 159 of file MultiAssociation.h.

159 {}

Member Function Documentation

◆ Class_Version()

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

Definition at line 295 of file MultiAssociation.h.

297 :
298  typedef helper::IndexRangeAssociation Indices;
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 180 of file MultiAssociation.h.

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

Referenced by LumiList.LumiList::__contains__().

180 { return indices_.contains(id); }
bool contains(ProductID id) const
True if this IndexRangeAssociation has info for this product id.

◆ dataSize()

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

Returns the number of values.

Definition at line 197 of file MultiAssociation.h.

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

197 { return data_.size(); }

◆ empty()

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

Returns true if there are no keys.

Definition at line 203 of file MultiAssociation.h.

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

203 { return indices_.empty(); }
bool empty() const
True if it&#39;s empty (no keys)

◆ fastFiller()

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

Definition at line 238 of file MultiAssociation.h.

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

238  {
239  return FastFiller(*this, handle);
240  }

◆ get() [1/2]

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

References edm::MultiAssociation< C >::data_, edm::helper::IndexRangeAssociation::get(), edm::MultiAssociation< C >::indices_, and crabWrapper::key.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

312  {
313  Indices::range idxrange = indices_.get(id, key);
314  return const_range(data_.begin() + idxrange.first, data_.begin() + idxrange.second);
315  }
boost::sub_range< const Collection > const_range
range get(const edm::ProductID &id, unsigned int t) const
std::pair< unsigned int, unsigned int > range

◆ get() [2/2]

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

References edm::MultiAssociation< C >::data_, edm::helper::IndexRangeAssociation::get(), edm::MultiAssociation< C >::indices_, and crabWrapper::key.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

318  {
319  Indices::range idxrange = indices_.get(id, key);
320  return range(data_.begin() + idxrange.first, data_.begin() + idxrange.second);
321  }
boost::sub_range< Collection > range
range get(const edm::ProductID &id, unsigned int t) const
std::pair< unsigned int, unsigned int > range

◆ getValues() [1/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 175 of file MultiAssociation.h.

References alignCSCRings::r.

175  {
176  return getValues(r.id(), r.key());
177  }
Collection getValues(const RefKey &r) const
Get a copy of the values for this key (slow!)

◆ getValues() [2/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 324 of file MultiAssociation.h.

References triggerObjects_cff::id, crabWrapper::key, runTheMatrix::ret, and contentValuesCheck::values.

325  {
326  Collection ret;
327  const_range values = get(id, key);
328  for (typename const_range::const_iterator it = values.begin(), ed = values.end(); it != ed; ++it) {
329  ret.push_back(*it);
330  }
331  return ret;
332  }
boost::sub_range< const Collection > const_range
ret
prodAgent to be discontinued

◆ lazyFiller()

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

Definition at line 290 of file MultiAssociation.h.

References h, and edm::MultiAssociation< C >::LazyFiller.

290  {
291  return LazyFiller(*this, h, fillOnExit);
292  }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ operator[]() [1/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 163 of file MultiAssociation.h.

References alignCSCRings::r.

163  {
164  return get(r.id(), r.key());
165  }

◆ operator[]() [2/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 169 of file MultiAssociation.h.

References alignCSCRings::r.

169  {
170  return get(r.id(), r.key());
171  }

◆ size()

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

Returns the number of keys.

Definition at line 200 of file MultiAssociation.h.

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

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

200 { return indices_.size(); }
unsigned int size() const
Size of this collection (number of keys)

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

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

◆ LazyFiller

template<typename C>
friend class LazyFiller
friend

Definition at line 287 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