1 #ifndef DataFormats_Common_AssociativeIterator_h 2 #define DataFormats_Common_AssociativeIterator_h 46 template <
class T>
class View;
50 template <
class T>
class Ptr;
51 template <
class C,
class T,
class F>
class Ref;
60 template<
typename RefFrom,
typename RefTo>
62 static RefTo
convert(
const RefFrom &ref) {
return RefTo(ref); }
68 template<
typename T,
typename C,
typename V,
typename F>
76 template<
typename RefType>
87 iEvent_.get(id_, view_);
89 BaseRefType ref = view_->refAt(
idx);
102 template<
typename AC>
113 template<
typename KeyRefType,
typename AssociativeCollection,
127 self_type & operator++() ;
128 self_type & operator--() ;
129 self_type & nextProductID() ;
132 const value_type &
operator*()
const {
return *(this->
get()); }
133 const value_type *
operator->()
const {
return (this->
get()); }
134 const value_type *
get()
const { chkPair();
return & pair_; }
136 const key_type &
key()
const { chkPair();
return pair_.first; }
137 const val_type &
val()
const {
return map_.get(idx_); }
140 operator bool()
const {
return idx_ <
map_.size(); }
141 self_type
end()
const ;
150 const AssociativeCollection &
map_;
151 id_offset_iterator
ioi_, ioi2_;
159 void chkPair()
const ;
163 template<
typename KeyRefType,
typename AC,
typename IG>
171 template<
typename KeyRefType,
typename AC,
typename IG>
183 template<
typename KeyRefType,
typename AC,
typename IG>
194 template<
typename KeyRefType,
typename AC,
typename IG>
213 template<
typename KeyRefType,
typename AC,
typename IG>
222 template<
typename KeyRefType,
typename AC,
typename IG>
value_type const * get() const
AssociativeIterator(const AssociativeCollection &map, const ItemGetter &getter)
Create the associative iterator, pointing at the beginning of the collection.
KeyRefType::value_type key_val_type
Association< C >::reference_type type
AssociativeCollection::id_offset_vector id_offset_vector
static HepMC::IO_HEPEVT conv
const val_type & val() const
Handle< View< element_type > > view_
AssociativeIterator< KeyRefType, AssociativeCollection, ItemGetter > self_type
reco::GenParticleCollection::const_iterator IG
const edm::Event & iEvent_
self_type & nextProductID()
static RefTo convert(const RefFrom &ref)
Container::value_type value_type
EdmEventItemGetter(const edm::Event &iEvent)
const value_type & operator*() const
Helper class that fetches some type of Ref given ProductID and index, using the edm::Event.
def convert(infile, ofile)
bool operator<(const self_type &other) const
RefType::value_type element_type
const value_type * operator->() const
id_offset_vector::const_iterator id_offset_iterator
std::pair< key_type, val_type > value_type
static Ptr< T > convert(const RefToBase< T > &ref)
const AssociativeCollection & map_
helper::AssociativeCollectionValueType< AssociativeCollection >::type val_type
bool operator!=(const self_type &other) const
bool operator==(const self_type &other) const
static Ref< C, V, F > convert(const RefToBase< T > &ref)
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
const ProductID & id() const
const key_type & key() const