4 #include <DD4hep/Detector.h> 5 #include <DD4hep/DetectorTools.h> 6 #include <DD4hep/Volumes.h> 7 #include <XML/DocumentHandler.h> 8 #include <XML/XMLElements.h> 16 auto oldGeoManager = gGeoManager;
17 gGeoManager =
nullptr;
18 auto resetManager = [oldGeoManager](TGeoManager*) { gGeoManager = oldGeoManager; };
19 std::unique_ptr<TGeoManager, decltype(resetManager)> sentry(oldGeoManager, resetManager);
22 bool makePayload =
false;
23 if (tagStr ==
"make-payload") {
36 edm::LogVerbatim(
"Geometry") <<
"DDDetector::ctor Setting DD4hep STD conditions to NTP";
41 if (makePayload ==
false)
52 edm::LogVerbatim(
"Geometry") <<
"DDDetector::processXML process string size " << xml.size() <<
" with max_size " 54 edm::LogVerbatim(
"Geometry") <<
"DDDetector::processXML XML string contents = " << xml.substr(0, 800);
56 dd4hep::xml::DocumentHolder
doc(dd4hep::xml::DocumentHandler().
parse(xml.c_str(), xml.length()));
58 char*
args[] = {(
char*)
doc.root().ptr(),
nullptr};
dd4hep::Detector * m_description
Log< level::Info, true > LogVerbatim
vector< string > parse(string line, const string &delimiter)
TGeoManager & manager() const
The geometry manager of this instance.
std::unordered_map< std::string, std::vector< double > > DDVectorsMap
dd4hep::PartSelectionMap m_partsels
Namespace of DDCMS conversion namespace.
void process(const std::string &)
dd4hep::SpecParRegistry m_specpars
dd4hep::Volume worldVolume() const
Handle to the world volume containing everything.
void processXML(const std::string &)
dd4hep::DetElement findElement(const std::string &) const
Find DetElement as child of the top level volume by it's absolute path.
cms::DDVectorsMap m_vectors
dd4hep::DetElement world() const
Reference to the top-most (world) detector element.