test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
edm::EdmEventItemGetter< RefType > 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

 EdmEventItemGetter (const edm::Event &iEvent)
 
RefType get (const ProductID &id, size_t idx) const
 
 ~EdmEventItemGetter ()
 

Private Attributes

ProductID id_
 
const edm::EventiEvent_
 
Handle< View< element_type > > view_
 

Detailed Description

template<typename RefType>
class edm::EdmEventItemGetter< RefType >

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

Definition at line 77 of file AssociativeIterator.h.

Member Typedef Documentation

template<typename RefType >
typedef RefType::value_type edm::EdmEventItemGetter< RefType >::element_type

Definition at line 79 of file AssociativeIterator.h.

Constructor & Destructor Documentation

template<typename RefType >
edm::EdmEventItemGetter< RefType >::EdmEventItemGetter ( const edm::Event iEvent)
inline

Definition at line 80 of file AssociativeIterator.h.

80 : iEvent_(iEvent) { }
const edm::Event & iEvent_
template<typename RefType >
edm::EdmEventItemGetter< RefType >::~EdmEventItemGetter ( )
inline

Definition at line 81 of file AssociativeIterator.h.

81 { }

Member Function Documentation

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

Definition at line 83 of file AssociativeIterator.h.

References conv, fileCollector::convert(), edm::Event::get(), edm::EdmEventItemGetter< RefType >::id_, customizeTrackingMonitorSeedNumber::idx, edm::EdmEventItemGetter< RefType >::iEvent_, and edm::EdmEventItemGetter< RefType >::view_.

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().

83  {
84  typedef typename edm::RefToBase<element_type> BaseRefType; // could also use Ptr, but then I can't do Ptr->RefToBase
85  if (id_ != id) {
86  id_ = id;
87  iEvent_.get(id_, view_);
88  }
89  BaseRefType ref = view_->refAt(idx);
90  typedef typename helper::RefConverter<BaseRefType, RefType> conv;
91  return conv::convert(ref);
92  }
static HepMC::IO_HEPEVT conv
Handle< View< element_type > > view_
const edm::Event & iEvent_
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:331
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...

Member Data Documentation

template<typename RefType >
ProductID edm::EdmEventItemGetter< RefType >::id_
mutableprivate

Definition at line 95 of file AssociativeIterator.h.

Referenced by edm::EdmEventItemGetter< RefType >::get().

template<typename RefType >
const edm::Event& edm::EdmEventItemGetter< RefType >::iEvent_
private

Definition at line 96 of file AssociativeIterator.h.

Referenced by edm::EdmEventItemGetter< RefType >::get().

template<typename RefType >
Handle<View<element_type> > edm::EdmEventItemGetter< RefType >::view_
mutableprivate

Definition at line 94 of file AssociativeIterator.h.

Referenced by edm::EdmEventItemGetter< RefType >::get().