#include <FastSimulation/ParticlePropagator/plugins/MagneticFieldMapESProducer.h>
Public Member Functions | |
MagneticFieldMapESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr < MagneticFieldMap > | produce (const MagneticFieldMapRecord &) |
virtual | ~MagneticFieldMapESProducer () |
Private Attributes | |
std::string | _label |
boost::shared_ptr < MagneticFieldMap > | _map |
Definition at line 10 of file MagneticFieldMapESProducer.h.
MagneticFieldMapESProducer::MagneticFieldMapESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 11 of file MagneticFieldMapESProducer.cc.
References _label, edm::ParameterSet::getUntrackedParameter(), and edm::ESProducer::setWhatProduced().
00012 { 00013 setWhatProduced(this); 00014 _label = p.getUntrackedParameter<std::string>("trackerGeometryLabel",""); 00015 00016 // theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial"); 00017 00018 }
MagneticFieldMapESProducer::~MagneticFieldMapESProducer | ( | ) | [virtual] |
boost::shared_ptr< MagneticFieldMap > MagneticFieldMapESProducer::produce | ( | const MagneticFieldMapRecord & | iRecord | ) |
Definition at line 23 of file MagneticFieldMapESProducer.cc.
References _label, _map, and edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord().
00023 { 00024 00025 edm::ESHandle<TrackerInteractionGeometry> theInteractionGeometry; 00026 edm::ESHandle<MagneticField> theMagneticField; 00027 00028 iRecord.getRecord<TrackerInteractionGeometryRecord>().get(_label, theInteractionGeometry ); 00029 iRecord.getRecord<IdealMagneticFieldRecord>().get(theMagneticField ); 00030 00031 _map = boost::shared_ptr<MagneticFieldMap> 00032 (new MagneticFieldMap(&(*theMagneticField),&(*theInteractionGeometry))); 00033 00034 return _map; 00035 00036 }
std::string MagneticFieldMapESProducer::_label [private] |
Definition at line 17 of file MagneticFieldMapESProducer.h.
Referenced by MagneticFieldMapESProducer(), and produce().
boost::shared_ptr<MagneticFieldMap> MagneticFieldMapESProducer::_map [private] |