ATLAS Offline Software
Loading...
Searching...
No Matches
EFTrackingXrtAlgorithm.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4
5#ifndef EFTRACKING_XRT_ALGORITHM
6#define EFTRACKING_XRT_ALGORITHM
7
8#include <memory>
9#include <map>
10
13#include "Gaudi/Property.h"
14#include "Gaudi/Parsers/Factory.h"
15
16#include "GaudiKernel/ServiceHandle.h"
17#include "GaudiKernel/IChronoSvc.h"
20
21#include "xrt/xrt_bo.h"
22#include "xrt/xrt_device.h"
23#include "xrt/xrt_kernel.h"
24
36{
43
45 this,
46 "DeviceMgmtSvc",
47 "AthXRT::DeviceMgmtSvc",
48 "The XRT device manager service to use"
49 };
50
52 this,
53 "ChronoStatSvc",
54 "ChronoStatSvc",
55 "Stop watch"
56 };
57
58 Gaudi::Property<std::vector<std::tuple<std::string, std::string, int>>> m_inputInterfaces {
59 this,
60 "inputInterfaces",
61 {},
62 ""
63 };
64
65 Gaudi::Property<std::vector<std::tuple<std::string, std::string, int>>> m_vSizeInterfaces {
66 this,
67 "vSizeInterfaces",
68 {},
69 ""
70 };
71
72 Gaudi::Property<std::vector<std::tuple<std::string, std::string, int>>> m_outputInterfaces {
73 this,
74 "outputInterfaces",
75 {},
76 ""
77 };
78
79 Gaudi::Property<std::vector<std::tuple<std::string, int, std::string, int>>> m_sharedInterfaces {
80 this,
81 "sharedInterfaces",
82 {},
83 ""
84 };
85
86 Gaudi::Property<std::vector<std::vector<std::string>>> m_kernelOrder {
87 this,
88 "kernelOrder",
89 {},
90 ""
91 };
92
93 Gaudi::Property<std::size_t> m_bufferSize {
94 this,
95 "bufferSize",
96 8192,
97 "Capacity of xrt buffers in terms of 64bit words."
98 };
99
100 std::map<std::string, std::unique_ptr<xrt::kernel>> m_kernels{};
101 std::map<std::string, std::unique_ptr<xrt::run>> m_runs{};
102
103 // Buffer objects
104 mutable std::vector<xrt::bo> m_inputBuffers ATLAS_THREAD_SAFE {};
105 mutable std::vector<xrt::bo> m_outputBuffers ATLAS_THREAD_SAFE {};
106
107 public:
108 EFTrackingXrtAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
109 StatusCode initialize() override final;
110 StatusCode execute(const EventContext& ctx) const override final;
111};
112
113#endif
114
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_vSizeInterfaces
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_vSizeDataStreamKeys
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_inputInterfaces
std::map< std::string, std::unique_ptr< xrt::kernel > > m_kernels
std::vector< xrt::bo > m_inputBuffers ATLAS_THREAD_SAFE
std::map< std::string, std::unique_ptr< xrt::run > > m_runs
StatusCode execute(const EventContext &ctx) const override final
Gaudi::Property< std::vector< std::vector< std::string > > > m_kernelOrder
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_inputDataStreamKeys
Keys to access encoded 64bit words following the EFTracking specification.
Gaudi::Property< std::vector< std::tuple< std::string, int, std::string, int > > > m_sharedInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_outputInterfaces
ServiceHandle< AthXRT::IDeviceMgmtSvc > m_DeviceMgmtSvc
SG::WriteHandleKeyArray< std::vector< unsigned long > > m_outputDataStreamKeys
Gaudi::Property< std::size_t > m_bufferSize
StatusCode initialize() override final
EFTrackingXrtAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
ServiceHandle< IChronoSvc > m_chronoSvc
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray