CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TransientTrackBuilderESProducer.cc
Go to the documentation of this file.
5 
7 
8 #include <string>
9 #include <memory>
10 
11 using namespace edm;
12 
14  auto cc = setWhatProduced(this, p.getParameter<std::string>("ComponentName"));
15  magToken_ = cc.consumes();
16  geomToken_ = cc.consumes();
17 }
18 
19 std::unique_ptr<TransientTrackBuilder> TransientTrackBuilderESProducer::produce(const TransientTrackRecord& iRecord) {
20  return std::make_unique<TransientTrackBuilder>(&iRecord.get(magToken_), iRecord.getHandle(geomToken_));
21 }
22 
25  desc.add<std::string>("ComponentName", "TransientTrackBuilder")
26  ->setComment("data label to use when getting the data product");
27 
28  descriptions.addDefault(desc);
29 }
ESHandle< ProductT > getHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addDefault(ParameterSetDescription const &psetDescription)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TransientTrackBuilderESProducer(const edm::ParameterSet &p)
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::unique_ptr< TransientTrackBuilder > produce(const TransientTrackRecord &)