ATLAS Offline Software
Loading...
Searching...
No Matches
JSONDeviceDetectorDescriptionProviderSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
5#define ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
6
8#include "GaudiKernel/ToolHandle.h"
11
20
21#include "traccc/geometry/detector_design_description.hpp"
22#include "traccc/geometry/detector_conditions_description.hpp"
23
24#include "vecmem/utils/cuda/copy.hpp"
25
26#include <memory>
27#include <string>
28#include <unordered_map>
29
30namespace ActsTrk {
31
33 : public extends<AthService, ActsTrk::IDeviceDetectorDescriptionProviderSvc>
34{
35public:
36
37 using extends::extends;
38
39 virtual StatusCode initialize() override;
40
41 virtual const std::unordered_map<uint64_t, Identifier>&
42 detrayToAthenaMap() const override;
43 virtual const std::unordered_map<Identifier, uint64_t>&
44 athenaToDetrayMap() const override;
45
46private:
47
48 ServiceHandle<StoreGateSvc> m_detStore{this, "DetectorStore", "StoreGateSvc/DetectorStore"};
49
50 ToolHandle<AthDevice::IMemoryResourceTool> m_hostMR{
51 this, "HostMR", "", "Host memory resource tool"};
52 ToolHandle<AthDevice::IMemoryResourceTool> m_deviceMR{
53 this, "DeviceMR", "", "Device memory resource tool"};
54 ToolHandle<AthDevice::ICopyTool> m_copy{
55 this, "CopyProviderTool", "", "Vecmem copy provider tool"};
56
57 // Read from files (temporary solution)
58 Gaudi::Property<std::string> m_geometryFile{
59 this, "GeometryFile", "",
60 "Detray geometry JSON file (required when PopulateFromFile=true)"};
61 Gaudi::Property<std::string> m_digitizationFile{
62 this, "DigitizationFile", "",
63 "Traccc digitization config JSON file (required when PopulateFromFile=true)"};
64 Gaudi::Property<std::string> m_conditionsFile{
65 this, "ConditionsFile", "",
66 "Traccc conditions config JSON file (required when PopulateFromFile=true)"};
67 Gaudi::Property<std::string> m_mapFile{
68 this, "MapFile", "",
69 "Path to the athena<->detray ID map CSV file"};
70
71 Gaudi::Property<std::string> m_deviceDesignObjectName{
72 this, "DeviceDigitizationObjectName", "",
73 "Traccc device digitization object"};
74 Gaudi::Property<std::string> m_deviceCondObjectName{
75 this, "DeviceConditionsObjectName", "",
76 "Traccc device conditions object"};
77 Gaudi::Property<std::string> m_hostDesignObjectName{
78 this, "HostDigitizationObjectName", "",
79 "Traccc host digitization object"};
80 Gaudi::Property<std::string> m_hostCondObjectName{
81 this, "HostConditionsObjectName", "",
82 "Traccc host conditions object"};
83
84 StatusCode loadIdMaps();
85 StatusCode buildFromFile(std::pmr::memory_resource& hostMR,
86 std::pmr::memory_resource& deviceMR,
87 const vecmem::copy& copy,
88 std::unique_ptr<traccc::detector_design_description::host>& hostDesign,
89 std::unique_ptr<traccc::detector_conditions_description::host>& hostCond,
90 std::unique_ptr<traccc::detector_design_description::buffer>& deviceDesign,
91 std::unique_ptr<traccc::detector_conditions_description::buffer>& deviceCond);
92
93 std::unordered_map<uint64_t, Identifier> m_detrayToAthena;
94 std::unordered_map<Identifier, uint64_t> m_athenaToDetray;
95
96};
97
98} // namespace ActsTrk
99
100#endif // ACTSGPUDATAPREPARATION_JSONDEVICEDETECTORDESCRIPTIONPROVIDERSVC_H
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
virtual const std::unordered_map< uint64_t, Identifier > & detrayToAthenaMap() const override
virtual const std::unordered_map< Identifier, uint64_t > & athenaToDetrayMap() const override
StatusCode buildFromFile(std::pmr::memory_resource &hostMR, std::pmr::memory_resource &deviceMR, const vecmem::copy &copy, std::unique_ptr< traccc::detector_design_description::host > &hostDesign, std::unique_ptr< traccc::detector_conditions_description::host > &hostCond, std::unique_ptr< traccc::detector_design_description::buffer > &deviceDesign, std::unique_ptr< traccc::detector_conditions_description::buffer > &deviceCond)
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...