File indexing completed on 2025-02-22 09:35:01
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "Acts/Plugins/GeoModel/GeoModelReader.hpp"
0010
0011 #include <GeoModelDBManager/GMDBManager.h>
0012 #include <GeoModelKernel/GeoFullPhysVol.h>
0013 #include <GeoModelRead/ReadGeoModel.h>
0014
0015 Acts::GeoModelTree Acts::GeoModelReader::readFromDb(const std::string& dbPath) {
0016
0017 GMDBManager* db = new GMDBManager(dbPath);
0018 if (!db->checkIsDBOpen()) {
0019 throw std::runtime_error("GeoModelReader: Could not open the database");
0020 }
0021
0022 auto geoReader = std::make_shared<GeoModelIO::ReadGeoModel>(db);
0023
0024 GeoModelTree geoModel{geoReader, geoReader->buildGeoModel()};
0025 return geoModel;
0026 }