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 86 of file AssociativeIterator.h.

Member Typedef Documentation

◆ element_type

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

Definition at line 88 of file AssociativeIterator.h.

Constructor & Destructor Documentation

◆ EventItemGetter()

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

Definition at line 89 of file AssociativeIterator.h.

89 : iEvent_(iEvent) {}

◆ ~EventItemGetter()

template<typename RefType , typename EventType >
edm::EventItemGetter< RefType, EventType >::~EventItemGetter ( )
inline

Definition at line 90 of file AssociativeIterator.h.

90 {}

Member Function Documentation

◆ get()

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

Definition at line 92 of file AssociativeIterator.h.

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

References conv, fileCollector::convert(), triggerObjects_cff::id, edm::EventItemGetter< RefType, EventType >::id_, heavyIonCSV_trainingSettings::idx, edm::EventItemGetter< RefType, EventType >::iEvent_, and edm::EventItemGetter< RefType, EventType >::view_.

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

Member Data Documentation

◆ id_

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

◆ iEvent_

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

◆ view_

template<typename RefType , typename EventType >
Handle<View<element_type> > edm::EventItemGetter< RefType, EventType >::view_
mutableprivate
edm::EventItemGetter::view_
Handle< View< element_type > > view_
Definition: AssociativeIterator.h:106
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
fileCollector.convert
def convert(infile, ofile)
Definition: fileCollector.py:47
iEvent
int iEvent
Definition: GenABIO.cc:224
edm::EventItemGetter::id_
ProductID id_
Definition: AssociativeIterator.h:107
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
edm::EventItemGetter::iEvent_
const EventType & iEvent_
Definition: AssociativeIterator.h:108
edm::RefToBase
Definition: AssociativeIterator.h:54
conv
EPOS::IO_EPOS conv
Definition: ReggeGribovPartonMCHadronizer.cc:42