1 #ifndef RecoEgamma_ElectronIdentification_ElectronIDExternalProducer_h
2 #define RecoEgamma_ElectronIdentification_ElectronIDExternalProducer_h
22 select_(iConfig, consumesCollector()) {
23 produces<edm::ValueMap<float>>();
35 template <
typename algo>
42 select_.newEvent(iEvent, iSetup);
46 values.reserve(electrons->size());
47 for (reco::GsfElectronCollection::const_iterator eleIt = electrons->begin(); eleIt != electrons->end(); ++eleIt) {
48 values.push_back(
float(select_((*eleIt), iEvent, iSetup)));
52 auto out = std::make_unique<edm::ValueMap<float>>();
54 filler.insert(electrons, values.begin(), values.end());
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::GsfElectronCollection > srcToken_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
ElectronIDExternalProducer(const edm::ParameterSet &iConfig)
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
~ElectronIDExternalProducer() override