1 #ifndef DataFormats_Common_AssociativeIterator_h 2 #define DataFormats_Common_AssociativeIterator_h 47 template <
class T>
class View;
51 template <
class T>
class Ptr;
52 template <
class C,
class T,
class F>
class Ref;
61 template<
typename RefFrom,
typename RefTo>
63 static RefTo
convert(
const RefFrom &ref) {
return RefTo(ref); }
69 template<
typename T,
typename C,
typename V,
typename F>
77 template<
typename RefType>
88 iEvent_.get(id_, view_);
90 BaseRefType ref = view_->refAt(
idx);
103 template<
typename AC>
114 template<
typename KeyRefType,
typename AssociativeCollection,
128 self_type & operator++() ;
129 self_type & operator--() ;
130 self_type & nextProductID() ;
133 const value_type &
operator*()
const {
return *(this->
get()); }
134 const value_type *
operator->()
const {
return (this->
get()); }
135 const value_type *
get()
const { chkPair();
return & pair_; }
137 const key_type &
key()
const { chkPair();
return pair_.first; }
138 const val_type &
val()
const {
return map_.get(idx_); }
141 operator bool()
const {
return idx_ <
map_.size(); }
142 self_type
end()
const ;
151 const AssociativeCollection &
map_;
152 id_offset_iterator
ioi_, ioi2_;
160 void chkPair()
const ;
164 template<
typename KeyRefType,
typename AC,
typename IG>
172 template<
typename KeyRefType,
typename AC,
typename IG>
184 template<
typename KeyRefType,
typename AC,
typename IG>
195 template<
typename KeyRefType,
typename AC,
typename IG>
214 template<
typename KeyRefType,
typename AC,
typename IG>
223 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