CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
edm::IDVectorMap< ID, C, P > Class Template Reference

#include <IDVectorMap.h>

Classes

struct  const_iterator
 
struct  id_iterator
 
struct  match_iterator
 
struct  range
 

Public Types

typedef C::const_iterator container_iterator
 
typedef std::map< ID, C > map
 
typedef map::const_iterator map_iterator
 
typedef C::value_type value_type
 

Public Member Functions

const_iterator begin () const
 
template<typename M >
match_iterator< M > begin (const M &m) const
 
const_iterator end () const
 
template<typename M >
match_iterator< M > end (const M &m) const
 
range get (ID id) const
 
id_iterator id_begin () const
 
id_iterator id_end () const
 
size_t id_size () const
 
 IDVectorMap ()
 
void insert (ID id, const value_type &t)
 
template<typename CI >
void insert (ID id, CI begin, CI end)
 
IDVectorMapoperator= (IDVectorMap const &rhs)
 
void swap (IDVectorMap &other)
 

Private Attributes

collection_
 
map map_
 

Detailed Description

template<typename ID, typename C, typename P>
class edm::IDVectorMap< ID, C, P >

Definition at line 8 of file IDVectorMap.h.

Member Typedef Documentation

template<typename ID, typename C, typename P>
typedef C::const_iterator edm::IDVectorMap< ID, C, P >::container_iterator

Definition at line 11 of file IDVectorMap.h.

template<typename ID, typename C, typename P>
typedef std::map<ID, C> edm::IDVectorMap< ID, C, P >::map

Definition at line 12 of file IDVectorMap.h.

template<typename ID, typename C, typename P>
typedef map::const_iterator edm::IDVectorMap< ID, C, P >::map_iterator

Definition at line 13 of file IDVectorMap.h.

template<typename ID, typename C, typename P>
typedef C::value_type edm::IDVectorMap< ID, C, P >::value_type

Definition at line 10 of file IDVectorMap.h.

Constructor & Destructor Documentation

template<typename ID, typename C, typename P>
edm::IDVectorMap< ID, C, P >::IDVectorMap ( )
inline

Definition at line 61 of file IDVectorMap.h.

61 { }

Member Function Documentation

template<typename ID, typename C, typename P>
const_iterator edm::IDVectorMap< ID, C, P >::begin ( void  ) const
inline

Definition at line 62 of file IDVectorMap.h.

References edm::IDVectorMap< ID, C, P >::const_iterator::const_iterator(), and edm::IDVectorMap< ID, C, P >::map_.

Referenced by edm::IDVectorMap< ID, C, P >::get().

62  {
63  return const_iterator(map_.end(), map_.begin(), map_.begin()->second.begin());
64  }
template<typename ID, typename C, typename P>
template<typename M >
match_iterator<M> edm::IDVectorMap< ID, C, P >::begin ( const M &  m) const
inline

Definition at line 135 of file IDVectorMap.h.

References funct::m, and edm::IDVectorMap< ID, C, P >::map_.

135  {
136  return match_iterator<M>(m, map_.end(), map_.begin(), map_.begin()->second.begin());
137  }
template<typename ID, typename C, typename P>
const_iterator edm::IDVectorMap< ID, C, P >::end ( void  ) const
inline
template<typename ID, typename C, typename P>
template<typename M >
match_iterator<M> edm::IDVectorMap< ID, C, P >::end ( const M &  m) const
inline

Definition at line 139 of file IDVectorMap.h.

References funct::m, and edm::IDVectorMap< ID, C, P >::map_.

Referenced by Types.LuminosityBlockRange::cppID(), and Types.EventRange::cppID().

139  {
140  return match_iterator<M>(m, map_.end());
141  }
template<typename ID, typename C, typename P>
range edm::IDVectorMap< ID, C, P >::get ( ID  id) const
inline

Definition at line 83 of file IDVectorMap.h.

References edm::IDVectorMap< ID, C, P >::begin(), edm::IDVectorMap< ID, C, P >::end(), mps_fire::i, and edm::IDVectorMap< ID, C, P >::map_.

Referenced by Options.Options::__getitem__(), betterConfigParser.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::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.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().

83  {
85  map_iterator i = map_.find(id);
86  if (i != map_.end()) {
87  begin = i->second.begin();
88  end = i->second.end();
89  } else {
90  begin = end;
91  }
92  return range(begin, end);
93  }
const_iterator begin() const
Definition: IDVectorMap.h:62
const_iterator end() const
Definition: IDVectorMap.h:65
C::const_iterator container_iterator
Definition: IDVectorMap.h:11
map::const_iterator map_iterator
Definition: IDVectorMap.h:13
template<typename ID, typename C, typename P>
id_iterator edm::IDVectorMap< ID, C, P >::id_begin ( ) const
inline

Definition at line 161 of file IDVectorMap.h.

References edm::IDVectorMap< ID, C, P >::map_.

161 { return id_iterator(map_.begin()); }
template<typename ID, typename C, typename P>
id_iterator edm::IDVectorMap< ID, C, P >::id_end ( ) const
inline

Definition at line 162 of file IDVectorMap.h.

References edm::IDVectorMap< ID, C, P >::map_.

162 { return id_iterator(map_.end()); }
template<typename ID, typename C, typename P>
size_t edm::IDVectorMap< ID, C, P >::id_size ( ) const
inline
template<typename ID, typename C, typename P>
void edm::IDVectorMap< ID, C, P >::insert ( ID  id,
const value_type t 
)
inline

Definition at line 68 of file IDVectorMap.h.

References clone(), triggerObjects_cff::id, and edm::IDVectorMap< ID, C, P >::map_.

Referenced by BeautifulSoup.PageElement::append().

68  {
69  map_[ id ].push_back(P::clone(t));
70  }
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
template<typename ID, typename C, typename P>
template<typename CI >
void edm::IDVectorMap< ID, C, P >::insert ( ID  id,
CI  begin,
CI  end 
)
inline

Definition at line 72 of file IDVectorMap.h.

References EnergyCorrector::c, patCaloMETCorrections_cff::C, clone(), edm::IDVectorMap< ID, C, P >::end(), mps_fire::i, triggerObjects_cff::id, and edm::IDVectorMap< ID, C, P >::map_.

Referenced by BeautifulSoup.PageElement::append().

72  {
73  C & c = map_[ id ];
74  for(CI i = begin; i != end; ++i)
75  c.push_back(P::clone(*i));
76  }
const_iterator begin() const
Definition: IDVectorMap.h:62
const_iterator end() const
Definition: IDVectorMap.h:65
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
template<typename ID, typename C, typename P>
IDVectorMap< ID, C, P > & edm::IDVectorMap< ID, C, P >::operator= ( IDVectorMap< ID, C, P > const &  rhs)
inline

Definition at line 182 of file IDVectorMap.h.

References edm::IDVectorMap< ID, C, P >::swap(), and groupFilesInBlocks::temp.

182  {
183  IDVectorMap<ID, C, P> temp(rhs);
184  this->swap(temp);
185  return *this;
186  }
void swap(IDVectorMap &other)
Definition: IDVectorMap.h:174
template<typename ID, typename C, typename P>
void edm::IDVectorMap< ID, C, P >::swap ( IDVectorMap< ID, C, P > &  other)
inline

Member Data Documentation

template<typename ID, typename C, typename P>
C edm::IDVectorMap< ID, C, P >::collection_
private

Definition at line 167 of file IDVectorMap.h.

Referenced by edm::IDVectorMap< ID, C, P >::swap().

template<typename ID, typename C, typename P>
map edm::IDVectorMap< ID, C, P >::map_
private