Skip to content

Commit

Permalink
Changed profiling analyzers to edm::one::EDAnalyzer
Browse files Browse the repository at this point in the history
This fixes the CMS deprecation warnings.
  • Loading branch information
Dr15Jones committed Oct 27, 2022
1 parent e58106d commit 4374a43
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
38 changes: 20 additions & 18 deletions PerfTools/Callgrind/plugins/CallgrindAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

// user include files
#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/Framework/interface/MakerMacros.h"
Expand All @@ -34,23 +34,25 @@
//
#include <iostream>
using namespace std;
class Profiler : public edm::EDAnalyzer {
public:
explicit Profiler(const edm::ParameterSet&);
~Profiler() override;

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

// ----------member data ---------------------------
int m_firstEvent;
int m_lastEvent;
int m_action;
int m_evtCount;
};

namespace callgrind {
class Profiler : public edm::one::EDAnalyzer<> {
public:
explicit Profiler(const edm::ParameterSet&);
~Profiler() override;

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

// ----------member data ---------------------------
int m_firstEvent;
int m_lastEvent;
int m_action;
int m_evtCount;
};
} // namespace callgrind
using namespace callgrind;
//
// constants, enums and typedefs
//
Expand Down
4 changes: 2 additions & 2 deletions PerfTools/Callgrind/plugins/ProfilerAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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

#include "FWCore/Framework/interface/MakerMacros.h"

Expand All @@ -33,7 +33,7 @@
//
// class declaration
//
class ProfilerAnalyzer : public edm::EDAnalyzer {
class ProfilerAnalyzer : public edm::one::EDAnalyzer<> {
public:
explicit ProfilerAnalyzer(const edm::ParameterSet&);
~ProfilerAnalyzer() override;
Expand Down

0 comments on commit 4374a43

Please sign in to comment.