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

Moved modules in RecoJets/JetAnalyzers to thread-friendly types #36406

Merged
merged 1 commit into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/CMSDAS11DijetAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

#include "DataFormats/JetReco/interface/CaloJetCollection.h"

Expand All @@ -17,7 +17,7 @@
class TH1D;
class TH2D;

class CMSDAS11DijetAnalyzer : public edm::EDAnalyzer {
class CMSDAS11DijetAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
CMSDAS11DijetAnalyzer(const edm::ParameterSet&);
void analyze(const edm::Event&, const edm::EventSetup&) override;
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/CMSDAS11DijetTestAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

#include "DataFormats/JetReco/interface/CaloJetCollection.h"

Expand All @@ -17,7 +17,7 @@
class TH1D;
class TH2D;

class CMSDAS11DijetTestAnalyzer : public edm::EDAnalyzer {
class CMSDAS11DijetTestAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
CMSDAS11DijetTestAnalyzer(const edm::ParameterSet&);
void analyze(const edm::Event&, const edm::EventSetup&) override;
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/CaloTowersExample.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* \version 1
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

class TFile;

class CaloTowersExample : public edm::EDAnalyzer {
class CaloTowersExample : public edm::one::EDAnalyzer<> {
public:
CaloTowersExample(const edm::ParameterSet&);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/DijetMass.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ class TFile;
Modified and cleaned up to work in 3.3.X
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

template <class Jet>
class DijetMass : public edm::EDAnalyzer {
class DijetMass : public edm::one::EDAnalyzer<> {
public:
DijetMass(const edm::ParameterSet&);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/DijetRatio.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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 Down Expand Up @@ -118,7 +118,7 @@ void histoFill(TH1F* jetHisto[], edm::Handle<R> jetsRec, double eta1, double eta
// class decleration
//
template <class Jet>
class DijetRatio : public edm::EDAnalyzer {
class DijetRatio : public edm::one::EDAnalyzer<> {
public:
explicit DijetRatio(const edm::ParameterSet&);
~DijetRatio() override;
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/JetAnaPythia.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
#include "TNamed.h"
#include <vector>
#include <map>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

template <class Jet>
class JetAnaPythia : public edm::EDAnalyzer {
class JetAnaPythia : public edm::one::EDAnalyzer<> {
public:
JetAnaPythia(edm::ParameterSet const& cfg);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/JetCorExample.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "TNamed.h"
#include <vector>
#include <map>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

template <class Jet>
class JetCorExample : public edm::EDAnalyzer {
class JetCorExample : public edm::one::EDAnalyzer<> {
public:
JetCorExample(edm::ParameterSet const& cfg);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/JetPlotsExample.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "TNamed.h"
#include <vector>
#include <map>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

template <class Jet>
class JetPlotsExample : public edm::EDAnalyzer {
class JetPlotsExample : public edm::one::EDAnalyzer<> {
public:
JetPlotsExample(edm::ParameterSet const& cfg);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/JetToDigiDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
* \version 1
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

class JetToDigiDump : public edm::EDAnalyzer {
class JetToDigiDump : public edm::one::EDAnalyzer<> {
public:
JetToDigiDump(const edm::ParameterSet&);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/JetValidation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "TNamed.h"
#include <vector>
#include <map>
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

class JetValidation : public edm::EDAnalyzer {
class JetValidation : public edm::one::EDAnalyzer<> {
public:
JetValidation(edm::ParameterSet const& cfg);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/SimpleJetDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
* \version 1
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

class SimpleJetDump : public edm::EDAnalyzer {
class SimpleJetDump : public edm::one::EDAnalyzer<> {
public:
SimpleJetDump(const edm::ParameterSet&);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/myFastSimVal.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
* \version 1
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

class TFile;

class myFastSimVal : public edm::EDAnalyzer {
class myFastSimVal : public edm::one::EDAnalyzer<> {
public:
myFastSimVal(const edm::ParameterSet&);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/interface/myRawAna.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
* \version 1
*
*/
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "CommonTools/UtilAlgos/interface/TFileService.h"

// class TFile;

class myRawAna : public edm::EDAnalyzer {
class myRawAna : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
myRawAna(const edm::ParameterSet&);

Expand Down
22 changes: 0 additions & 22 deletions RecoJets/JetAnalyzers/interface/ptHatFilter.h

This file was deleted.

4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/src/CMSDAS11DijetAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
#include <TH1D.h>

CMSDAS11DijetAnalyzer::CMSDAS11DijetAnalyzer(edm::ParameterSet const& params)
: edm::EDAnalyzer(),
jetSrc(params.getParameter<edm::InputTag>("jetSrc")),
: jetSrc(params.getParameter<edm::InputTag>("jetSrc")),
vertexSrc(params.getParameter<edm::InputTag>("vertexSrc")),
jetCorrections(params.getParameter<std::string>("jetCorrections")),
innerDeltaEta(params.getParameter<double>("innerDeltaEta")),
outerDeltaEta(params.getParameter<double>("outerDeltaEta")),
JESbias(params.getParameter<double>("JESbias")) {
// setup file service
usesResource(TFileService::kSharedResource);
edm::Service<TFileService> fs;

const int NBINS = 36;
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/src/CMSDAS11DijetTestAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
#include <TH2D.h>

CMSDAS11DijetTestAnalyzer::CMSDAS11DijetTestAnalyzer(edm::ParameterSet const& params)
: edm::EDAnalyzer(),
jetSrc(params.getParameter<edm::InputTag>("jetSrc")),
: jetSrc(params.getParameter<edm::InputTag>("jetSrc")),
vertexSrc(params.getParameter<edm::InputTag>("vertexSrc")),
jetCorrections(params.getParameter<std::string>("jetCorrections")),
innerDeltaEta(params.getParameter<double>("innerDeltaEta")),
outerDeltaEta(params.getParameter<double>("outerDeltaEta")),
JESbias(params.getParameter<double>("JESbias")) {
// setup file service
usesResource(TFileService::kSharedResource);
edm::Service<TFileService> fs;

const int NBINS = 36;
Expand Down
5 changes: 3 additions & 2 deletions RecoJets/JetAnalyzers/src/CalcTopMassExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
Expand Down Expand Up @@ -52,7 +52,7 @@
#include <Math/VectorUtil.h>
#include <TMath.h>

class calcTopMass : public edm::EDAnalyzer {
class calcTopMass : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
explicit calcTopMass(const edm::ParameterSet &);
~calcTopMass() override{};
Expand Down Expand Up @@ -94,6 +94,7 @@ calcTopMass::calcTopMass(const edm::ParameterSet &iConfig) {
cMass = 1.5;
qMass = 0.3;

usesResource(TFileService::kSharedResource);
Service<TFileService> fs;
hMassNoCorr = fs->make<TH1F>("hMassNoCorr", "", 100, 100, 300);
hMassCorFl0 = fs->make<TH1F>("hMassCorFl0", "", 100, 100, 300);
Expand Down
5 changes: 3 additions & 2 deletions RecoJets/JetAnalyzers/src/FFTJetImageRecorder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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 @@ -44,7 +44,7 @@
//
// class declaration
//
class FFTJetImageRecorder : public edm::EDAnalyzer {
class FFTJetImageRecorder : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
explicit FFTJetImageRecorder(const edm::ParameterSet&);
FFTJetImageRecorder() = delete;
Expand All @@ -69,6 +69,7 @@ class FFTJetImageRecorder : public edm::EDAnalyzer {
FFTJetImageRecorder::FFTJetImageRecorder(const edm::ParameterSet& ps)
: init_param(edm::InputTag, histoLabel), counter(0) {
histoToken = consumes<TH3F>(histoLabel);
usesResource(TFileService::kSharedResource);
}

FFTJetImageRecorder::~FFTJetImageRecorder() {}
Expand Down
6 changes: 4 additions & 2 deletions RecoJets/JetAnalyzers/src/FFTJetPileupAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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"
#include "FWCore/ServiceRegistry/interface/Service.h"
Expand All @@ -49,7 +49,7 @@
//
// class declaration
//
class FFTJetPileupAnalyzer : public edm::EDAnalyzer {
class FFTJetPileupAnalyzer : public edm::one::EDAnalyzer<edm::one::SharedResources> {
public:
explicit FFTJetPileupAnalyzer(const edm::ParameterSet&);
FFTJetPileupAnalyzer() = delete;
Expand Down Expand Up @@ -133,6 +133,8 @@ FFTJetPileupAnalyzer::FFTJetPileupAnalyzer(const edm::ParameterSet& ps)
totalNpu(-1),
totalNPV(-1),
counter(0) {
usesResource(TFileService::kSharedResource);

if (collectPileup || collectOOTPileup)
pileupToken = consumes<std::vector<PileupSummaryInfo> >(pileupLabel);

Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/src/FlavorJetCorrectionExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

#include <string>

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Utilities/interface/InputTag.h"

class FlavorJetCorrectionExample : public edm::EDAnalyzer {
class FlavorJetCorrectionExample : public edm::one::EDAnalyzer<> {
public:
explicit FlavorJetCorrectionExample(const edm::ParameterSet& fParameters);
~FlavorJetCorrectionExample() override {}
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/src/JetIdSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "PhysicsTools/SelectorUtils/interface/JetIDSelectionFunctor.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/one/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand Down Expand Up @@ -56,7 +56,7 @@
// class definition
////////////////////////////////////////////////////////////////////////////////
template <typename T>
class JetIdSelector : public edm::EDProducer {
class JetIdSelector : public edm::one::EDProducer<> {
public:
typedef std::vector<T> JetCollection;
// construction/destruction
Expand Down
4 changes: 2 additions & 2 deletions RecoJets/JetAnalyzers/src/PartonJetCorrectionExample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

#include <string>

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Utilities/interface/InputTag.h"

class PartonJetCorrectionExample : public edm::EDAnalyzer {
class PartonJetCorrectionExample : public edm::one::EDAnalyzer<> {
public:
explicit PartonJetCorrectionExample(const edm::ParameterSet& fParameters);
~PartonJetCorrectionExample() override {}
Expand Down
2 changes: 1 addition & 1 deletion RecoJets/JetAnalyzers/src/myRawAna.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ using namespace std;
// Nothing passed from .cfg yet, but I leave the syntax here for
// future reference.

myRawAna::myRawAna(const ParameterSet& cfg) {}
myRawAna::myRawAna(const ParameterSet& cfg) { usesResource(TFileService::kSharedResource); }

// ************************
// ************************
Expand Down
Loading