Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-16 09:24:24

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "ActsPlugins/GeoModel/GeoModelReader.hpp"
0010 
0011 #include <GeoModelDBManager/GMDBManager.h>
0012 #include <GeoModelKernel/GeoFullPhysVol.h>
0013 #include <GeoModelRead/ReadGeoModel.h>
0014 
0015 ActsPlugins::GeoModelTree ActsPlugins::GeoModelReader::readFromDb(
0016     const std::string& dbPath) {
0017   // Data base manager
0018   auto db = std::make_shared<GMDBManager>(dbPath);
0019   if (!db->checkIsDBOpen()) {
0020     throw std::runtime_error("GeoModelReader: Could not open the database");
0021   }
0022   // Read the GeoModel
0023   GeoModelTree geoModel{db};
0024   return geoModel;
0025 }