#include <AssociationMapOneToOne2Association.h>
Public Member Functions | |
AssociationMapOneToOne2Association (const edm::ParameterSet &) | |
Private Types | |
typedef edm::AssociationMap < edm::OneToOne< CKey, CVal > > | am_t |
typedef edm::Association< CVal > | as_t |
Private Member Functions | |
void | produce (edm::Event &, const edm::EventSetup &) |
Private Attributes | |
edm::InputTag | am_ |
Definition at line 17 of file AssociationMapOneToOne2Association.h.
typedef edm::AssociationMap<edm::OneToOne<CKey, CVal> > AssociationMapOneToOne2Association< CKey, CVal >::am_t [private] |
Definition at line 21 of file AssociationMapOneToOne2Association.h.
typedef edm::Association<CVal> AssociationMapOneToOne2Association< CKey, CVal >::as_t [private] |
Definition at line 22 of file AssociationMapOneToOne2Association.h.
AssociationMapOneToOne2Association< CKey, CVal >::AssociationMapOneToOne2Association | ( | const edm::ParameterSet & | cfg | ) |
Definition at line 34 of file AssociationMapOneToOne2Association.h.
: am_(cfg.template getParameter<edm::InputTag>("src")) { produces<as_t>(); }
void AssociationMapOneToOne2Association< CKey, CVal >::produce | ( | edm::Event & | evt, |
const edm::EventSetup & | |||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 40 of file AssociationMapOneToOne2Association.h.
References edm::helper::Filler< Map >::fill(), edm::Event::getByLabel(), i, errorMatrix2Lands::indices, edm::helper::Filler< Map >::insert(), edm::Event::put(), and findQualityFiles::size.
{ using namespace edm; using namespace std; Handle<am_t> am; evt.getByLabel(am_, am); auto_ptr<as_t> as(new as_t); typename as_t::Filler filler(*as); filler.fill(); size_t size = am->size(); vector<int> indices; indices.reserve(size); for(typename am_t::const_iterator i = am->begin(); i != am->end(); ++i) { indices.push_back(i->val.key()); } filler.insert(am->refProd().key, indices.begin(), indices.end()); evt.put(as); }
edm::InputTag AssociationMapOneToOne2Association< CKey, CVal >::am_ [private] |
Definition at line 24 of file AssociationMapOneToOne2Association.h.