CMS 3D CMS Logo

PixelTrackCleanerBySharedHitsESProducer.cc
Go to the documentation of this file.
1 // user include files
4 
6 
8 public:
10  ~PixelTrackCleanerBySharedHitsESProducer() override = default;
11 
12  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
13 
14  std::unique_ptr<PixelTrackCleaner> produce(const PixelTrackCleaner::Record& iRecord);
15 
16 private:
17  const bool useQuadrupletAlgo_;
18 };
19 
21  : useQuadrupletAlgo_(iConfig.getParameter<bool>("useQuadrupletAlgo")) {
22  auto componentName = iConfig.getParameter<std::string>("ComponentName");
23  setWhatProduced(this, componentName);
24 }
25 
28  desc.add<std::string>("ComponentName", "pixelTrackCleanerBySharedHits");
29  desc.add<bool>("useQuadrupletAlgo", false);
30  descriptions.add("pixelTrackCleanerBySharedHits", desc);
31 }
32 
33 std::unique_ptr<PixelTrackCleaner> PixelTrackCleanerBySharedHitsESProducer::produce(
34  const PixelTrackCleaner::Record& iRecord) {
35  return std::make_unique<PixelTrackCleanerBySharedHits>(useQuadrupletAlgo_);
36 }
37 
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:166
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< PixelTrackCleaner > produce(const PixelTrackCleaner::Record &iRecord)
~PixelTrackCleanerBySharedHitsESProducer() override=default
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
PixelTrackCleanerBySharedHitsESProducer(const edm::ParameterSet &iConfig)