CMS 3D CMS Logo

Public Member Functions | Private Attributes

MagneticFieldMapESProducer Class Reference

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

{
    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.

{}

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

                                                                         { 

  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;

}

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