11 newToOldObjectMap_ (consumes<
CRefMap>(config.getParameter<edm::
InputTag>(
"newToOldObjectMap"))),
12 idMap_ (consumes<edm::ValueMap<float> >(config.getParameter<edm::
InputTag>(
"idMap")))
14 produces<edm::ValueMap<float> >();
28 auto& objectMap(*objectMapHandle);
32 auto& idMap(*idMapHandle);
34 std::vector<float> retV(emObjectHandle->size(), 0.);
36 for (
unsigned iO(0); iO != emObjectHandle->size(); ++iO) {
37 CRef ref(emObjectHandle, iO);
38 auto oldRef(objectMap[ref]);
39 retV[iO] = idMap[oldRef];
45 filler.
insert(emObjectHandle, retV.begin(), retV.end());
~ElectronIDExternalProducerRemapper()
void produce(edm::Event &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< CRefMap > newToOldObjectMap_
ElectronIDExternalProducerRemapper(const edm::ParameterSet &)
edm::EDGetTokenT< edm::ValueMap< float > > idMap_
edm::EDGetTokenT< reco::GsfElectronCollection > emObjectProducer_