Helper class that fetches some type of Ref given ProductID and index, using the edm::Event. More...
#include <AssociativeIterator.h>
Public Types | |
typedef RefType::value_type | element_type |
Public Member Functions | |
EdmEventItemGetter (const edm::Event &iEvent) | |
RefType | get (const ProductID &id, size_t idx) const |
~EdmEventItemGetter () | |
Private Attributes | |
ProductID | id_ |
const edm::Event & | iEvent_ |
Handle< View< element_type > > | view_ |
Helper class that fetches some type of Ref given ProductID and index, using the edm::Event.
Definition at line 78 of file AssociativeIterator.h.
typedef RefType::value_type edm::EdmEventItemGetter< RefType >::element_type |
Definition at line 80 of file AssociativeIterator.h.
edm::EdmEventItemGetter< RefType >::EdmEventItemGetter | ( | const edm::Event & | iEvent | ) | [inline] |
Definition at line 81 of file AssociativeIterator.h.
: iEvent_(iEvent) { }
edm::EdmEventItemGetter< RefType >::~EdmEventItemGetter | ( | ) | [inline] |
Definition at line 82 of file AssociativeIterator.h.
{ }
RefType edm::EdmEventItemGetter< RefType >::get | ( | const ProductID & | id, |
size_t | idx | ||
) | const [inline] |
Definition at line 84 of file AssociativeIterator.h.
References conv, lhef::cc::convert(), edm::Event::get(), edm::EdmEventItemGetter< RefType >::id_, UserOptions_cff::idx, edm::EdmEventItemGetter< RefType >::iEvent_, and edm::EdmEventItemGetter< RefType >::view_.
{ typedef typename edm::RefToBase<element_type> BaseRefType; // could also use Ptr, but then I can't do Ptr->RefToBase if (id_ != id) { id_ = id; iEvent_.get(id_, view_); } BaseRefType ref = view_->refAt(idx); typedef typename helper::RefConverter<BaseRefType, RefType> conv; return conv::convert(ref); }
ProductID edm::EdmEventItemGetter< RefType >::id_ [mutable, private] |
Definition at line 96 of file AssociativeIterator.h.
Referenced by edm::EdmEventItemGetter< RefType >::get().
const edm::Event& edm::EdmEventItemGetter< RefType >::iEvent_ [private] |
Definition at line 97 of file AssociativeIterator.h.
Referenced by edm::EdmEventItemGetter< RefType >::get().
Handle<View<element_type> > edm::EdmEventItemGetter< RefType >::view_ [mutable, private] |
Definition at line 95 of file AssociativeIterator.h.
Referenced by edm::EdmEventItemGetter< RefType >::get().