CMS 3D CMS Logo

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 std::unique_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  return std::make_unique<MagneticFieldMap>(&(*theMagneticField),&(*theInteractionGeometry));
32 
33 }
34 
35 
T getUntrackedParameter(std::string const &, T const &) const
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
MagneticFieldMapESProducer(const edm::ParameterSet &p)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
std::unique_ptr< MagneticFieldMap > produce(const MagneticFieldMapRecord &)