CMS 3D CMS Logo

KFFittingSmootherESProducer.cc
Go to the documentation of this file.
1 
2 
3 // to be included only here...
4 #include "KFFittingSmoother.h"
5 
7 
10 
11 namespace {
12 
13  class KFFittingSmootherESProducer final : public edm::ESProducer {
14  public:
16  std::string myname = p.getParameter<std::string>("ComponentName");
17  setWhatProduced(this, myname)
18  .setConsumes(fitToken_, edm::ESInputTag("", pset_.getParameter<std::string>("Fitter")))
19  .setConsumes(smoothToken_, edm::ESInputTag("", pset_.getParameter<std::string>("Smoother")));
20  }
21 
22  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
24  desc.add<std::string>("ComponentName", "KFFittingSmoother");
25  desc.add<std::string>("Fitter", "KFFitter");
26  desc.add<std::string>("Smoother", "KFSmoother");
28  descriptions.add("KFFittingSmoother", desc);
29  }
30 
31  std::unique_ptr<TrajectoryFitter> produce(const TrajectoryFitterRecord& iRecord) {
32  return std::make_unique<KFFittingSmoother>(iRecord.get(fitToken_), iRecord.get(smoothToken_), pset_);
33  }
34 
35  private:
39  };
40 } // namespace
41 
43 
44 DEFINE_FWK_EVENTSETUP_MODULE(KFFittingSmootherESProducer);
edm::ESInputTag
Definition: ESInputTag.h:87
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
KFFittingSmoother.h
ESHandle.h
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ESProducer.h
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TrajectoryFitterRecord
Definition: TrajectoryFitterRecord.h:12
TrajectoryFitterRecord.h
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:112
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:36
KFFittingSmootherESProducer::pset_
edm::ParameterSet pset_
Definition: KFFittingSmootherESProducer.h:22
edm::ESGetToken
Definition: EventSetup.h:48
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ModuleFactory.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
edm::ESProducer
Definition: ESProducer.h:101
KFFittingSmootherESProducer::KFFittingSmootherESProducer
KFFittingSmootherESProducer(const edm::ParameterSet &p)
KFFittingSmootherESProducer::produce
std::unique_ptr< TrajectoryFitter > produce(const TrajectoryFitterRecord &)