|
|
Go to the documentation of this file. 1 #ifndef DataFormats_Common_AssociativeIterator_h
2 #define DataFormats_Common_AssociativeIterator_h
57 template <
class C,
class T,
class F>
67 template <
typename RefFrom,
typename RefTo>
69 static RefTo
convert(
const RefFrom &ref) {
return RefTo(ref); }
77 template <
typename T,
typename C,
typename V,
typename F>
85 template <
typename RefType,
typename EventType>
114 template <
typename AC>
119 template <
typename C>
125 template <
typename KeyRefType,
typename AssociativeCollection,
typename ItemGetter>
145 const value_type *
get()
const {
167 const AssociativeCollection &
map_;
180 template <
typename KeyRefType,
typename AC,
typename IG>
182 : map_(
map), ioi_(map_.ids().begin()), ioi2_(ioi_ + 1), idx_(0), getter_(getter), pairOk_(
false) {}
184 template <
typename KeyRefType,
typename AC,
typename IG>
188 if (ioi2_ < map_.ids().end()) {
189 if (ioi2_->second == idx_) {
197 template <
typename KeyRefType,
typename AC,
typename IG>
201 if (ioi_->second < idx_) {
208 template <
typename KeyRefType,
typename AC,
typename IG>
213 if (ioi_ == map_.ids().end()) {
228 template <
typename KeyRefType,
typename AC,
typename IG>
231 ret.ioi_ = map_.ids().end();
233 ret.idx_ = map_.size();
237 template <
typename KeyRefType,
typename AC,
typename IG>
241 pair_.first = getter_.get(
id(), idx_ - ioi_->second);
242 pair_.second = map_.get(idx_);
246 template <
typename KeyRefType,
typename AC,
typename EventType>
ret
prodAgent to be discontinued
const value_type * operator->() const
KeyRefType::value_type key_val_type
RefType get(const ProductID &id, size_t idx) const
AssociativeIterator< KeyRefType, AssociativeCollection, ItemGetter > self_type
AssociativeIterator(const AssociativeCollection &map, const ItemGetter &getter)
Create the associative iterator, pointing at the beginning of the collection.
const val_type & val() const
const value_type * get() const
AssociativeCollection::id_offset_vector id_offset_vector
Helper class that fetches some type of Ref given ProductID and index, using the edm::Event.
Handle< View< element_type > > view_
reco::GenParticleCollection::const_iterator IG
self_type & nextProductID()
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Association< C >::reference_type type
const ProductID & id() const
EventItemGetter(const EventType &iEvent)
AssociativeIterator< KeyRefType, AC, edm::EventItemGetter< KeyRefType, EventType > > makeAssociativeIterator(const AC &map, const EventType &event)
const value_type & operator*() const
value_type const * get() const
static Ptr< T > convert(const RefToBase< T > &ref)
def convert(infile, ofile)
helper::AssociativeCollectionValueType< AssociativeCollection >::type val_type
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t V
const AssociativeCollection & map_
Container::value_type value_type
bool operator==(const self_type &other) const
id_offset_vector::const_iterator id_offset_iterator
RefType::value_type element_type
bool operator!=(const self_type &other) const
const EventType & iEvent_
std::pair< key_type, val_type > value_type
static Ref< C, V, F > convert(const RefToBase< T > &ref)
static RefTo convert(const RefFrom &ref)
const key_type & key() const
bool operator<(const self_type &other) const