ATLAS Offline Software
Loading...
Searching...
No Matches
CUDAMagFieldProviderTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
5
6#include "traccc/cuda/utils/make_magnetic_field.hpp"
7
8namespace ActsTrk {
9
11{
12 ATH_MSG_DEBUG("Initializing CUDAMagFieldProviderTool.");
13
14 if (m_magFieldStorage.value() == "global_memory") {
15 m_storage = traccc::cuda::magnetic_field_storage::global_memory;
16 } else if (m_magFieldStorage.value() == "texture_memory") {
17 m_storage = traccc::cuda::magnetic_field_storage::texture_memory;
18 } else {
19 ATH_MSG_FATAL("Unknown MagFieldStorage value.");
20 return StatusCode::FAILURE;
21 }
22
23 return StatusCode::SUCCESS;
24}
25
26
27traccc::magnetic_field
29 traccc::magnetic_field const& host_bfield) const
30{
31 return traccc::cuda::make_magnetic_field(host_bfield, m_storage);
32}
33
34} // namespace ActsTrk
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
traccc::cuda::magnetic_field_storage m_storage
virtual StatusCode initialize() override
Function initializing the algorithm.
virtual traccc::magnetic_field getDeviceMagneticField(traccc::magnetic_field const &host_bfield) const override
Function constructing the traccc device cuda magnetic field.
Gaudi::Property< std::string > m_magFieldStorage
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...