CMS 3D CMS Logo

KFFittingSmootherESProducer.cc
Go to the documentation of this file.
1 
2 
3 
4 // to be included only here...
5 #include "KFFittingSmoother.h"
6 
7 
8 
10 
13 
14 
15 
16 namespace {
17 
18  class KFFittingSmootherESProducer final: public edm::ESProducer{
19  public:
21  {
22  std::string myname = p.getParameter<std::string>("ComponentName");
23  pset_ = p;
24  setWhatProduced(this,myname);
25  }
26 
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
30  desc.add<std::string>("ComponentName","KFFittingSmoother");
31  desc.add<std::string>("Fitter","KFFitter");
32  desc.add<std::string>("Smoother","KFSmoother");
34  descriptions.add("KFFittingSmoother", desc);
35  }
36 
37 
38  ~KFFittingSmootherESProducer() override {}
39 
40  std::unique_ptr<TrajectoryFitter>
41  produce(const TrajectoryFitterRecord & iRecord){
42 
43 
46 
47  iRecord.get(pset_.getParameter<std::string>("Fitter"), fit);
48  iRecord.get(pset_.getParameter<std::string>("Smoother"), smooth);
49 
50  return std::make_unique<KFFittingSmoother>(*fit.product(), *smooth.product(),pset_);
51  }
52 
53  private:
55  };
56 }
57 
59 
60 DEFINE_FWK_EVENTSETUP_MODULE(KFFittingSmootherESProducer);
T getParameter(std::string const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
void get(HolderT &iHolder) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
KFFittingSmootherESProducer(const edm::ParameterSet &p)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::unique_ptr< TrajectoryFitter > produce(const TrajectoryFitterRecord &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T const * product() const
Definition: ESHandle.h:86