1 #ifndef DataFormats_MuonDigiCollection_h
2 #define DataFormats_MuonDigiCollection_h
30 template <
typename IndexType,
typename DigiType>
37 typedef std::pair<IndexType,
55 { ++
base_;
return *
this; }
65 return std::make_pair(
base_->first,
66 std::make_pair(
base_->second.begin(),
67 base_->second.end()));
96 template <
typename IndexType,
106 typedef typename std::pair<const_iterator,const_iterator>
Range;
112 digis.push_back(digi);
118 digis.reserve (digis.size () + (range.second - range.first));
119 std::copy (range.first, range.second, std::back_inserter (digis));
125 typename container::const_iterator it =
data_.find(
index);
126 if (it==
data_.end()) {
128 static const std::vector<DigiType>
empty;
129 return std::make_pair(empty.end(),empty.end());
131 const std::vector<DigiType>& digis = (*it).second;
132 return std::make_pair(digis.begin(),digis.end());
138 return data_.begin();}
146 typedef std::map<IndexType,std::vector<DigiType> >
container;
DigiContainerIterator< IndexType, DigiType > DigiRangeIterator
std::vector< DigiType >::const_iterator DigiRangeIterator
std::map< IndexType, std::vector< DigiType > > BaseContainer
DigiContainerIterator(void)
void insertDigi(const IndexType &index, const DigiType &digi)
insert a digi for a given DetUnit
value_type operator*(void) const
DigiRangeIterator::iterator_category iterator_category
DigiRangeIterator::difference_type difference_type
std::map< IndexType, std::vector< DigiType > > container
bool operator==(const DigiContainerIterator &x)
std::pair< IndexType, std::pair< DigiRangeIterator, DigiRangeIterator > > value_type
std::vector< DigiType >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range
DigiContainerIterator(BaseIterator i)
bool operator!=(const DigiContainerIterator &x)
DigiRangeIterator end() const
BaseContainer::const_iterator BaseIterator
void put(Range range, const IndexType &index)
insert a range of digis for a given DetUnit
DigiContainerIterator & operator++(void)
DigiRangeIterator begin() const
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...