CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
UniformMagneticFieldESProducer.cc
Go to the documentation of this file.
1 
8 
10 
12 
13 using namespace magneticfield;
14 
15 UniformMagneticFieldESProducer::UniformMagneticFieldESProducer(const edm::ParameterSet& pset) : value(pset.getParameter<double>("ZFieldInTesla")) {
16  setWhatProduced(this, pset.getUntrackedParameter<std::string>("label",""));
17 }
18 
19 
20 std::unique_ptr<MagneticField> UniformMagneticFieldESProducer::produce(const IdealMagneticFieldRecord & iRecord)
21 {
22  return std::make_unique<UniformMagneticField>(value);
23 }
24 
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< MagneticField > produce(const IdealMagneticFieldRecord &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60