Skip to content

Commit

Permalink
migrate Validation/SiOuterTrackerV to esConsumes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Mar 21, 2021
1 parent 90a9395 commit 0b80e87
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// constructors and destructor
//
OuterTrackerMonitorTrackingParticles::OuterTrackerMonitorTrackingParticles(const edm::ParameterSet &iConfig)
: conf_(iConfig) {
: m_topoToken(esConsumes()), conf_(iConfig) {
topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
trackingParticleToken_ =
consumes<std::vector<TrackingParticle>>(conf_.getParameter<edm::InputTag>("trackingParticleToken"));
Expand Down Expand Up @@ -80,9 +80,7 @@ void OuterTrackerMonitorTrackingParticles::analyze(const edm::Event &iEvent, con
iEvent.getByToken(ttStubMCTruthToken_, MCTruthTTStubHandle);

// Geometries
edm::ESHandle<TrackerTopology> tTopoHandle;
iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
const TrackerTopology *const tTopo = tTopoHandle.product();
const TrackerTopology *const tTopo = &iSetup.getData(m_topoToken);

// Loop over tracking particles
int this_tp = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ class OuterTrackerMonitorTrackingParticles : public DQMEDAnalyzer {
MonitorElement *resd0_eta2to2p4 = nullptr;

private:
const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> m_topoToken;
edm::ParameterSet conf_;
edm::EDGetTokenT<std::vector<TrackingParticle>> trackingParticleToken_;
edm::EDGetTokenT<TTClusterAssociationMap<Ref_Phase2TrackerDigi_>>
Expand Down
4 changes: 2 additions & 2 deletions Validation/TrackerRecHits/src/SiStripRecHitsValid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,8 @@ void SiStripRecHitsValid::rechitanalysis(SiStripRecHit2D const rechit,
closest = &m;
}
}
if(!closest)

if (!closest)
return;

rechitpro.bunch = closest->eventId().bunchCrossing();
Expand Down

0 comments on commit 0b80e87

Please sign in to comment.