#include <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().
{ setWhatProduced(this); _label = p.getUntrackedParameter<std::string>("trackerGeometryLabel",""); // theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial"); }
MagneticFieldMapESProducer::~MagneticFieldMapESProducer | ( | ) | [virtual] |
Definition at line 20 of file MagneticFieldMapESProducer.cc.
{}
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().
{ edm::ESHandle<TrackerInteractionGeometry> theInteractionGeometry; edm::ESHandle<MagneticField> theMagneticField; iRecord.getRecord<TrackerInteractionGeometryRecord>().get(_label, theInteractionGeometry ); iRecord.getRecord<IdealMagneticFieldRecord>().get(theMagneticField ); _map = boost::shared_ptr<MagneticFieldMap> (new MagneticFieldMap(&(*theMagneticField),&(*theInteractionGeometry))); return _map; }
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] |
Definition at line 16 of file MagneticFieldMapESProducer.h.
Referenced by produce().