Skip to content

Commit

Permalink
Merge pull request #37748 from Dr15Jones/deprecationCSCEfficiency
Browse files Browse the repository at this point in the history
Fixed deprecation warnings in CSCEfficiency
  • Loading branch information
cmsbuild committed May 2, 2022
2 parents adf7b38 + 2c2be2d commit 7aef4cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 1 addition & 8 deletions RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.cc
Expand Up @@ -77,8 +77,7 @@ bool CSCEfficiency::filter(edm::Event &event, const edm::EventSetup &eventSetup)
edm::ESHandle<CSCGeometry> cscGeom = eventSetup.getHandle(geomToken_);

// use theTrackingGeometry instead of cscGeom?
edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry;
eventSetup.get<GlobalTrackingGeometryRecord>().get(theTrackingGeometry);
//edm::ESHandle<GlobalTrackingGeometry> theTrackingGeometry = eventSetup.getHandle(trackingGeomToken_);

bool triggerPassed = true;
if (useTrigger) {
Expand Down Expand Up @@ -2053,10 +2052,4 @@ CSCEfficiency::~CSCEfficiency() {
theFile->Close();
}

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

// ------------ method called once each job just after ending the event loop ------------
void CSCEfficiency::endJob() {}

DEFINE_FWK_MODULE(CSCEfficiency);
7 changes: 2 additions & 5 deletions RecoLocalMuon/CSCEfficiency/src/CSCEfficiency.h
Expand Up @@ -10,7 +10,7 @@
// how many of the headers below are not needed?...
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDFilter.h"
#include "FWCore/Framework/interface/one/EDFilter.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/Common/interface/Handle.h"
Expand Down Expand Up @@ -92,7 +92,7 @@ class TFile;
class CSCLayer;
class CSCDetId;

class CSCEfficiency : public edm::EDFilter {
class CSCEfficiency : public edm::one::EDFilter<> {
public:
/// Constructor
CSCEfficiency(const edm::ParameterSet &pset);
Expand All @@ -101,12 +101,9 @@ class CSCEfficiency : public edm::EDFilter {
~CSCEfficiency() override;

private:
void beginJob() override;
//---- analysis + filter
bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override;

void endJob() override;

//---- (input) parameters
//---- Root file name
std::string rootFileName;
Expand Down

0 comments on commit 7aef4cf

Please sign in to comment.