CMS 3D CMS Logo

MagneticFieldMapESProducer Class Reference

#include <FastSimulation/ParticlePropagator/plugins/MagneticFieldMapESProducer.h>

Inheritance diagram for MagneticFieldMapESProducer:

edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

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


Detailed Description

Definition at line 10 of file MagneticFieldMapESProducer.h.


Constructor & Destructor Documentation

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]

Definition at line 20 of file MagneticFieldMapESProducer.cc.

00020 {}


Member Function Documentation

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 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:27:58 2009 for CMSSW by  doxygen 1.5.4