CMS 3D CMS Logo

TSCBLBuilderWithPropagatorESProducer.cc
Go to the documentation of this file.
1 //
2 // Original Author: Matt Rudolph
3 // Created: Sat Mar 28 20:13:08 CET 2009
4 //
5 //
6 
7 // system include files
8 #include <memory>
9 
10 // user include files
14 
18 
19 //
20 // class decleration
21 //
22 
24 public:
27 
28  typedef std::unique_ptr<TrajectoryStateClosestToBeamLineBuilder> ReturnType;
29 
30  ReturnType produce(const TrackingComponentsRecord&);
31 
32 private:
33  // ----------member data ---------------------------
35 };
36 
37 //
38 // constants, enums and typedefs
39 //
40 
41 //
42 // static data member definitions
43 //
44 
45 //
46 // constructors and destructor
47 //
49  //the following line is needed to tell the framework what
50  // data is being produced
51  std::string myName = p.getParameter<std::string>("ComponentName");
52  pset_ = p;
53  setWhatProduced(this, myName);
54 
55  //now do what ever other initialization is needed
56 }
57 
59  // do anything here that needs to be done at desctruction time
60  // (e.g. close files, deallocate resources etc.)
61 }
62 
63 //
64 // member functions
65 //
66 
67 // ------------ method called to produce the data ------------
69  const TrackingComponentsRecord& iRecord) {
70  using namespace edm::es;
71  std::string propname = pset_.getParameter<std::string>("Propagator");
72 
74  iRecord.get(propname, theProp);
75 
76  const Propagator* pro = theProp.product();
77 
78  auto pTSCBLBuilderWithPropagator = std::make_unique<TSCBLBuilderWithPropagator>(*pro);
79 
80  return pTSCBLBuilderWithPropagator;
81 }
82 
83 //define this as a plug-in
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ReturnType produce(const TrackingComponentsRecord &)
std::unique_ptr< TrajectoryStateClosestToBeamLineBuilder > ReturnType