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 
10 
12 
14 
15 using namespace magneticfield;
16 
17 UniformMagneticFieldESProducer::UniformMagneticFieldESProducer(const edm::ParameterSet& pset) : value(pset.getParameter<double>("ZFieldInTesla")) {
18  setWhatProduced(this, pset.getUntrackedParameter<std::string>("label",""));
19 }
20 
21 
22 std::auto_ptr<MagneticField> UniformMagneticFieldESProducer::produce(const IdealMagneticFieldRecord & iRecord)
23 {
24  std::auto_ptr<MagneticField> s(new UniformMagneticField(value));
25  return s;
26 }
27 
T getUntrackedParameter(std::string const &, T const &) const
std::auto_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:56