CMS 3D CMS Logo

TrackFitterProducer.cc
Go to the documentation of this file.
3 
8 
12 
15 
22 
24 public:
25  explicit TrackFitterProducer(const edm::ParameterSet& iConfig);
26  ~TrackFitterProducer() override {}
27 
28  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
29 
30 private:
31  void produce(edm::StreamID, edm::Event& iEvent, const edm::EventSetup& iSetup) const override;
32 
35 };
36 
38  : theTTRHBuilderName(iConfig.getParameter<std::string>("TTRHBuilder")) {
39  produces<PixelFitter>();
40 }
41 
44 
45  desc.add<std::string>("TTRHBuilder", "");
46 
47  descriptions.add("trackFitter", desc);
48 }
49 
52  iSetup.get<TrackerDigiGeometryRecord>().get(trackerESH);
53 
55  iSetup.get<IdealMagneticFieldRecord>().get(fieldESH);
56 
58  iSetup.get<TransientRecHitRecord>().get(theTTRHBuilderName, ttrhbESH);
59 
60  auto impl = std::make_unique<TrackFitter>(trackerESH.product(), fieldESH.product(), ttrhbESH.product());
61  auto prod = std::make_unique<PixelFitter>(std::move(impl));
62  iEvent.put(std::move(prod));
63 }
64 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:131
edm::EDGetTokenT< reco::BeamSpot > theBeamSpotToken
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
T get() const
Definition: EventSetup.h:73
void produce(edm::StreamID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
T const * product() const
Definition: ESHandle.h:86
TrackFitterProducer(const edm::ParameterSet &iConfig)
def move(src, dest)
Definition: eostools.py:511