test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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");
33  KFFittingSmoother::fillDescriptions(desc);
34  descriptions.add("KFFittingSmoother", desc);
35  }
36 
37 
39 
40  boost::shared_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 boost::shared_ptr<TrajectoryFitter>(new KFFittingSmoother(*fit.product(), *smooth.product(),pset_));
51  }
52 
53  private:
54  edm::ParameterSet pset_;
55  };
56 }
57 
59 
T getParameter(std::string const &) const
void get(HolderT &iHolder) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
T const * product() const
Definition: ESHandle.h:86
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
void add(std::string const &label, ParameterSetDescription const &psetDescription)