CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Attributes
MuonDigiCollection< IndexType, DigiType > Class Template Reference

A container for a generic type of digis indexed by some index, implemented with a map<IndexType, vector<DigiType> > More...

#include "/MuonDigiCollection.h"

Public Types

typedef std::vector< DigiType >::const_iterator const_iterator
 
typedef DigiContainerIterator< IndexType, DigiType > DigiRangeIterator
 
typedef std::pair< const_iterator, const_iteratorRange
 

Public Member Functions

DigiRangeIterator begin () const
 
DigiRangeIterator end () const
 
Range get (const IndexType &index) const
 return the digis for a given DetUnit More...
 
void insertDigi (const IndexType &index, const DigiType &digi)
 insert a digi for a given DetUnit More...
 
template<typename IRange >
void move (IRange range, const IndexType &index)
 insert a range of digis for a given DetUnit More...
 
 MuonDigiCollection ()
 
void put (Range range, const IndexType &index)
 insert a range of digis for a given DetUnit More...
 
void swap (MuonDigiCollection &rh)
 

Private Types

typedef std::map< IndexType, std::vector< DigiType > > container
 

Private Attributes

container data_
 

Detailed Description

template<typename IndexType, typename DigiType>
class MuonDigiCollection< IndexType, DigiType >

A container for a generic type of digis indexed by some index, implemented with a map<IndexType, vector<DigiType> >

Example:

Note
: Requirements
  • IndexType must provide operator <
Author
Stefano ARGIRO
Date
05 Aug 2005

Definition at line 87 of file MuonDigiCollection.h.

Member Typedef Documentation

◆ const_iterator

template<typename IndexType, typename DigiType>
typedef std::vector<DigiType>::const_iterator MuonDigiCollection< IndexType, DigiType >::const_iterator

Definition at line 94 of file MuonDigiCollection.h.

◆ container

template<typename IndexType, typename DigiType>
typedef std::map<IndexType, std::vector<DigiType> > MuonDigiCollection< IndexType, DigiType >::container
private

Definition at line 139 of file MuonDigiCollection.h.

◆ DigiRangeIterator

template<typename IndexType, typename DigiType>
typedef DigiContainerIterator<IndexType, DigiType> MuonDigiCollection< IndexType, DigiType >::DigiRangeIterator

Definition at line 132 of file MuonDigiCollection.h.

◆ Range

template<typename IndexType, typename DigiType>
typedef std::pair<const_iterator, const_iterator> MuonDigiCollection< IndexType, DigiType >::Range

Definition at line 95 of file MuonDigiCollection.h.

Constructor & Destructor Documentation

◆ MuonDigiCollection()

template<typename IndexType, typename DigiType>
MuonDigiCollection< IndexType, DigiType >::MuonDigiCollection ( )
inline

Definition at line 89 of file MuonDigiCollection.h.

89 {}

Member Function Documentation

◆ begin()

template<typename IndexType, typename DigiType>
DigiRangeIterator MuonDigiCollection< IndexType, DigiType >::begin ( void  ) const
inline

◆ end()

template<typename IndexType, typename DigiType>
DigiRangeIterator MuonDigiCollection< IndexType, DigiType >::end ( void  ) const
inline

◆ get()

template<typename IndexType, typename DigiType>
Range MuonDigiCollection< IndexType, DigiType >::get ( const IndexType &  index) const
inline

◆ insertDigi()

template<typename IndexType, typename DigiType>
void MuonDigiCollection< IndexType, DigiType >::insertDigi ( const IndexType &  index,
const DigiType &  digi 
)
inline

insert a digi for a given DetUnit

Definition at line 98 of file MuonDigiCollection.h.

98  {
99  std::vector<DigiType>& digis = data_[index];
100  digis.push_back(digi);
101  }

Referenced by CSCTriggerPrimitivesBuilder::build(), ME0ReDigiProducer::buildDigis(), and DTDigitizer::storeDigis().

◆ move()

template<typename IndexType, typename DigiType>
template<typename IRange >
void MuonDigiCollection< IndexType, DigiType >::move ( IRange  range,
const IndexType &  index 
)
inline

insert a range of digis for a given DetUnit

Definition at line 113 of file MuonDigiCollection.h.

113  {
114  std::vector<DigiType>& digis = data_[index];
115  digis.reserve(digis.size() + (range.second - range.first));
116  digis.insert(digis.end(), std::make_move_iterator(range.first), std::make_move_iterator(range.second));
117  }

◆ put()

template<typename IndexType, typename DigiType>
void MuonDigiCollection< IndexType, DigiType >::put ( Range  range,
const IndexType &  index 
)
inline

insert a range of digis for a given DetUnit

Definition at line 104 of file MuonDigiCollection.h.

104  {
105  std::vector<DigiType>& digis = data_[index];
106  digis.reserve(digis.size() + (range.second - range.first));
107  std::copy(range.first, range.second, std::back_inserter(digis));
108  }

◆ swap()

template<typename IndexType, typename DigiType>
void MuonDigiCollection< IndexType, DigiType >::swap ( MuonDigiCollection< IndexType, DigiType > &  rh)
inline

Definition at line 92 of file MuonDigiCollection.h.

92 { std::swap(data_, rh.data_); }

Referenced by swap().

Member Data Documentation

◆ data_

template<typename IndexType, typename DigiType>
container MuonDigiCollection< IndexType, DigiType >::data_
private
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
MuonDigiCollection::data_
container data_
Definition: MuonDigiCollection.h:140
MuonDigiCollection
A container for a generic type of digis indexed by some index, implemented with a map<IndexType,...
Definition: MuonDigiCollection.h:87
std::swap
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
Definition: DataFrameContainer.h:209
DTDigiCollection
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46