Skip to content

Commit

Permalink
convert TauGenJetProducer to edm::global
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray committed Aug 11, 2015
1 parent b425674 commit e71db8e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
21 changes: 8 additions & 13 deletions PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,21 @@ using namespace std;
using namespace edm;
using namespace reco;

TauGenJetProducer::TauGenJetProducer(const edm::ParameterSet& iConfig)
TauGenJetProducer::TauGenJetProducer(const edm::ParameterSet& iConfig) :
inputTagGenParticles_(iConfig.getParameter<InputTag>("GenParticles")),
tokenGenParticles_(consumes<GenParticleCollection>(inputTagGenParticles_)),
includeNeutrinos_(iConfig.getParameter<bool>("includeNeutrinos")),
verbose_(iConfig.getUntrackedParameter<bool>("verbose",false))
{
inputTagGenParticles_
= iConfig.getParameter<InputTag>("GenParticles");
tokenGenParticles_
= consumes<GenParticleCollection>(inputTagGenParticles_);

includeNeutrinos_
= iConfig.getParameter<bool>("includeNeutrinos");

verbose_ =
iConfig.getUntrackedParameter<bool>("verbose",false);


produces<GenJetCollection>();
}

TauGenJetProducer::~TauGenJetProducer() { }

void TauGenJetProducer::produce(Event& iEvent,
const EventSetup& iSetup) {
void TauGenJetProducer::produce(edm::StreamID, Event& iEvent,
const EventSetup& iSetup) const {

Handle<GenParticleCollection> genParticles;

Expand Down
12 changes: 6 additions & 6 deletions PhysicsTools/JetMCAlgos/plugins/TauGenJetProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@
\author Colin Bernet
\date february 2008
*/
class TauGenJetProducer : public edm::EDProducer {
class TauGenJetProducer : public edm::global::EDProducer<> {
public:

explicit TauGenJetProducer(const edm::ParameterSet&);

~TauGenJetProducer();

virtual void produce(edm::Event&, const edm::EventSetup&) override;
virtual void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;

private:

/// Input PFCandidates
edm::InputTag inputTagGenParticles_;
edm::EDGetTokenT<reco::GenParticleCollection> tokenGenParticles_;
const edm::InputTag inputTagGenParticles_;
const edm::EDGetTokenT<reco::GenParticleCollection> tokenGenParticles_;

/// if yes, neutrinos will be included, for debug purposes
bool includeNeutrinos_;
const bool includeNeutrinos_;

/// verbose ?
bool verbose_;
const bool verbose_;

};

Expand Down

0 comments on commit e71db8e

Please sign in to comment.