CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MagneticFieldMapESProducer.cc
Go to the documentation of this file.
4 
8 
9 #include <memory>
10 
12 {
13  setWhatProduced(this);
14  _label = p.getUntrackedParameter<std::string>("trackerGeometryLabel","");
15 
16  // theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial");
17 
18 }
19 
21 
22 boost::shared_ptr<MagneticFieldMap>
24 
25  edm::ESHandle<TrackerInteractionGeometry> theInteractionGeometry;
26  edm::ESHandle<MagneticField> theMagneticField;
27 
28  iRecord.getRecord<TrackerInteractionGeometryRecord>().get(_label, theInteractionGeometry );
29  iRecord.getRecord<IdealMagneticFieldRecord>().get(theMagneticField );
30 
31  _map = boost::shared_ptr<MagneticFieldMap>
32  (new MagneticFieldMap(&(*theMagneticField),&(*theInteractionGeometry)));
33 
34  return _map;
35 
36 }
37 
38 
T getUntrackedParameter(std::string const &, T const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
boost::shared_ptr< MagneticFieldMap > _map
MagneticFieldMapESProducer(const edm::ParameterSet &p)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
boost::shared_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)