Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:42

0001 #include "TransientTrackBuilderESProducer.h"
0002 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
0003 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0004 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
0005 
0006 #include "FWCore/Framework/interface/ESHandle.h"
0007 
0008 #include <string>
0009 #include <memory>
0010 
0011 using namespace edm;
0012 
0013 TransientTrackBuilderESProducer::TransientTrackBuilderESProducer(const edm::ParameterSet& p) {
0014   auto cc = setWhatProduced(this, p.getParameter<std::string>("ComponentName"));
0015   magToken_ = cc.consumes();
0016   geomToken_ = cc.consumes();
0017 }
0018 
0019 std::unique_ptr<TransientTrackBuilder> TransientTrackBuilderESProducer::produce(const TransientTrackRecord& iRecord) {
0020   return std::make_unique<TransientTrackBuilder>(&iRecord.get(magToken_), iRecord.getHandle(geomToken_));
0021 }
0022 
0023 void TransientTrackBuilderESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0024   edm::ParameterSetDescription desc;
0025   desc.add<std::string>("ComponentName", "TransientTrackBuilder")
0026       ->setComment("data label to use when getting the data product");
0027 
0028   descriptions.addDefault(desc);
0029 }