Skip to content

Commit

Permalink
Handle compilation warnings in OnlineDB/CSCCondDB
Browse files Browse the repository at this point in the history
Code check
  • Loading branch information
Sunanda committed Jul 12, 2022
1 parent 51a2ec1 commit 2d36d97
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 25 deletions.
10 changes: 5 additions & 5 deletions OnlineDB/CSCCondDB/interface/CSCAFEBAnalyzer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <iostream>
#include <vector>
#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"
Expand All @@ -10,17 +10,17 @@
#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;
void endJob() override;

private:
/// variables persistent across events should be declared here.
std::string testname;
const std::string testname;
const edm::InputTag CSCSrc_;
const edm::EDGetTokenT<CSCWireDigiCollection> w_token;
CSCAFEBThrAnalysis analysisthr_;
CSCAFEBConnectAnalysis analysiscnt_;

edm::InputTag CSCSrc_;
};
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions OnlineDB/CSCCondDB/plugins/CSCMap1Read.cc
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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;
Expand All @@ -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;
Expand Down
17 changes: 5 additions & 12 deletions OnlineDB/CSCCondDB/src/CSCAFEBAnalyzer.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <iostream>
#include <vector>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -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<std::string>("TestName")),
CSCSrc_(conf.getParameter<edm::InputTag>("CSCSrc")),
w_token(consumes<CSCWireDigiCollection>(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<std::string>("TestName");

if (testname == "AFEBThresholdScan")
analysisthr_.setup(conf.getParameter<std::string>("HistogramFile"));
if (testname == "AFEBConnectivity")
analysiscnt_.setup(conf.getParameter<std::string>("HistogramFile"));

/// get labels for input tags

CSCSrc_ = conf.getParameter<edm::InputTag>("CSCSrc");
}

void CSCAFEBAnalyzer::analyze(edm::Event const& e, edm::EventSetup const& iSetup) {
edm::Handle<CSCWireDigiCollection> wire_digis;

/// For CSC unpacker

// const char* modtag="cscunpacker";
// e.getByLabel(modtag,"MuonCSCWireDigi",wire_digis);
e.getByLabel(CSCSrc_, wire_digis);
const edm::Handle<CSCWireDigiCollection>& wire_digis = e.getHandle(w_token);

if (testname == "AFEBThresholdScan")
analysisthr_.analyze(*wire_digis);
Expand Down

0 comments on commit 2d36d97

Please sign in to comment.