CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/TrackingTools/TrackFitters/plugins/FlexibleKFFittingSmootherESProducer.cc

Go to the documentation of this file.
00001 #include "TrackingTools/TrackFitters/plugins/FlexibleKFFittingSmootherESProducer.h"
00002 
00003 #include "FWCore/Framework/interface/EventSetup.h"
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "FWCore/Framework/interface/ModuleFactory.h"
00006 #include "FWCore/Framework/interface/ESProducer.h"
00007 
00008 #include <string>
00009 #include <memory>
00010 
00011 using namespace edm;
00012 
00013 FlexibleKFFittingSmootherESProducer::FlexibleKFFittingSmootherESProducer(const edm::ParameterSet & p) 
00014 {
00015   std::string myname = p.getParameter<std::string>("ComponentName");
00016   pset_ = p;
00017   setWhatProduced(this,myname);
00018 }
00019 
00020 FlexibleKFFittingSmootherESProducer::~FlexibleKFFittingSmootherESProducer() {}
00021 
00022 boost::shared_ptr<TrajectoryFitter> 
00023 FlexibleKFFittingSmootherESProducer::produce(const TrajectoryFitterRecord & iRecord){ 
00024 
00025   std::string standardFitterName = pset_.getParameter<std::string>("standardFitter");
00026   std::string looperFitterName = pset_.getParameter<std::string>("looperFitter");
00027 
00028   edm::ESHandle<TrajectoryFitter> standardFitter;
00029   edm::ESHandle<TrajectoryFitter> looperFitter;
00030   
00031   iRecord.get(standardFitterName,standardFitter);
00032   iRecord.get(looperFitterName,looperFitter);
00033   
00034   _fitter  = boost::shared_ptr<TrajectoryFitter>(new FlexibleKFFittingSmoother(*standardFitter.product(),
00035                                                                                *looperFitter.product()   ) );
00036   return _fitter;
00037 }
00038 
00039