Skip to content

Commit

Permalink
Complete migration of TrackClassifier to esConsumes()
Browse files Browse the repository at this point in the history
  • Loading branch information
makortel committed Aug 17, 2021
1 parent f24ac41 commit 973fb0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions SimTracker/TrackHistory/interface/TrackClassifier.h
Expand Up @@ -74,6 +74,7 @@ class TrackClassifier : public TrackCategories {
edm::Handle<edm::HepMCProduct> mcInformation_;

edm::ESHandle<ParticleDataTable> particleDataTable_;
edm::ESGetToken<ParticleDataTable, PDTRecord> particleDataTableToken_;

edm::ESHandle<TransientTrackBuilder> transientTrackBuilder_;
edm::ESGetToken<TransientTrackBuilder, TransientTrackRecord> transientTrackBuilderToken_;
Expand Down
3 changes: 2 additions & 1 deletion SimTracker/TrackHistory/src/TrackClassifier.cc
Expand Up @@ -19,6 +19,7 @@ TrackClassifier::TrackClassifier(edm::ParameterSet const &config, edm::ConsumesC
tracer_(config, std::move(collector)),
quality_(config, collector),
magneticFieldToken_(collector.esConsumes<MagneticField, IdealMagneticFieldRecord>()),
particleDataTableToken_(collector.esConsumes()),
transientTrackBuilderToken_(collector.esConsumes<TransientTrackBuilder, TransientTrackRecord>()),
tTopoHandToken_(collector.esConsumes<TrackerTopology, TrackerTopologyRcd>()) {
collector.consumes<edm::HepMCProduct>(hepMCLabel_);
Expand Down Expand Up @@ -58,7 +59,7 @@ void TrackClassifier::newEvent(edm::Event const &event, edm::EventSetup const &s
magneticField_ = setup.getHandle(magneticFieldToken_);

// Get the partivle data table
setup.getData(particleDataTable_);
particleDataTable_ = setup.getHandle(particleDataTableToken_);

// get the beam spot
event.getByLabel(beamSpotLabel_, beamSpot_);
Expand Down

0 comments on commit 973fb0f

Please sign in to comment.