CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
31 
32 private:
33  // ----------member data ---------------------------
37 };
38 
39 //
40 // constructors and destructor
41 //
43  : myName_(p.getParameter<std::string>("ComponentName")), propName_(p.getParameter<std::string>("Propagator")) {
44  auto cc = setWhatProduced(this, myName_);
45  //now do what ever other initialization is needed
46  propToken_ = cc.consumes(edm::ESInputTag{"", propName_});
47 }
48 
50 
51 //
52 // member functions
53 //
54 // ------------ method called to produce the data ------------
56  const TrackingComponentsRecord& iRecord) {
57  using namespace edm::es;
58 
59  const Propagator* pro = &iRecord.get(propToken_);
60  auto pTSCBLBuilderWithPropagator = std::make_unique<TSCBLBuilderWithPropagator>(*pro);
61  return pTSCBLBuilderWithPropagator;
62 }
63 
64 //define this as a plug-in
edm::ESGetToken< Propagator, TrackingComponentsRecord > propToken_
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
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