Skip to content

Commit 4651541

Browse files
committed
Added esConsumes to VertexClassifier
1 parent a120849 commit 4651541

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

SimTracker/TrackHistory/interface/VertexClassifier.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class VertexClassifier : public VertexCategories {
2121
typedef VertexCategories Categories;
2222

2323
//! Constructor by ParameterSet
24-
VertexClassifier(edm::ParameterSet const &pset, edm::ConsumesCollector &&);
24+
VertexClassifier(edm::ParameterSet const &pset, edm::ConsumesCollector);
2525

2626
virtual ~VertexClassifier() {}
2727

@@ -53,6 +53,7 @@ class VertexClassifier : public VertexCategories {
5353
edm::Handle<edm::HepMCProduct> mcInformation_;
5454

5555
edm::ESHandle<ParticleDataTable> particleDataTable_;
56+
edm::ESGetToken<ParticleDataTable, edm::DefaultRecord> particleDataTableToken_;
5657

5758
//! Get reconstruction information
5859
void reconstructionInformation(reco::TrackBaseRef const &);

SimTracker/TrackHistory/src/VertexClassifier.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
(a) = (a) | (b); \
1616
} while (0)
1717

18-
VertexClassifier::VertexClassifier(edm::ParameterSet const &config, edm::ConsumesCollector &&collector)
18+
VertexClassifier::VertexClassifier(edm::ParameterSet const &config, edm::ConsumesCollector collector)
1919
: VertexCategories(),
20-
tracer_(config, std::move(collector)),
21-
hepMCLabel_(config.getUntrackedParameter<edm::InputTag>("hepMC")) {
20+
tracer_(config, collector),
21+
hepMCLabel_(config.getUntrackedParameter<edm::InputTag>("hepMC")),
22+
particleDataTableToken_(collector.esConsumes()) {
2223
collector.consumes<edm::HepMCProduct>(hepMCLabel_);
2324
// Set the history depth after hadronization
2425
tracer_.depth(-2);
@@ -38,7 +39,7 @@ void VertexClassifier::newEvent(edm::Event const &event, edm::EventSetup const &
3839
event.getByLabel(hepMCLabel_, mcInformation_);
3940

4041
// Get the partivle data table
41-
setup.getData(particleDataTable_);
42+
particleDataTable_ = setup.getHandle(particleDataTableToken_);
4243

4344
// Create the list of primary vertices associated to the event
4445
genPrimaryVertices();

0 commit comments

Comments
 (0)