diff --git a/EgammaAnalysis/ElectronTools/plugins/CalibratedElectronProducersRun2.cc b/EgammaAnalysis/ElectronTools/plugins/CalibratedElectronProducersRun2.cc index cbc00e9a8cdbc..dd9edcaab41df 100644 --- a/EgammaAnalysis/ElectronTools/plugins/CalibratedElectronProducersRun2.cc +++ b/EgammaAnalysis/ElectronTools/plugins/CalibratedElectronProducersRun2.cc @@ -32,11 +32,12 @@ class CalibratedElectronProducerRun2T : public edm::stream::EDProducer<> { private: edm::EDGetTokenT > theElectronToken; std::string theGBRForestName; - edm::ESHandle theGBRForestHandle; EpCombinationTool theEpCombinationTool; ElectronEnergyCalibratorRun2 theEnCorrectorRun2; std::unique_ptr theSemiDeterministicRng; + + edm::ESGetToken gbrforestToken_; }; template @@ -52,6 +53,7 @@ CalibratedElectronProducerRun2T::CalibratedElectronProducerRun2T(const edm::P theSemiDeterministicRng = std::make_unique(); theEnCorrectorRun2.initPrivateRng(theSemiDeterministicRng.get()); } + gbrforestToken_ = esConsumes(edm::ESInputTag("", theGBRForestName)); produces >(); } @@ -60,8 +62,8 @@ CalibratedElectronProducerRun2T::~CalibratedElectronProducerRun2T() {} template void CalibratedElectronProducerRun2T::produce(edm::Event &iEvent, const edm::EventSetup &iSetup) { - iSetup.get().get(theGBRForestName, theGBRForestHandle); - theEpCombinationTool.init(theGBRForestHandle.product()); + const GBRForest *theGBRForest = &iSetup.getData(gbrforestToken_); + theEpCombinationTool.init(theGBRForest); edm::Handle > in; iEvent.getByToken(theElectronToken, in); diff --git a/EgammaAnalysis/ElectronTools/plugins/EGammaCutBasedEleIdAnalyzer.cc b/EgammaAnalysis/ElectronTools/plugins/EGammaCutBasedEleIdAnalyzer.cc index 42a1e6eed1e78..916893465785a 100644 --- a/EgammaAnalysis/ElectronTools/plugins/EGammaCutBasedEleIdAnalyzer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/EGammaCutBasedEleIdAnalyzer.cc @@ -21,7 +21,7 @@ Description: [one line class summary] // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Utilities/interface/transform.h" @@ -45,7 +45,7 @@ Description: [one line class summary] // class declaration // -class EGammaCutBasedEleIdAnalyzer : public edm::EDAnalyzer { +class EGammaCutBasedEleIdAnalyzer : public edm::one::EDAnalyzer<> { public: typedef std::vector > > IsoDepositMaps; typedef std::vector > > IsoDepositVals; @@ -61,11 +61,12 @@ class EGammaCutBasedEleIdAnalyzer : public edm::EDAnalyzer { void analyze(const edm::Event &, const edm::EventSetup &) override; void endJob() override; + /* void beginRun(edm::Run const &, edm::EventSetup const &) override; void endRun(edm::Run const &, edm::EventSetup const &) override; void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override; void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override; - + */ // ----------member data --------------------------- // input tags @@ -254,7 +255,7 @@ void EGammaCutBasedEleIdAnalyzer::beginJob() { // ------------ method called once each job just after ending the event loop ------------ void EGammaCutBasedEleIdAnalyzer::endJob() {} - +/* // ------------ method called when starting to processes a run ------------ void EGammaCutBasedEleIdAnalyzer::beginRun(edm::Run const &, edm::EventSetup const &) {} @@ -266,7 +267,7 @@ void EGammaCutBasedEleIdAnalyzer::beginLuminosityBlock(edm::LuminosityBlock cons // ------------ method called when ending the processing of a luminosity block ------------ void EGammaCutBasedEleIdAnalyzer::endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) {} - +*/ // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ void EGammaCutBasedEleIdAnalyzer::fillDescriptions(edm::ConfigurationDescriptions &descriptions) { //The following says we do not know what parameters are allowed so do no validation diff --git a/EgammaAnalysis/ElectronTools/plugins/ElectronIdMVAProducer.cc b/EgammaAnalysis/ElectronTools/plugins/ElectronIdMVAProducer.cc index 7bf1f668ca68d..e6988eb8ad46f 100644 --- a/EgammaAnalysis/ElectronTools/plugins/ElectronIdMVAProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/ElectronIdMVAProducer.cc @@ -3,7 +3,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -21,7 +21,7 @@ // class declaration // -class ElectronIdMVAProducer : public edm::EDFilter { +class ElectronIdMVAProducer : public edm::stream::EDFilter<> { public: explicit ElectronIdMVAProducer(const edm::ParameterSet&); ~ElectronIdMVAProducer() override; @@ -37,6 +37,7 @@ class ElectronIdMVAProducer : public edm::EDFilter { edm::EDGetTokenT reducedEBRecHitCollectionToken_; edm::EDGetTokenT reducedEERecHitCollectionToken_; const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_; + edm::ESGetToken ttrackbuilderToken_; double _Rho; std::string method_; @@ -73,6 +74,8 @@ ElectronIdMVAProducer::ElectronIdMVAProducer(const edm::ParameterSet& iConfig) Trig_ = iConfig.getParameter("Trig"); NoIP_ = iConfig.getParameter("NoIP"); + ttrackbuilderToken_ = esConsumes(edm::ESInputTag("", "TransientTrackBuilder")); + produces >(""); mvaID_ = new EGammaMvaEleEstimator(); @@ -134,10 +137,7 @@ bool ElectronIdMVAProducer::filter(edm::Event& iEvent, const edm::EventSetup& iS ecalClusterToolsESGetTokens_.get(iSetup), reducedEBRecHitCollectionToken_, reducedEERecHitCollectionToken_); - - edm::ESHandle builder; - iSetup.get().get("TransientTrackBuilder", builder); - TransientTrackBuilder thebuilder = *(builder.product()); + auto const& thebuilder = iSetup.getData(ttrackbuilderToken_); edm::Handle egCollection; iEvent.getByToken(electronToken_, egCollection); diff --git a/EgammaAnalysis/ElectronTools/plugins/ElectronIsolatorFromEffectiveArea.cc b/EgammaAnalysis/ElectronTools/plugins/ElectronIsolatorFromEffectiveArea.cc index ffdcd2778848d..d423e05aa207a 100644 --- a/EgammaAnalysis/ElectronTools/plugins/ElectronIsolatorFromEffectiveArea.cc +++ b/EgammaAnalysis/ElectronTools/plugins/ElectronIsolatorFromEffectiveArea.cc @@ -1,5 +1,5 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -11,7 +11,7 @@ #include "EgammaAnalysis/ElectronTools/interface/ElectronEffectiveArea.h" -class ElectronIsolatorFromEffectiveArea : public edm::EDFilter { +class ElectronIsolatorFromEffectiveArea : public edm::stream::EDFilter<> { public: typedef edm::ValueMap CandDoubleMap; typedef ElectronEffectiveArea EEA; diff --git a/EgammaAnalysis/ElectronTools/plugins/ElectronPATIdMVAProducer.cc b/EgammaAnalysis/ElectronTools/plugins/ElectronPATIdMVAProducer.cc index 7a26e15098ea8..3305f3c6a306e 100644 --- a/EgammaAnalysis/ElectronTools/plugins/ElectronPATIdMVAProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/ElectronPATIdMVAProducer.cc @@ -3,7 +3,7 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" @@ -21,7 +21,7 @@ // class declaration // -class ElectronPATIdMVAProducer : public edm::EDProducer { +class ElectronPATIdMVAProducer : public edm::stream::EDProducer<> { public: explicit ElectronPATIdMVAProducer(const edm::ParameterSet&); ~ElectronPATIdMVAProducer() override; diff --git a/EgammaAnalysis/ElectronTools/plugins/ElectronRegressionEnergyProducer.cc b/EgammaAnalysis/ElectronTools/plugins/ElectronRegressionEnergyProducer.cc index 7696c51aef853..dd76bef027fb2 100644 --- a/EgammaAnalysis/ElectronTools/plugins/ElectronRegressionEnergyProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/ElectronRegressionEnergyProducer.cc @@ -5,13 +5,13 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "DataFormats/Common/interface/Handle.h" -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/Framework/interface/ESHandle.h" #include "Geometry/Records/interface/CaloTopologyRecord.h" @@ -27,7 +27,7 @@ // class declaration // -class ElectronRegressionEnergyProducer : public edm::EDFilter { +class ElectronRegressionEnergyProducer : public edm::stream::EDFilter<> { public: explicit ElectronRegressionEnergyProducer(const edm::ParameterSet&); ~ElectronRegressionEnergyProducer() override; @@ -57,6 +57,9 @@ class ElectronRegressionEnergyProducer : public edm::EDFilter { edm::EDGetTokenT hVertexToken_; edm::EDGetTokenT hRhoKt6PFJetsToken_; + + edm::ESGetToken ecalTopoToken_; + edm::ESGetToken caloGeomToken_; }; ElectronRegressionEnergyProducer::ElectronRegressionEnergyProducer(const edm::ParameterSet& iConfig) { @@ -75,6 +78,9 @@ ElectronRegressionEnergyProducer::ElectronRegressionEnergyProducer(const edm::Pa hVertexToken_ = consumes(edm::InputTag("offlinePrimaryVertices")); hRhoKt6PFJetsToken_ = consumes(edm::InputTag("kt6PFJets", "rho")); + ecalTopoToken_ = esConsumes(); + caloGeomToken_ = esConsumes(); + produces >(nameEnergyReg_); produces >(nameEnergyErrorReg_); @@ -104,13 +110,8 @@ bool ElectronRegressionEnergyProducer::filter(edm::Event& iEvent, const edm::Eve assert(regressionEvaluator->isInitialized()); if (!geomInitialized_) { - edm::ESHandle theCaloTopology; - iSetup.get().get(theCaloTopology); - ecalTopology_ = &(*theCaloTopology); - - edm::ESHandle theCaloGeometry; - iSetup.get().get(theCaloGeometry); - caloGeometry_ = &(*theCaloGeometry); + ecalTopology_ = &(iSetup.getData(ecalTopoToken_)); + caloGeometry_ = &(iSetup.getData(caloGeomToken_)); geomInitialized_ = true; } diff --git a/EgammaAnalysis/ElectronTools/plugins/GBRForestGetterFromDB.cc b/EgammaAnalysis/ElectronTools/plugins/GBRForestGetterFromDB.cc index 799516f15c328..91c69bbf18c66 100644 --- a/EgammaAnalysis/ElectronTools/plugins/GBRForestGetterFromDB.cc +++ b/EgammaAnalysis/ElectronTools/plugins/GBRForestGetterFromDB.cc @@ -1,16 +1,14 @@ #ifndef CalibratedElectronProducer_h #define CalibratedElectronProducer_h -#include #include - #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" - +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "CondFormats/DataRecord/interface/GBRWrapperRcd.h" #include "CondFormats/GBRForest/interface/GBRForest.h" #include @@ -25,23 +23,24 @@ class GBRForestGetterFromDB : public edm::one::EDAnalyzer<> { std::string theGBRForestName; std::string theOutputFileName; std::string theOutputObjectName; - edm::ESHandle theGBRForestHandle; + edm::ESGetToken theGBRForestToken_; }; GBRForestGetterFromDB::GBRForestGetterFromDB(const edm::ParameterSet &conf) : theGBRForestName(conf.getParameter("grbForestName")), theOutputFileName(conf.getUntrackedParameter("outputFileName")), theOutputObjectName(conf.getUntrackedParameter( - "outputObjectName", theGBRForestName.empty() ? "GBRForest" : theGBRForestName)) {} + "outputObjectName", theGBRForestName.empty() ? "GBRForest" : theGBRForestName)), + theGBRForestToken_(esConsumes()) {} GBRForestGetterFromDB::~GBRForestGetterFromDB() {} void GBRForestGetterFromDB::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) { - iSetup.get().get(theGBRForestName, theGBRForestHandle); + auto theGBRForestHandle = iSetup.getHandle(theGBRForestToken_); TFile *fOut = TFile::Open(theOutputFileName.c_str(), "RECREATE"); fOut->WriteObject(theGBRForestHandle.product(), theOutputObjectName.c_str()); fOut->Close(); - std::cout << "Wrote output to " << theOutputFileName << std::endl; + edm::LogPrint("GBRForestGetterFromDB") << "Wrote output to " << theOutputFileName; } #include "FWCore/Framework/interface/MakerMacros.h" diff --git a/EgammaAnalysis/ElectronTools/plugins/PatElectronEAIsoCorrectionProducer.cc b/EgammaAnalysis/ElectronTools/plugins/PatElectronEAIsoCorrectionProducer.cc index 928bdae0d2e59..e4c60c6965b06 100644 --- a/EgammaAnalysis/ElectronTools/plugins/PatElectronEAIsoCorrectionProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/PatElectronEAIsoCorrectionProducer.cc @@ -1,4 +1,4 @@ -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -6,7 +6,7 @@ #include "DataFormats/PatCandidates/interface/Electron.h" #include "DataFormats/Common/interface/ValueMap.h" -class PatElectronEAIsoCorrectionProducer : public edm::EDProducer { +class PatElectronEAIsoCorrectionProducer : public edm::stream::EDProducer<> { public: explicit PatElectronEAIsoCorrectionProducer(const edm::ParameterSet& iConfig); ~PatElectronEAIsoCorrectionProducer() override{}; diff --git a/EgammaAnalysis/ElectronTools/plugins/PhotonIsoProducer.cc b/EgammaAnalysis/ElectronTools/plugins/PhotonIsoProducer.cc index 18bb9ff939be9..e8b2ac31e5eb0 100644 --- a/EgammaAnalysis/ElectronTools/plugins/PhotonIsoProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/PhotonIsoProducer.cc @@ -3,11 +3,11 @@ // user include files #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDFilter.h" +#include "FWCore/Framework/interface/stream/EDFilter.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/MakerMacros.h" - +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/EgammaCandidates/interface/GsfElectron.h" #include "DataFormats/EgammaCandidates/interface/GsfElectronFwd.h" @@ -22,7 +22,7 @@ // class declaration // -class PhotonIsoProducer : public edm::EDFilter { +class PhotonIsoProducer : public edm::stream::EDFilter<> { public: explicit PhotonIsoProducer(const edm::ParameterSet&); ~PhotonIsoProducer() override; @@ -117,15 +117,14 @@ bool PhotonIsoProducer::filter(edm::Event& iEvent, const edm::EventSetup& iSetup isolator.fGetIsolation(&*aPho, &thePfColl, myVtxRef, vertexCollection); if (verbose_) { - std::cout << " run " << iEvent.id().run() << " lumi " << iEvent.id().luminosityBlock() << " event " - << iEvent.id().event(); - std::cout << " pt " << aPho->pt() << " eta " << aPho->eta() << " phi " << aPho->phi() << " charge " - << aPho->charge() << " : " << std::endl; - ; - - std::cout << " ChargedIso " << isolator.getIsolationCharged() << std::endl; - std::cout << " PhotonIso " << isolator.getIsolationPhoton() << std::endl; - std::cout << " NeutralHadron Iso " << isolator.getIsolationNeutral() << std::endl; + edm::LogPrint("PhotonIsoProducer") << " run " << iEvent.id().run() << " lumi " << iEvent.id().luminosityBlock() + << " event " << iEvent.id().event(); + edm::LogPrint("PhotonIsoProducer") << " pt " << aPho->pt() << " eta " << aPho->eta() << " phi " << aPho->phi() + << " charge " << aPho->charge() << " : "; + + edm::LogPrint("PhotonIsoProducer") << " ChargedIso " << isolator.getIsolationCharged(); + edm::LogPrint("PhotonIsoProducer") << " PhotonIso " << isolator.getIsolationPhoton(); + edm::LogPrint("PhotonIsoProducer") << " NeutralHadron Iso " << isolator.getIsolationNeutral(); } chIsoValues.push_back(isolator.getIsolationCharged()); diff --git a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc index 2d1673c0ca2d5..0059f6e563716 100644 --- a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc +++ b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.cc @@ -25,6 +25,8 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e regressionInputFile_ = cfg.getParameter("regressionInputFile"); recHitCollectionEBToken_ = mayConsume(cfg.getParameter("recHitCollectionEB")); recHitCollectionEEToken_ = mayConsume(cfg.getParameter("recHitCollectionEE")); + ecalTopoToken_ = esConsumes(); + caloGeomToken_ = esConsumes(); nameEnergyReg_ = cfg.getParameter("nameEnergyReg"); nameEnergyErrorReg_ = cfg.getParameter("nameEnergyErrorReg"); debug_ = cfg.getUntrackedParameter("debug"); @@ -41,9 +43,9 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e } if (inputCollectionType_ == 0 && !produceValueMaps_) { - std::cout << " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the " - "results. In that case, it does not nothing !! " - << std::endl; + edm::LogPrint("RegressionEnergyPatElectronProducer") + << " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the results. " + "In that case, it does not nothing !! "; } if (inputCollectionType_ == 0) { @@ -52,7 +54,7 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e produces(); } else { throw cms::Exception("InconsistentParameters") - << " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) " << std::endl; + << " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) "; } //set regression type @@ -79,7 +81,7 @@ RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer(const e geomInitialized_ = false; - std::cout << " Finished initialization " << std::endl; + edm::LogPrint("RegressionEnergyPatElectronProducer") << " Finished initialization "; } RegressionEnergyPatElectronProducer::~RegressionEnergyPatElectronProducer() { delete regressionEvaluator_; } @@ -87,13 +89,8 @@ RegressionEnergyPatElectronProducer::~RegressionEnergyPatElectronProducer() { de void RegressionEnergyPatElectronProducer::produce(edm::Event& event, const edm::EventSetup& setup) { assert(regressionEvaluator_->isInitialized()); if (!geomInitialized_) { - edm::ESHandle theCaloTopology; - setup.get().get(theCaloTopology); - ecalTopology_ = &(*theCaloTopology); - - edm::ESHandle theCaloGeometry; - setup.get().get(theCaloGeometry); - caloGeometry_ = &(*theCaloGeometry); + ecalTopology_ = &setup.getData(ecalTopoToken_); + caloGeometry_ = &setup.getData(caloGeomToken_); geomInitialized_ = true; } @@ -162,10 +159,13 @@ void RegressionEnergyPatElectronProducer::produce(edm::Event& event, const edm:: for (unsigned iele = 0; iele < nElectrons_; ++iele) { const reco::GsfElectron* ele = (inputCollectionType_ == 0) ? &(*gsfCollectionH)[iele] : &(*patCollectionH)[iele]; if (debug_) { - std::cout << "***********************************************************************\n"; - std::cout << "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event() - << "\n"; - std::cout << "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n"; + edm::LogPrint("RegressionEnergyPatElectronProducer") + << "***********************************************************************\n"; + edm::LogPrint("RegressionEnergyPatElectronProducer") + << "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event() + << "\n"; + edm::LogPrint("RegressionEnergyPatElectronProducer") + << "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n"; } pat::Electron* myPatElectron = (inputCollectionType_ == 0) ? nullptr : new pat::Electron((*patCollectionH)[iele]); @@ -516,7 +516,8 @@ void RegressionEnergyPatElectronProducer::produce(edm::Event& event, const edm:: energyValues.push_back(RegressionMomentum); energyErrorValues.push_back(RegressionMomentumError); } else { - std::cout << "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n"; + edm::LogPrint("RegressionEnergyPatElectronProducer") + << "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n"; } if (inputCollectionType_ == 1) { diff --git a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.h b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.h index 8617f77530a78..9a5383dea1cad 100644 --- a/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.h +++ b/EgammaAnalysis/ElectronTools/plugins/RegressionEnergyPatElectronProducer.h @@ -2,7 +2,7 @@ #define RegressionEnergyPatElectronProducer_h #include "DataFormats/Common/interface/Handle.h" -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -10,13 +10,14 @@ #include "Geometry/CaloGeometry/interface/CaloGeometry.h" #include "EgammaAnalysis/ElectronTools/interface/ElectronEnergyRegressionEvaluate.h" -//#include "EGamma/EGammaAnalysisTools/interface/ElectronEnergyRegressionEvaluate.h" #include "DataFormats/PatCandidates/interface/Electron.h" #include "DataFormats/VertexReco/interface/VertexFwd.h" #include "DataFormats/VertexReco/interface/Vertex.h" -class RegressionEnergyPatElectronProducer : public edm::EDProducer { +class CaloTopologyRecord; +class CaloGeometryRecord; +class RegressionEnergyPatElectronProducer : public edm::stream::EDProducer<> { public: explicit RegressionEnergyPatElectronProducer(const edm::ParameterSet &); ~RegressionEnergyPatElectronProducer() override; @@ -31,6 +32,8 @@ class RegressionEnergyPatElectronProducer : public edm::EDProducer { edm::EDGetTokenT recHitCollectionEBToken_; edm::EDGetTokenT recHitCollectionEEToken_; + edm::ESGetToken ecalTopoToken_; + edm::ESGetToken caloGeomToken_; // bool useReducedRecHits_;