From 7120df7234fc109c153a07f9ee6a39d18be3ce17 Mon Sep 17 00:00:00 2001 From: Jakob Date: Fri, 27 Nov 2020 12:12:11 +0100 Subject: [PATCH] changing to esConsumes after fix in #32217 --- HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.cc | 5 ++--- HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.cc b/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.cc index 1db10bb1d818d..f42e0b9a3f878 100644 --- a/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.cc +++ b/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.cc @@ -68,6 +68,7 @@ HLTScoutingEgammaProducer::HLTScoutingEgammaProducer(const edm::ParameterSet& iC //register products produces(); produces(); + topologyToken_ = esConsumes(); } HLTScoutingEgammaProducer::~HLTScoutingEgammaProducer() = default; @@ -179,9 +180,7 @@ void HLTScoutingEgammaProducer::produce(edm::StreamID sid, edm::Event& iEvent, e iEvent.getByToken(ecalRechitEB_, rechitsEB); iEvent.getByToken(ecalRechitEE_, rechitsEE); - edm::ESHandle pTopology; - setup.get().get(pTopology); - const CaloTopology* topology = pTopology.product(); + const CaloTopology* topology = &setup.getData(topologyToken_); // Produce electrons and photons int index = 0; diff --git a/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.h b/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.h index 0ce58ad785728..3bc5de8beeb3f 100644 --- a/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.h +++ b/HLTrigger/Egamma/plugins/HLTScoutingEgammaProducer.h @@ -88,6 +88,7 @@ class HLTScoutingEgammaProducer : public edm::global::EDProducer<> { const edm::EDGetTokenT ecalRechitEB_; const edm::EDGetTokenT ecalRechitEE_; + edm::ESGetToken topologyToken_; }; #endif