Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:31:39

0001 #include "FWCore/Framework/interface/ESProducer.h"
0002 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0003 #include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
0004 #include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
0005 #include <memory>
0006 
0007 #include "MagneticField/Engine/interface/MagneticField.h"
0008 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0009 
0010 #include "FWCore/Framework/interface/EventSetup.h"
0011 #include "FWCore/Framework/interface/ESHandle.h"
0012 #include "FWCore/Framework/interface/ModuleFactory.h"
0013 #include "FWCore/Framework/interface/ESProducer.h"
0014 
0015 #include <string>
0016 #include <memory>
0017 
0018 using namespace edm;
0019 class KFUpdatorESProducer : public edm::ESProducer {
0020 public:
0021   KFUpdatorESProducer(const edm::ParameterSet& p);
0022   std::unique_ptr<TrajectoryStateUpdator> produce(const TrackingComponentsRecord&);
0023 
0024   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0025 
0026 private:
0027 };
0028 
0029 KFUpdatorESProducer::KFUpdatorESProducer(const edm::ParameterSet& p) {
0030   std::string myname = p.getParameter<std::string>("ComponentName");
0031   setWhatProduced(this, myname);
0032 }
0033 
0034 std::unique_ptr<TrajectoryStateUpdator> KFUpdatorESProducer::produce(const TrackingComponentsRecord& iRecord) {
0035   return std::make_unique<KFUpdator>();
0036 }
0037 
0038 void KFUpdatorESProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0039   edm::ParameterSetDescription desc;
0040   desc.add<std::string>("ComponentName");
0041   descriptions.addDefault(desc);
0042 }
0043 
0044 DEFINE_FWK_EVENTSETUP_MODULE(KFUpdatorESProducer);