diff --git a/CalibTracker/SiStripLorentzAngle/interface/SiStripLAProfileBooker.h b/CalibTracker/SiStripLorentzAngle/interface/SiStripLAProfileBooker.h index 4ca90c18f8235..ee72005afe896 100644 --- a/CalibTracker/SiStripLorentzAngle/interface/SiStripLAProfileBooker.h +++ b/CalibTracker/SiStripLorentzAngle/interface/SiStripLAProfileBooker.h @@ -3,7 +3,7 @@ #include -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" @@ -30,7 +30,7 @@ class TrackerTopology; -class SiStripLAProfileBooker : public edm::EDAnalyzer { +class SiStripLAProfileBooker : public edm::one::EDAnalyzer { public: typedef dqm::legacy::MonitorElement MonitorElement; typedef dqm::legacy::DQMStore DQMStore; @@ -40,6 +40,8 @@ class SiStripLAProfileBooker : public edm::EDAnalyzer { void beginRun(edm::Run const&, const edm::EventSetup& c) override; + void endRun(edm::Run const&, const edm::EventSetup& c) override; + void endJob() override; void analyze(const edm::Event& e, const edm::EventSetup& c) override; diff --git a/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.cc b/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.cc index fd11c5fddda3e..9f2bafdb5dc26 100644 --- a/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.cc +++ b/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.cc @@ -20,6 +20,8 @@ namespace sistrip { vMethods(conf.getParameter >("Methods")), tTopoToken_(esConsumes()) {} + EnsembleCalibrationLA::~EnsembleCalibrationLA(){}; + void EnsembleCalibrationLA::endJob() { Book book("la_ensemble"); TChain* const chain = new TChain("la_ensemble"); @@ -41,6 +43,8 @@ namespace sistrip { write_calibrations(); } + void EnsembleCalibrationLA::beginRun(const edm::Run&, const edm::EventSetup& eSetup) {} + void EnsembleCalibrationLA::endRun(const edm::Run&, const edm::EventSetup& eSetup) { tTopo_ = &eSetup.getData(tTopoToken_); } diff --git a/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.h b/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.h index 584a711c89933..6b7d4b9a6b018 100644 --- a/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.h +++ b/CalibTracker/SiStripLorentzAngle/plugins/EnsembleCalibrationLA.h @@ -2,18 +2,21 @@ #define CalibTracker_SiStripLorentzAngle_EnsembleCalibrationLA_h #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "CalibTracker/SiStripLorentzAngle/interface/LA_Filler_Fitter.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" namespace sistrip { - class EnsembleCalibrationLA : public edm::EDAnalyzer { + class EnsembleCalibrationLA : public edm::one::EDAnalyzer { public: explicit EnsembleCalibrationLA(const edm::ParameterSet&); void analyze(const edm::Event&, const edm::EventSetup&) override {} + void beginRun(const edm::Run&, const edm::EventSetup&) override; void endRun(const edm::Run&, const edm::EventSetup&) override; void endJob() override; + ~EnsembleCalibrationLA() override; + private: void write_ensembles_text(const Book&); void write_ensembles_plots(const Book&) const; diff --git a/CalibTracker/SiStripLorentzAngle/plugins/SiStripLAProfileBooker.cc b/CalibTracker/SiStripLorentzAngle/plugins/SiStripLAProfileBooker.cc index a0596808db304..c4a87b1562b0f 100644 --- a/CalibTracker/SiStripLorentzAngle/plugins/SiStripLAProfileBooker.cc +++ b/CalibTracker/SiStripLorentzAngle/plugins/SiStripLAProfileBooker.cc @@ -237,6 +237,8 @@ void SiStripLAProfileBooker::beginRun(const edm::Run&, const edm::EventSetup& c) TrackCounter = 1; } +void SiStripLAProfileBooker::endRun(const edm::Run&, const edm::EventSetup& c) {} + SiStripLAProfileBooker::~SiStripLAProfileBooker() { detparmap::iterator detpariter; for (detpariter = detmap.begin(); detpariter != detmap.end(); ++detpariter)