Skip to content

Commit

Permalink
Modified PixelTrackProducer class to use esConsume(). (cms-sw#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcano committed May 26, 2021
1 parent 01043c8 commit e783810
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
using namespace pixeltrackfitting;
using edm::ParameterSet;

PixelTrackProducer::PixelTrackProducer(const ParameterSet& cfg) : theReconstruction(cfg, consumesCollector()) {
PixelTrackProducer::PixelTrackProducer(const ParameterSet& cfg)
: theReconstruction(cfg, consumesCollector()),
htTopoToken_(esConsumes()) {
edm::LogInfo("PixelTrackProducer") << " construction...";
produces<reco::TrackCollection>();
produces<TrackingRecHitCollection>();
Expand All @@ -44,9 +46,8 @@ void PixelTrackProducer::produce(edm::Event& ev, const edm::EventSetup& es) {

TracksWithTTRHs tracks;
theReconstruction.run(tracks, ev, es);
edm::ESHandle<TrackerTopology> httopo;
es.get<TrackerTopologyRcd>().get(httopo);
auto htTopo = es.getData(htTopoToken_);

// store tracks
storeTracks(ev, tracks, *httopo);
storeTracks(ev, tracks, htTopo);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"

namespace edm {
class Event;
Expand All @@ -24,6 +25,7 @@ class PixelTrackProducer : public edm::stream::EDProducer<> {

private:
PixelTrackReconstruction theReconstruction;
const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> htTopoToken_;
};

#endif // RecoPixelVertexing_PixelTrackFitting_plugins_PixelTrackProducer_h

0 comments on commit e783810

Please sign in to comment.