File indexing completed on 2024-04-06 12:22:35
0001
0002
0003
0004
0005
0006 #include "MagneticField/UniformEngine/plugins/UniformMagneticFieldESProducer.h"
0007 #include "MagneticField/UniformEngine/interface/UniformMagneticField.h"
0008
0009 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0010
0011 #include "FWCore/Framework/interface/ModuleFactory.h"
0012
0013 using namespace magneticfield;
0014
0015 UniformMagneticFieldESProducer::UniformMagneticFieldESProducer(const edm::ParameterSet& pset)
0016 : value(pset.getParameter<double>("ZFieldInTesla")) {
0017 setWhatProduced(this, pset.getUntrackedParameter<std::string>("label", ""));
0018 }
0019
0020 std::unique_ptr<MagneticField> UniformMagneticFieldESProducer::produce(const IdealMagneticFieldRecord& iRecord) {
0021 return std::make_unique<UniformMagneticField>(value);
0022 }
0023
0024 DEFINE_FWK_EVENTSETUP_MODULE(UniformMagneticFieldESProducer);