Skip to content

Commit

Permalink
Handle compilation warnings in CalibMuon/CSCCalibration
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Jul 8, 2022
1 parent 8bc5b43 commit 9e24389
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 50 deletions.
20 changes: 5 additions & 15 deletions CalibMuon/CSCCalibration/test/stubs/CSCMapperTestPostls1.cc
@@ -1,6 +1,6 @@
#include <memory>

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -10,25 +10,19 @@
#include "CalibMuon/CSCCalibration/interface/CSCChannelMapperRecord.h"
#include <iostream>

class CSCMapperTestPostls1 : public edm::EDAnalyzer {
class CSCMapperTestPostls1 : public edm::one::EDAnalyzer<> {
public:
explicit CSCMapperTestPostls1(const edm::ParameterSet &);
~CSCMapperTestPostls1();
~CSCMapperTestPostls1() override = default;

private:
virtual void beginJob();
virtual void analyze(const edm::Event &, const edm::EventSetup &);
virtual void endJob();

std::string algoName;
void analyze(const edm::Event &, const edm::EventSetup &) override;

const edm::ESGetToken<CSCChannelMapperBase, CSCChannelMapperRecord> theCSCChannelMapperToken_;
};

CSCMapperTestPostls1::CSCMapperTestPostls1(const edm::ParameterSet &pset) : theCSCChannelMapperToken_(esConsumes()) {}

CSCMapperTestPostls1::~CSCMapperTestPostls1() {}

void CSCMapperTestPostls1::analyze(const edm::Event &ev, const edm::EventSetup &iSetup) {
const int egeo[] = {1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2}; // endcap 1=+z, 2=-z
const int sgeo[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; // station 1-4
Expand Down Expand Up @@ -59,7 +53,7 @@ void CSCMapperTestPostls1::analyze(const edm::Event &ev, const edm::EventSetup &

const auto mapper_ = &iSetup.getData(theCSCChannelMapperToken_);

algoName = mapper_->name();
std::string algoName = mapper_->name();

std::cout << "CSCMapperTestPostls1: analyze sees algorithm " << algoName << " in Event Setup" << std::endl;

Expand Down Expand Up @@ -145,9 +139,5 @@ void CSCMapperTestPostls1::analyze(const edm::Event &ev, const edm::EventSetup &
}
}

void CSCMapperTestPostls1::beginJob() {}

void CSCMapperTestPostls1::endJob() {}

// define this as a plug-in
DEFINE_FWK_MODULE(CSCMapperTestPostls1);
41 changes: 6 additions & 35 deletions CalibMuon/CSCCalibration/test/stubs/Compare.cc
Expand Up @@ -31,7 +31,7 @@
#include <vector>

// user include files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"

#include "FWCore/Framework/interface/Event.h"
Expand All @@ -42,15 +42,13 @@
// class decleration
//

class Compare : public edm::EDAnalyzer {
class Compare : public edm::one::EDAnalyzer<> {
public:
explicit Compare(const edm::ParameterSet &);
~Compare();
~Compare() override = default;

private:
virtual void beginJob();
virtual void analyze(const edm::Event &, const edm::EventSetup &);
virtual void endJob();
void analyze(const edm::Event &, const edm::EventSetup &) override;

// ----------member data ---------------------------
};
Expand All @@ -66,9 +64,7 @@ class Compare : public edm::EDAnalyzer {
//
// constructors and destructor
//
Compare::Compare(const edm::ParameterSet &iConfig)

{
Compare::Compare(const edm::ParameterSet &iConfig) {
// now do what ever initialization is needed
/*
Expand Down Expand Up @@ -490,37 +486,12 @@ Compare::Compare(const edm::ParameterSet &iConfig)
std::cout << "DONE with comparison!" << std::endl;
}

Compare::~Compare() {
// do anything here that needs to be done at desctruction time
// (e.g. close files, deallocate resources etc.)
}

//
// member functions
//

// ------------ method called to for each event ------------
void Compare::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {
using namespace edm;

#ifdef THIS_IS_AN_EVENT_EXAMPLE
Handle<ExampleData> pIn;
iEvent.getByLabel("example", pIn);
#endif

#ifdef THIS_IS_AN_EVENTSETUP_EXAMPLE
ESHandle<SetupData> pSetup;
iSetup.get<SetupRecord>().get(pSetup);
#endif
}

// ------------ method called once each job just before starting event loop
// ------------
void Compare::beginJob() {}

// ------------ method called once each job just after ending the event loop
// ------------
void Compare::endJob() {}
void Compare::analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup) {}

// define this as a plug-in
DEFINE_FWK_MODULE(Compare);

0 comments on commit 9e24389

Please sign in to comment.