CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
StandaloneTrackerTopology Namespace Reference

Functions

TrackerTopology fromTrackerParametersXMLFile (const std::string &xmlFileName)
 
TrackerTopology fromTrackerParametersXMLString (const std::string &xmlContent)
 

Function Documentation

TrackerTopology StandaloneTrackerTopology::fromTrackerParametersXMLFile ( const std::string &  xmlFileName)

Construct a TrackerTopology from a trackerParameters.xml file, from the name of the file

WARNING: this method has been introduced to construct a TrackerTopology object only for the rare cases where it cannot be retrieved from an edm::EventSetup (e.g. ROOT macros).

Definition at line 168 of file StandaloneTrackerTopology.cc.

References Exception, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by DMRChecker::endJob(), gainCalibHelper::SiPixelGainCalibrationValuesPerRegion< isBarrel, myType, PayloadType >::fill(), gainCalibHelper::SiPixelGainCalibrationValuesComparisonPerRegion< isBarrel, myType, nIOVs, ntags, PayloadType >::fill(), gainCalibHelper::SiPixelGainCalibrationByRegionComparisonBase< myType, PayloadType, nIOVs, ntags >::fill(), SiPixelFakeLorentzAngleESSource::produce(), and gainCalibHelper::SiPixelGainCalibrationMap< myType, PayloadType, myDetType >::SiPixelGainCalibrationMap().

168  {
169  tinyxml2::XMLDocument xmlDoc;
170  xmlDoc.LoadFile(xmlFileName.c_str());
171  if (!xmlDoc.Error()) {
172  TrackerTopologyExtractor extr{};
173  xmlDoc.Accept(&extr);
174  return extr.getTrackerTopology();
175  } else {
176  throw cms::Exception("StandaloneTrackerTopology",
177  std::string{"Failed to parse file "} + xmlFileName + ": " + xmlDoc.ErrorStr());
178  }
179  }
TrackerTopology StandaloneTrackerTopology::fromTrackerParametersXMLString ( const std::string &  xmlContent)

Construct a TrackerTopology from a trackerParameters.xml file, from the contents read into a std::string

WARNING: this method has been introduced to construct a TrackerTopology object only for the rare cases where it cannot be retrieved from an edm::EventSetup (e.g. ROOT macros).

Definition at line 180 of file StandaloneTrackerTopology.cc.

References Exception, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWGeometry::loadMap().

180  {
181  tinyxml2::XMLDocument xmlDoc;
182  xmlDoc.Parse(xmlContent.c_str());
183  if (!xmlDoc.Error()) {
184  TrackerTopologyExtractor extr{};
185  xmlDoc.Accept(&extr);
186  return extr.getTrackerTopology();
187  } else {
188  throw cms::Exception("StandaloneTrackerTopology", std::string{"Error while parsing XML: "} + xmlDoc.ErrorStr());
189  }
190  }