diff --git a/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h b/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h index 548db742cf359..c254274ebc1be 100644 --- a/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h +++ b/OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h @@ -1,6 +1,6 @@ #include #include -#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/one/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -10,7 +10,7 @@ #include "OnlineDB/CSCCondDB/interface/CSCAFEBThrAnalysis.h" #include "OnlineDB/CSCCondDB/interface/CSCAFEBConnectAnalysis.h" -class CSCAFEBAnalyzer : public edm::EDAnalyzer { +class CSCAFEBAnalyzer : public edm::one::EDAnalyzer<> { public: explicit CSCAFEBAnalyzer(edm::ParameterSet const& conf); void analyze(edm::Event const& e, edm::EventSetup const& iSetup) override; @@ -18,9 +18,9 @@ class CSCAFEBAnalyzer : public edm::EDAnalyzer { private: /// variables persistent across events should be declared here. - std::string testname; + const std::string testname; + const edm::InputTag CSCSrc_; + const edm::EDGetTokenT w_token; CSCAFEBThrAnalysis analysisthr_; CSCAFEBConnectAnalysis analysiscnt_; - - edm::InputTag CSCSrc_; }; diff --git a/OnlineDB/CSCCondDB/plugins/CSCChamberTimeCorrectionsReadTest.cc b/OnlineDB/CSCCondDB/plugins/CSCChamberTimeCorrectionsReadTest.cc index a9ce742baec68..c3cd0d4a52677 100644 --- a/OnlineDB/CSCCondDB/plugins/CSCChamberTimeCorrectionsReadTest.cc +++ b/OnlineDB/CSCCondDB/plugins/CSCChamberTimeCorrectionsReadTest.cc @@ -1,14 +1,14 @@ #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/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/EventSetup.h" #include "OnlineDB/CSCCondDB/interface/CSCCableRead.h" -class CSCChamberTimeCorrectionsReadTest : public edm::EDAnalyzer { +class CSCChamberTimeCorrectionsReadTest : public edm::one::EDAnalyzer<> { public: explicit CSCChamberTimeCorrectionsReadTest(const edm::ParameterSet &); - ~CSCChamberTimeCorrectionsReadTest() override; + ~CSCChamberTimeCorrectionsReadTest() override = default; private: void beginJob() override; @@ -20,7 +20,6 @@ class CSCChamberTimeCorrectionsReadTest : public edm::EDAnalyzer { DEFINE_FWK_MODULE(CSCChamberTimeCorrectionsReadTest); CSCChamberTimeCorrectionsReadTest::CSCChamberTimeCorrectionsReadTest(const edm::ParameterSet &) {} -CSCChamberTimeCorrectionsReadTest::~CSCChamberTimeCorrectionsReadTest() {} void CSCChamberTimeCorrectionsReadTest::analyze(const edm::Event &, const edm::EventSetup &) { csccableread *cable = new csccableread(); diff --git a/OnlineDB/CSCCondDB/plugins/CSCMap1Read.cc b/OnlineDB/CSCCondDB/plugins/CSCMap1Read.cc index 435b74cda4ce2..636fbe28f2c8c 100644 --- a/OnlineDB/CSCCondDB/plugins/CSCMap1Read.cc +++ b/OnlineDB/CSCCondDB/plugins/CSCMap1Read.cc @@ -1,5 +1,5 @@ #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/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/EventSetup.h" @@ -9,10 +9,10 @@ // class declaration // -class CSCMap1Read : public edm::EDAnalyzer { +class CSCMap1Read : public edm::one::EDAnalyzer<> { public: explicit CSCMap1Read(const edm::ParameterSet &); - ~CSCMap1Read() override; + ~CSCMap1Read() override = default; private: void beginJob() override; @@ -24,7 +24,6 @@ class CSCMap1Read : public edm::EDAnalyzer { DEFINE_FWK_MODULE(CSCMap1Read); CSCMap1Read::CSCMap1Read(const edm::ParameterSet &) {} -CSCMap1Read::~CSCMap1Read() {} void CSCMap1Read::analyze(const edm::Event &, const edm::EventSetup &) { CSCMapItem::MapItem item; diff --git a/OnlineDB/CSCCondDB/src/CSCAFEBAnalyzer.cc b/OnlineDB/CSCCondDB/src/CSCAFEBAnalyzer.cc index 372ce3ebb1062..1551b99a4441b 100644 --- a/OnlineDB/CSCCondDB/src/CSCAFEBAnalyzer.cc +++ b/OnlineDB/CSCCondDB/src/CSCAFEBAnalyzer.cc @@ -1,6 +1,5 @@ #include #include -#include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -9,31 +8,25 @@ #include "OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h" -CSCAFEBAnalyzer::CSCAFEBAnalyzer(edm::ParameterSet const& conf) { +CSCAFEBAnalyzer::CSCAFEBAnalyzer(edm::ParameterSet const& conf) + : testname(conf.getParameter("TestName")), + CSCSrc_(conf.getParameter("CSCSrc")), + w_token(consumes(CSCSrc_)) { /// If your module takes parameters, here is where you would define /// their names and types, and access them to initialize internal /// variables. Example as follows: - testname = conf.getParameter("TestName"); - if (testname == "AFEBThresholdScan") analysisthr_.setup(conf.getParameter("HistogramFile")); if (testname == "AFEBConnectivity") analysiscnt_.setup(conf.getParameter("HistogramFile")); /// get labels for input tags - - CSCSrc_ = conf.getParameter("CSCSrc"); } void CSCAFEBAnalyzer::analyze(edm::Event const& e, edm::EventSetup const& iSetup) { - edm::Handle wire_digis; - /// For CSC unpacker - - // const char* modtag="cscunpacker"; - // e.getByLabel(modtag,"MuonCSCWireDigi",wire_digis); - e.getByLabel(CSCSrc_, wire_digis); + const edm::Handle& wire_digis = e.getHandle(w_token); if (testname == "AFEBThresholdScan") analysisthr_.analyze(*wire_digis);