CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/TrackingTools/KalmanUpdators/plugins/KFSwitching1DUpdatorESProducer.cc

Go to the documentation of this file.
00001 #include "TrackingTools/KalmanUpdators/interface/KFSwitching1DUpdatorESProducer.h"
00002 #include "MagneticField/Engine/interface/MagneticField.h"
00003 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00004 
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "FWCore/Framework/interface/ModuleFactory.h"
00008 #include "FWCore/Framework/interface/ESProducer.h"
00009 
00010 #include <string>
00011 #include <memory>
00012 
00013 using namespace edm;
00014 
00015 KFSwitching1DUpdatorESProducer::KFSwitching1DUpdatorESProducer(const edm::ParameterSet & p) 
00016 {
00017   std::string myname = p.getParameter<std::string>("ComponentName");
00018   pset_ = p;
00019   setWhatProduced(this,myname);
00020 }
00021 
00022 KFSwitching1DUpdatorESProducer::~KFSwitching1DUpdatorESProducer() {}
00023 
00024 boost::shared_ptr<TrajectoryStateUpdator> 
00025 KFSwitching1DUpdatorESProducer::produce(const TrackingComponentsRecord & iRecord){ 
00026 //   if (_updator){
00027 //     delete _updator;
00028 //     _updator = 0;
00029 //   }
00030   
00031   _updator  = boost::shared_ptr<TrajectoryStateUpdator>(new KFSwitching1DUpdator(&pset_));
00032   return _updator;
00033 }
00034 
00035