Skip to content

Commit

Permalink
Fused class, header and SealModule.cc file.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericcano committed May 26, 2021
1 parent 323eca7 commit 4ed484d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 60 deletions.
70 changes: 46 additions & 24 deletions RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,61 @@
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"

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

#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"

namespace edm {
class Event;
class EventSetup;
class ParameterSet;
class ConfigurationDescriptions;
} // namespace edm
class TrackerTopology;

using namespace pixeltrackfitting;
using edm::ParameterSet;

PixelTrackProducer::PixelTrackProducer(const ParameterSet& cfg)
: theReconstruction(cfg, consumesCollector()),
htTopoToken_(esConsumes()) {
edm::LogInfo("PixelTrackProducer") << " construction...";
produces<reco::TrackCollection>();
produces<TrackingRecHitCollection>();
produces<reco::TrackExtraCollection>();
}
class PixelTrackProducer : public edm::stream::EDProducer<> {
public:
explicit PixelTrackProducer(const edm::ParameterSet& cfg)
: theReconstruction(cfg, consumesCollector()),
htTopoToken_(esConsumes()) {
edm::LogInfo("PixelTrackProducer") << " construction...";
produces<reco::TrackCollection>();
produces<TrackingRecHitCollection>();
produces<reco::TrackExtraCollection>();
}

~PixelTrackProducer() override {}

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;

PixelTrackProducer::~PixelTrackProducer() {}
desc.add<std::string>("passLabel", "pixelTracks"); // What is this? It is not used anywhere in this code.
PixelTrackReconstruction::fillDescriptions(desc);

void PixelTrackProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
descriptions.add("pixelTracks", desc);
}

desc.add<std::string>("passLabel", "pixelTracks"); // What is this? It is not used anywhere in this code.
PixelTrackReconstruction::fillDescriptions(desc);
void produce(edm::Event& ev, const edm::EventSetup& es) override {
LogDebug("PixelTrackProducer, produce") << "event# :" << ev.id();

descriptions.add("pixelTracks", desc);
}
TracksWithTTRHs tracks;
theReconstruction.run(tracks, ev, es);
auto htTopo = es.getData(htTopoToken_);

void PixelTrackProducer::produce(edm::Event& ev, const edm::EventSetup& es) {
LogDebug("PixelTrackProducer, produce") << "event# :" << ev.id();
// store tracks
storeTracks(ev, tracks, htTopo);
}

TracksWithTTRHs tracks;
theReconstruction.run(tracks, ev, es);
auto htTopo = es.getData(htTopoToken_);
private:
PixelTrackReconstruction theReconstruction;
const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> htTopoToken_;
};

// store tracks
storeTracks(ev, tracks, htTopo);
}
DEFINE_FWK_MODULE(PixelTrackProducer);
31 changes: 0 additions & 31 deletions RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.h

This file was deleted.

5 changes: 0 additions & 5 deletions RecoPixelVertexing/PixelTrackFitting/plugins/SealModule.cc

This file was deleted.

0 comments on commit 4ed484d

Please sign in to comment.