Skip to content

Commit

Permalink
Remove redundant PhotonEnergyCorrector::init() call from GEDPhotonPro…
Browse files Browse the repository at this point in the history
…ducer::beginRun()

It is called unconditionally from GEDPhotonProducer::produce(), I can
not see how the call from beginRun() could do anything additional
except it would require different set ESGetTokens wihtin
PhotonEnergyCorrector etc compared to other users.
  • Loading branch information
makortel committed Aug 25, 2021
1 parent e756352 commit de70d49
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions RecoEgamma/EgammaPhotonProducers/src/GEDPhotonProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ class GEDPhotonProducer : public edm::stream::EDProducer<> {
public:
GEDPhotonProducer(const edm::ParameterSet& ps);

void beginRun(edm::Run const& r, edm::EventSetup const& es) final;
void endRun(edm::Run const&, edm::EventSetup const&) final {}
void produce(edm::Event& evt, const edm::EventSetup& es) override;

private:
Expand Down Expand Up @@ -360,12 +358,6 @@ GEDPhotonProducer::GEDPhotonProducer(const edm::ParameterSet& config)
}
}

void GEDPhotonProducer::beginRun(edm::Run const& r, edm::EventSetup const& eventSetup) {
if (!recoStep_.isFinal()) {
photonEnergyCorrector_->init(eventSetup);
}
}

void GEDPhotonProducer::produce(edm::Event& theEvent, const edm::EventSetup& eventSetup) {
using namespace edm;

Expand Down

0 comments on commit de70d49

Please sign in to comment.