Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

complete consumes interface for /HLTRechitInRegionsProducer #8081

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"

// Reco candidates
#include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
Expand Down Expand Up @@ -49,11 +50,11 @@ class HLTRechitInRegionsProducer : public edm::stream::EDProducer<> {
void getEtaPhiRegions(std::vector<EcalEtaPhiRegion> *, T1Collection, const L1CaloGeometry&, bool);

const bool useUncalib_;
const edm::InputTag l1TagIsolated_;
const edm::InputTag l1TagNonIsolated_;

const bool doIsolated_;

const edm::EDGetTokenT<T1Collection> l1TokenIsolated_;
const edm::EDGetTokenT<T1Collection> l1TokenNonIsolated_;
const double l1LowerThr_;
const double l1UpperThr_;
const double l1LowerThrIgnoreIsolation_;
Expand Down
11 changes: 6 additions & 5 deletions RecoEgamma/EgammaHLTProducers/src/HLTRechitInRegionsProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
template<typename T1>
HLTRechitInRegionsProducer<T1>::HLTRechitInRegionsProducer(const edm::ParameterSet& ps):
useUncalib_ (ps.getParameter<bool>("useUncalib")),
l1TagIsolated_ (ps.getParameter< edm::InputTag > ("l1TagIsolated")),
l1TagNonIsolated_(ps.getParameter< edm::InputTag > ("l1TagNonIsolated")),
doIsolated_ (ps.getParameter<bool>("doIsolated")),
l1TokenIsolated_ (doIsolated_ ? consumes<T1Collection>(ps.getParameter<edm::InputTag>("l1TagIsolated")) : edm::EDGetTokenT<T1Collection>()),
l1TokenNonIsolated_(consumes<T1Collection>(ps.getParameter<edm::InputTag>("l1TagNonIsolated"))),
l1LowerThr_ (ps.getParameter<double> ("l1LowerThr")),
l1UpperThr_ (ps.getParameter<double> ("l1UpperThr")),
l1LowerThrIgnoreIsolation_(ps.getParameter<double> ("l1LowerThrIgnoreIsolation")),
Expand Down Expand Up @@ -108,12 +108,13 @@ void HLTRechitInRegionsProducer<T1>::produce(edm::Event& evt, const edm::EventSe

//Get the L1 EM Particle Collection
edm::Handle< T1Collection > emIsolColl ;
if(doIsolated_)
evt.getByLabel(l1TagIsolated_, emIsolColl);
if(doIsolated_) {
evt.getByToken(l1TokenIsolated_, emIsolColl);
}

//Get the L1 EM Particle Collection
edm::Handle< T1Collection > emNonIsolColl ;
evt.getByLabel(l1TagNonIsolated_, emNonIsolColl);
evt.getByToken(l1TokenNonIsolated_, emNonIsolColl);

// Get the CaloGeometry
edm::ESHandle<L1CaloGeometry> l1CaloGeom ;
Expand Down