Skip to content

Commit

Permalink
convert JetDeltaRTagInfoValueMapProducer to edm::global
Browse files Browse the repository at this point in the history
  • Loading branch information
lgray committed Sep 16, 2015
1 parent 51540b0 commit 13095bd
Showing 1 changed file with 8 additions and 8 deletions.
Expand Up @@ -21,7 +21,7 @@
*/


#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

#include "DataFormats/JetReco/interface/Jet.h"
#include "DataFormats/BTauReco/interface/CATopJetTagInfo.h"
Expand All @@ -34,7 +34,7 @@
#include "DataFormats/Math/interface/deltaR.h"

template < class T, class I >
class JetDeltaRTagInfoValueMapProducer : public edm::EDProducer {
class JetDeltaRTagInfoValueMapProducer : public edm::global::EDProducer<> {

public:

Expand All @@ -57,7 +57,7 @@ class JetDeltaRTagInfoValueMapProducer : public edm::EDProducer {
virtual void beginJob() override {}
virtual void endJob() override {}

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

std::auto_ptr< TagInfosCollection > mappedTagInfos ( new TagInfosCollection() );

Expand All @@ -69,7 +69,7 @@ class JetDeltaRTagInfoValueMapProducer : public edm::EDProducer {
edm::Handle< typename edm::View<I> > h_tagInfos;
iEvent.getByToken( matchedTagInfosToken_, h_tagInfos );

double distMax2 = distMax_*distMax_;
const double distMax2 = distMax_*distMax_;

std::vector<bool> jets2_locks( h_jets2->size(), false );

Expand Down Expand Up @@ -126,10 +126,10 @@ class JetDeltaRTagInfoValueMapProducer : public edm::EDProducer {
iEvent.put(mappedTagInfos);
}

edm::EDGetTokenT< typename edm::View<T> > srcToken_;
edm::EDGetTokenT< typename edm::View<T> > matchedToken_;
edm::EDGetTokenT< typename edm::View<I> > matchedTagInfosToken_;
double distMax_;
const edm::EDGetTokenT< typename edm::View<T> > srcToken_;
const edm::EDGetTokenT< typename edm::View<T> > matchedToken_;
const edm::EDGetTokenT< typename edm::View<I> > matchedTagInfosToken_;
const double distMax_;

};

Expand Down

0 comments on commit 13095bd

Please sign in to comment.