File indexing completed on 2025-12-17 09:22:35
0001
0002
0003
0004
0005
0006 #include <algorithms/geo.h>
0007
0008 namespace algorithms {
0009
0010 void GeoSvc::init(const dd4hep::Detector* det) {
0011 if (det) {
0012 info() << "Initializing geometry service from pre-initialized detector" << endmsg;
0013 m_detector = det;
0014
0015 } else {
0016 info() << "No external detector provided, self-initializing" << endmsg;
0017 auto detector = dd4hep::Detector::make_unique("");
0018 if (m_xml_list.empty()) {
0019
0020 }
0021 for (std::string_view name : m_xml_list) {
0022 info() << fmt::format("Loading compact file: {}", "name") << endmsg;
0023 detector->fromCompact(std::string(name));
0024 }
0025 detector->volumeManager();
0026 detector->apply("DD4hepVolumeManager", 0, nullptr);
0027 m_detector_ptr = std::move(detector);
0028 m_detector = m_detector_ptr.get();
0029 }
0030
0031 m_converter = std::make_unique<const dd4hep::rec::CellIDPositionConverter>(*m_detector);
0032 }
0033 }
0034