Skip to content

Commit ffca428

Browse files
committed
Fused class, header and SealModule.cc file.
cms-sw#31722 (comment)
1 parent f46ac64 commit ffca428

3 files changed

Lines changed: 46 additions & 60 deletions

File tree

RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.cc

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,61 @@
1515
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
1616
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
1717

18-
#include "PixelTrackProducer.h"
18+
#include "FWCore/Framework/interface/stream/EDProducer.h"
19+
#include "RecoPixelVertexing/PixelTrackFitting/interface/PixelTrackReconstruction.h"
20+
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
1921
#include "storeTracks.h"
2022

23+
#include "FWCore/PluginManager/interface/ModuleDef.h"
24+
#include "FWCore/Framework/interface/MakerMacros.h"
25+
26+
namespace edm {
27+
class Event;
28+
class EventSetup;
29+
class ParameterSet;
30+
class ConfigurationDescriptions;
31+
} // namespace edm
32+
class TrackerTopology;
33+
2134
using namespace pixeltrackfitting;
2235
using edm::ParameterSet;
2336

24-
PixelTrackProducer::PixelTrackProducer(const ParameterSet& cfg)
25-
: theReconstruction(cfg, consumesCollector()),
26-
htTopoToken_(esConsumes()) {
27-
edm::LogInfo("PixelTrackProducer") << " construction...";
28-
produces<reco::TrackCollection>();
29-
produces<TrackingRecHitCollection>();
30-
produces<reco::TrackExtraCollection>();
31-
}
37+
class PixelTrackProducer : public edm::stream::EDProducer<> {
38+
public:
39+
explicit PixelTrackProducer(const edm::ParameterSet& cfg)
40+
: theReconstruction(cfg, consumesCollector()),
41+
htTopoToken_(esConsumes()) {
42+
edm::LogInfo("PixelTrackProducer") << " construction...";
43+
produces<reco::TrackCollection>();
44+
produces<TrackingRecHitCollection>();
45+
produces<reco::TrackExtraCollection>();
46+
}
47+
48+
~PixelTrackProducer() override {}
49+
50+
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
51+
edm::ParameterSetDescription desc;
3252

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

35-
void PixelTrackProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
36-
edm::ParameterSetDescription desc;
56+
descriptions.add("pixelTracks", desc);
57+
}
3758

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

41-
descriptions.add("pixelTracks", desc);
42-
}
62+
TracksWithTTRHs tracks;
63+
theReconstruction.run(tracks, ev, es);
64+
auto htTopo = es.getData(htTopoToken_);
4365

44-
void PixelTrackProducer::produce(edm::Event& ev, const edm::EventSetup& es) {
45-
LogDebug("PixelTrackProducer, produce") << "event# :" << ev.id();
66+
// store tracks
67+
storeTracks(ev, tracks, htTopo);
68+
}
4669

47-
TracksWithTTRHs tracks;
48-
theReconstruction.run(tracks, ev, es);
49-
auto htTopo = es.getData(htTopoToken_);
70+
private:
71+
PixelTrackReconstruction theReconstruction;
72+
const edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> htTopoToken_;
73+
};
5074

51-
// store tracks
52-
storeTracks(ev, tracks, htTopo);
53-
}
75+
DEFINE_FWK_MODULE(PixelTrackProducer);

RecoPixelVertexing/PixelTrackFitting/plugins/PixelTrackProducer.h

Lines changed: 0 additions & 31 deletions
This file was deleted.

RecoPixelVertexing/PixelTrackFitting/plugins/SealModule.cc

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)