Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run3-Sim101F Avoid compilation warnings in some of the codes of Validation/RecoTau #36608

Merged
merged 3 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Validation/RecoTau/interface/TauTagValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
// user include files

#include "FWCore/Common/interface/Provenance.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand Down
1 change: 0 additions & 1 deletion Validation/RecoTau/interface/TauValidationMiniAOD.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// Original Author: Aniello Spiezia On August 13, 2019
// user include files

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand Down
5 changes: 3 additions & 2 deletions Validation/RecoTau/plugins/DQMFileLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

// framework & common header files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -21,7 +21,7 @@
#include <vector>
#include <string>

class TauDQMFileLoader : public edm::EDAnalyzer {
class TauDQMFileLoader : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the direct use of DQMStore safe in non-legacy modules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it is not. I leave the author of the code to make use of DQM codes``

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, to me, it would make more sense to leave these modules as legacy and migrate them properly (or remove) later rather than enabling unsafe code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done that


Expand All @@ -42,6 +42,7 @@ class TauDQMFileLoader : public edm::EDAnalyzer {
~TauDQMFileLoader() override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void endJob() override {}
void beginRun(edm::Run const&, edm::EventSetup const&) override {}
void endRun(const edm::Run& r, const edm::EventSetup& c) override;

private:
Expand Down
1 change: 0 additions & 1 deletion Validation/RecoTau/plugins/DQMHistEffProducer.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/

// framework & common header files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand Down
5 changes: 3 additions & 2 deletions Validation/RecoTau/plugins/DQMHistNormalizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

// framework & common header files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -27,14 +27,15 @@

using namespace std;

class DQMHistNormalizer : public edm::EDAnalyzer {
class DQMHistNormalizer : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module appears to use DQMStore directly too.


explicit DQMHistNormalizer(const edm::ParameterSet&);
~DQMHistNormalizer() override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void beginRun(const edm::Run&, const edm::EventSetup&) override {}
void endRun(const edm::Run& r, const edm::EventSetup& c) override;

private:
Expand Down
5 changes: 3 additions & 2 deletions Validation/RecoTau/plugins/DQMHistPlotter.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*/

// framework & common header files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -24,7 +24,7 @@
#include <vector>
#include <map>

class TauDQMHistPlotter : public edm::EDAnalyzer {
class TauDQMHistPlotter : public edm::one::EDAnalyzer<edm::one::WatchRuns> {
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.


Expand Down Expand Up @@ -157,6 +157,7 @@ class TauDQMHistPlotter : public edm::EDAnalyzer {
explicit TauDQMHistPlotter(const edm::ParameterSet&);
~TauDQMHistPlotter() override;
void analyze(const edm::Event&, const edm::EventSetup&) override;
void beginRun(edm::Run const&, edm::EventSetup const&) override {}
void endRun(const edm::Run& r, const edm::EventSetup& c) override;

private:
Expand Down
4 changes: 2 additions & 2 deletions Validation/RecoTau/plugins/DQMSimpleFileSaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/

// framework & common header files
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -19,7 +19,7 @@

#include <string>

class TauDQMSimpleFileSaver : public edm::EDAnalyzer {
class TauDQMSimpleFileSaver : public edm::one::EDAnalyzer<> {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here.

Expand Down