CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
edm::EventItemGetter< RefType, EventType > Class Template Reference

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

 EventItemGetter (const EventType &iEvent)
 
RefType get (const ProductID &id, size_t idx) const
 
 ~EventItemGetter ()
 

Private Attributes

ProductID id_
 
const EventType & iEvent_
 
Handle< View< element_type > > view_
 

Detailed Description

template<typename RefType, typename EventType>
class edm::EventItemGetter< RefType, EventType >

Helper class that fetches some type of Ref given ProductID and index, using the edm::Event.

Definition at line 85 of file AssociativeIterator.h.

Member Typedef Documentation

template<typename RefType , typename EventType >
typedef RefType::value_type edm::EventItemGetter< RefType, EventType >::element_type

Definition at line 87 of file AssociativeIterator.h.

Constructor & Destructor Documentation

template<typename RefType , typename EventType >
edm::EventItemGetter< RefType, EventType >::EventItemGetter ( const EventType &  iEvent)
inline

Definition at line 88 of file AssociativeIterator.h.

88 : iEvent_(iEvent) {}
int iEvent
Definition: GenABIO.cc:224
const EventType & iEvent_
template<typename RefType , typename EventType >
edm::EventItemGetter< RefType, EventType >::~EventItemGetter ( )
inline

Definition at line 89 of file AssociativeIterator.h.

89 {}

Member Function Documentation

template<typename RefType , typename EventType >
RefType edm::EventItemGetter< RefType, EventType >::get ( const ProductID id,
size_t  idx 
) const
inline

Definition at line 91 of file AssociativeIterator.h.

References conv, fileCollector::convert(), triggerObjects_cff::id, and training_settings::idx.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

91  {
92  typedef typename edm::RefToBase<element_type>
93  BaseRefType; // could also use Ptr, but then I can't do Ptr->RefToBase
94  if (id_ != id) {
95  id_ = id;
96  iEvent_.get(id_, view_);
97  }
98  BaseRefType ref = view_->refAt(idx);
99  typedef typename helper::RefConverter<BaseRefType, RefType> conv;
100  return conv::convert(ref);
101  }
static HepMC::IO_HEPEVT conv
const EventType & iEvent_
def convert(infile, ofile)
Handle< View< element_type > > view_

Member Data Documentation

template<typename RefType , typename EventType >
ProductID edm::EventItemGetter< RefType, EventType >::id_
mutableprivate

Definition at line 105 of file AssociativeIterator.h.

template<typename RefType , typename EventType >
const EventType& edm::EventItemGetter< RefType, EventType >::iEvent_
private

Definition at line 106 of file AssociativeIterator.h.

template<typename RefType , typename EventType >
Handle<View<element_type> > edm::EventItemGetter< RefType, EventType >::view_
mutableprivate

Definition at line 104 of file AssociativeIterator.h.