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

Member Typedef Documentation

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

Definition at line 154 of file MultiAssociation.h.

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

Definition at line 155 of file MultiAssociation.h.

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

Definition at line 284 of file MultiAssociation.h.

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

Definition at line 156 of file MultiAssociation.h.

Constructor & Destructor Documentation

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

Definition at line 158 of file MultiAssociation.h.

158 {}

Member Function Documentation

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

Definition at line 281 of file MultiAssociation.h.

283 :
284  typedef helper::IndexRangeAssociation Indices;
helper::IndexRangeAssociation Indices
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 179 of file MultiAssociation.h.

References hcalTTPDigis_cfi::id, and lumiQTWidget::t.

Referenced by LumiList.LumiList::__contains__().

179 { return indices_.contains(id); }
bool contains(ProductID id) const
True if this IndexRangeAssociation has info for this product id.
template<typename C>
unsigned int edm::MultiAssociation< C >::dataSize ( ) const
inline

Returns the number of values.

Definition at line 196 of file MultiAssociation.h.

196 { return data_.size(); }
template<typename C>
bool edm::MultiAssociation< C >::empty ( ) const
inline

Returns true if there are no keys.

Definition at line 202 of file MultiAssociation.h.

Referenced by Vispa.Gui.VispaWidget.TextField::setAutosizeFont(), and Vispa.Gui.VispaWidget.TextField::setAutotruncate().

202 { return indices_.empty(); }
bool empty() const
True if it&#39;s empty (no keys)
template<typename C>
template<typename HandleType >
FastFiller edm::MultiAssociation< C >::fastFiller ( const HandleType &  handle)
inline

Definition at line 234 of file MultiAssociation.h.

References edm::helper::IndexRangeAssociation::FastFiller::FastFiller().

234 { return FastFiller(*this, handle); }
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 297 of file MultiAssociation.h.

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

297  {
298  Indices::range idxrange = indices_.get(id,key);
299  return const_range(data_.begin()+idxrange.first, data_.begin()+idxrange.second);
300  }
boost::sub_range< const Collection > const_range
std::pair< unsigned int, unsigned int > range
range get(const edm::ProductID &id, unsigned int t) const
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 304 of file MultiAssociation.h.

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

304  {
305  Indices::range idxrange = indices_.get(id,key);
306  return range(data_.begin()+idxrange.first, data_.begin()+idxrange.second);
307  }
boost::sub_range< Collection > range
std::pair< unsigned int, unsigned int > range
range get(const edm::ProductID &id, unsigned int t) const
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 174 of file MultiAssociation.h.

174  {
175  return getValues(r.id(), r.key());
176  }
Collection getValues(const RefKey &r) const
Get a copy of the values for this key (slow!)
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 312 of file MultiAssociation.h.

References hcalTTPDigis_cfi::id, crabWrapper::key, and MuonErrorMatrixValues_cff::values.

312  {
313  Collection ret;
314  const_range values = get(id,key);
315  for (typename const_range::const_iterator it = values.begin(), ed = values.end(); it != ed; ++it) {
316  ret.push_back(*it);
317  }
318  return ret;
319  }
boost::sub_range< const Collection > const_range
template<typename C>
template<typename HandleType >
LazyFiller edm::MultiAssociation< C >::lazyFiller ( const HandleType &  h,
bool  fillOnExit = false 
)
inline

Definition at line 278 of file MultiAssociation.h.

278 { return LazyFiller(*this, h, fillOnExit); }
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 162 of file MultiAssociation.h.

162  {
163  return get(r.id(), r.key());
164  }
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 168 of file MultiAssociation.h.

168  {
169  return get(r.id(), r.key());
170  }
template<typename C>
unsigned int edm::MultiAssociation< C >::size ( void  ) const
inline

Returns the number of keys.

Definition at line 199 of file MultiAssociation.h.

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

199 { return indices_.size(); }
unsigned int size() const
Size of this collection (number of keys)
template<typename C>
void edm::MultiAssociation< C >::swap ( MultiAssociation< C > &  other)
inline

Definition at line 190 of file MultiAssociation.h.

References edm::MultiAssociation< C >::data_, and edm::MultiAssociation< C >::indices_.

190  {
191  indices_.swap(other.indices_);
192  data_.swap(other.data_);
193  }
void swap(IndexRangeAssociation &other)

Friends And Related Function Documentation

template<typename C>
friend class FastFiller
friend

Definition at line 231 of file MultiAssociation.h.

template<typename C>
friend class LazyFiller
friend

Definition at line 275 of file MultiAssociation.h.

Member Data Documentation

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

Definition at line 286 of file MultiAssociation.h.

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

template<typename C>
Indices edm::MultiAssociation< C >::indices_
private

Definition at line 285 of file MultiAssociation.h.

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