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-sim113 Take care of deprecated codes in FastSimulation/Validation #37202

Merged
merged 2 commits into from Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 7 additions & 8 deletions FastSimulation/Validation/plugins/EmptySimHits.cc
@@ -1,7 +1,7 @@
#include <memory>

#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/MakerMacros.h"
Expand All @@ -11,7 +11,7 @@
#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"

class EmptySimHits : public edm::EDProducer {
class EmptySimHits : public edm::one::EDProducer<> {
public:
explicit EmptySimHits(const edm::ParameterSet&);
~EmptySimHits() override{};
Expand All @@ -23,14 +23,13 @@ class EmptySimHits : public edm::EDProducer {
void produce(edm::Event&, const edm::EventSetup&) override;
void endJob() override{};

std::vector<std::string> pCaloHitInstanceLabels;
std::vector<std::string> pSimHitInstanceLabels;
const std::vector<std::string> pSimHitInstanceLabels;
const std::vector<std::string> pCaloHitInstanceLabels;
};

EmptySimHits::EmptySimHits(const edm::ParameterSet& iConfig) {
pSimHitInstanceLabels = iConfig.getParameter<std::vector<std::string> >("pSimHitInstanceLabels");
pCaloHitInstanceLabels = iConfig.getParameter<std::vector<std::string> >("pCaloHitInstanceLabels");

EmptySimHits::EmptySimHits(const edm::ParameterSet& iConfig)
: pSimHitInstanceLabels(iConfig.getParameter<std::vector<std::string> >("pSimHitInstanceLabels")),
pCaloHitInstanceLabels(iConfig.getParameter<std::vector<std::string> >("pCaloHitInstanceLabels")) {
for (size_t i = 0; i < pSimHitInstanceLabels.size(); i++) {
produces<edm::PSimHitContainer>(pSimHitInstanceLabels[i]);
}
Expand Down