11 newToOldObjectMap_ (consumes<
CRefMap>(config.getParameter<edm::
InputTag>(
"newToOldObjectMap"))),
12 idMap_ (consumes<edm::ValueMap<bool> >(config.getParameter<edm::
InputTag>(
"idMap")))
14 produces<edm::ValueMap<bool> >();
28 auto& objectMap(*objectMapHandle);
32 auto& idMap(*idMapHandle);
34 std::vector<bool> 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());
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void insert(const H &h, I begin, I end)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< CRefMap > newToOldObjectMap_
edm::EDGetTokenT< edm::ValueMap< bool > > idMap_
edm::EDGetTokenT< reco::PhotonCollection > emObjectProducer_
void produce(edm::Event &, const edm::EventSetup &)
std::vector< Photon > PhotonCollection
collectin of Photon objects
PhotonIDExternalProducerRemapper(const edm::ParameterSet &)
~PhotonIDExternalProducerRemapper()