Skip to content

Commit

Permalink
Merge pull request #37202 from bsunanda/Run3-sim113
Browse files Browse the repository at this point in the history
Run3-sim113 Take care of deprecated codes in FastSimulation/Validation
  • Loading branch information
cmsbuild authored Mar 23, 2022
2 parents f0e9e3e + dfaa9eb commit 8be9169
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions FastSimulation/Validation/plugins/EmptySimHits.cc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8be9169

Please sign in to comment.