diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc b/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc index a276af79b0945..87220633c9a43 100644 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc +++ b/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc @@ -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(); - produces(); - produces(); -} +class PixelTrackProducer : public edm::stream::EDProducer<> { +public: + explicit PixelTrackProducer(const edm::ParameterSet& cfg) + : theReconstruction(cfg, consumesCollector()), + htTopoToken_(esConsumes()) { + edm::LogInfo("PixelTrackProducer") << " construction..."; + produces(); + produces(); + produces(); + } + + ~PixelTrackProducer() override {} + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; -PixelTrackProducer::~PixelTrackProducer() {} + desc.add("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("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 htTopoToken_; +}; - // store tracks - storeTracks(ev, tracks, htTopo); -} +DEFINE_FWK_MODULE(PixelTrackProducer); diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.h b/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.h deleted file mode 100644 index 0d492f979f3aa..0000000000000 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef RecoPixelVertexing_PixelTrackFitting_plugins_PixelTrackProducer_h -#define RecoPixelVertexing_PixelTrackFitting_plugins_PixelTrackProducer_h - -#include "FWCore/Framework/interface/stream/EDProducer.h" -#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h" -#include "Geometry/Records/interface/TrackerTopologyRcd.h" - -namespace edm { - class Event; - class EventSetup; - class ParameterSet; - class ConfigurationDescriptions; -} // namespace edm -class TrackerTopology; - -class PixelTrackProducer : public edm::stream::EDProducer<> { -public: - explicit PixelTrackProducer(const edm::ParameterSet& conf); - - ~PixelTrackProducer() override; - - static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); - - void produce(edm::Event& ev, const edm::EventSetup& es) override; - -private: - PixelTrackReconstruction theReconstruction; - const edm::ESGetToken htTopoToken_; -}; - -#endif // RecoPixelVertexing_PixelTrackFitting_plugins_PixelTrackProducer_h diff --git a/RecoPixelVertexing/PixelTrackFitting/plugins/SealModule.cc b/RecoPixelVertexing/PixelTrackFitting/plugins/SealModule.cc deleted file mode 100644 index 11a4c3e12c308..0000000000000 --- a/RecoPixelVertexing/PixelTrackFitting/plugins/SealModule.cc +++ /dev/null @@ -1,5 +0,0 @@ -#include "FWCore/PluginManager/interface/ModuleDef.h" -#include "FWCore/Framework/interface/MakerMacros.h" - -#include "PixelTrackProducer.h" -DEFINE_FWK_MODULE(PixelTrackProducer);