Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:46:49

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 "Acts/Geometry/GeometryModuleLoader.hpp"
0010 #include "Acts/Utilities/Logger.hpp"
0011 
0012 #include <filesystem>
0013 
0014 #ifdef ACTS_BUILD_PLUGIN_DD4HEP
0015 #include "ActsPlugins/DD4hep/GeometryModuleLoader.hpp"
0016 
0017 #include <DD4hep/Detector.h>
0018 #endif
0019 
0020 void exampleLoadPlainModule(const Acts::Logger& logger,
0021                             const std::filesystem::path& modulePath) {
0022   //! [Load Plain Module]
0023   auto geometry = Acts::loadGeometryModule(modulePath, logger);
0024   // 'geometry' is a std::shared_ptr<Acts::TrackingGeometry>.
0025   // The shared library stays loaded until 'geometry' is destroyed.
0026   //! [Load Plain Module]
0027   (void)geometry;
0028 }
0029 
0030 #ifdef ACTS_BUILD_PLUGIN_DD4HEP
0031 void exampleLoadDD4hepModule(const dd4hep::Detector& detector,
0032                              const Acts::Logger& logger,
0033                              const std::filesystem::path& modulePath) {
0034   //! [Load DD4hep Module]
0035   auto geometry = Acts::loadDD4hepGeometryModule(modulePath, detector, logger);
0036   // 'geometry' is a std::shared_ptr<Acts::TrackingGeometry>.
0037   // The shared library stays loaded until 'geometry' is destroyed.
0038   //! [Load DD4hep Module]
0039   (void)geometry;
0040 }
0041 #endif