Skip to content

Commit 030bf94

Browse files
committed
add a fillDescription method to TrackFromSeedProducer
1 parent bb504e8 commit 030bf94

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

Validation/RecoTrack/plugins/TrackFromSeedProducer.cc

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
class TrackFromSeedProducer : public edm::global::EDProducer<> {
5151
public:
5252
explicit TrackFromSeedProducer(const edm::ParameterSet&);
53-
~TrackFromSeedProducer() override;
53+
~TrackFromSeedProducer() override = default;
5454

5555
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
5656

@@ -66,14 +66,6 @@ class TrackFromSeedProducer : public edm::global::EDProducer<> {
6666
const edm::ESGetToken<TransientTrackingRecHitBuilder, TransientRecHitRecord> ttrhToken_;
6767
};
6868

69-
//
70-
// constants, enums and typedefs
71-
//
72-
73-
//
74-
// static data member definitions
75-
//
76-
7769
//
7870
// constructors and destructor
7971
//
@@ -88,16 +80,14 @@ TrackFromSeedProducer::TrackFromSeedProducer(const edm::ParameterSet& iConfig)
8880
produces<reco::TrackExtraCollection>();
8981

9082
// read parametes
91-
edm::InputTag seedsTag(iConfig.getParameter<edm::InputTag>("src"));
92-
edm::InputTag beamSpotTag(iConfig.getParameter<edm::InputTag>("beamSpot"));
83+
const edm::InputTag seedsTag(iConfig.getParameter<edm::InputTag>("src"));
84+
const edm::InputTag beamSpotTag(iConfig.getParameter<edm::InputTag>("beamSpot"));
9385

9486
//consumes
9587
seedsToken = consumes<edm::View<TrajectorySeed> >(seedsTag);
9688
beamSpotToken = consumes<reco::BeamSpot>(beamSpotTag);
9789
}
9890

99-
TrackFromSeedProducer::~TrackFromSeedProducer() {}
100-
10191
// ------------ method called to produce the data ------------
10292
void TrackFromSeedProducer::produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const {
10393
using namespace edm;
@@ -189,13 +179,12 @@ void TrackFromSeedProducer::produce(edm::StreamID, edm::Event& iEvent, const edm
189179
iEvent.put(std::move(trackextras));
190180
}
191181

192-
// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
193182
void TrackFromSeedProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
194-
//The following says we do not know what parameters are allowed so do no validation
195-
// Please change this to state exactly what you do use, even if it is no parameters
196183
edm::ParameterSetDescription desc;
197-
desc.setUnknown();
198-
descriptions.addDefault(desc);
184+
desc.add<std::string>("TTRHBuilder", {});
185+
desc.add<edm::InputTag>("src", edm::InputTag(""));
186+
desc.add<edm::InputTag>("beamSpot", edm::InputTag(""));
187+
descriptions.addWithDefaultLabel(desc);
199188
}
200189

201190
//define this as a plug-in

0 commit comments

Comments
 (0)