CMS 3D CMS Logo

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