ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
EFTracking
EFTrackingFPGAIntegration
EFTrackingFPGAPipeline
EFTrackingFPGAPipeline
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
11
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
12
#include "
AthXRTInterfaces/IDeviceMgmtSvc.h
"
13
#include "Gaudi/Property.h"
14
#include "Gaudi/Parsers/Factory.h"
15
16
#include "GaudiKernel/ServiceHandle.h"
17
#include "GaudiKernel/IChronoSvc.h"
18
#include "
StoreGate/ReadHandleKeyArray.h
"
19
#include "
StoreGate/WriteHandleKeyArray.h
"
20
21
#include "xrt/xrt_bo.h"
22
#include "xrt/xrt_device.h"
23
#include "xrt/xrt_kernel.h"
24
35
class
EFTrackingXrtAlgorithm
:
public
AthReentrantAlgorithm
36
{
40
SG::ReadHandleKeyArray<std::vector<unsigned long>
>
m_inputDataStreamKeys
{
this
,
"inputDataStreamKeys"
, {}};
41
SG::ReadHandleKeyArray<std::vector<unsigned long>
>
m_vSizeDataStreamKeys
{
this
,
"vSizeDataStreamKeys"
, {}};
42
SG::WriteHandleKeyArray<std::vector<unsigned long>
>
m_outputDataStreamKeys
{
this
,
"outputDataStreamKeys"
, {}};
43
44
ServiceHandle<AthXRT::IDeviceMgmtSvc>
m_DeviceMgmtSvc
{
45
this
,
46
"DeviceMgmtSvc"
,
47
"AthXRT::DeviceMgmtSvc"
,
48
"The XRT device manager service to use"
49
};
50
51
ServiceHandle<IChronoSvc>
m_chronoSvc
{
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
std::optional<xrt::bo::flags>
determine_mem_flags
(
108
const
std::unique_ptr<xrt::kernel>& kernel,
109
const
std::size_t
index
110
)
const
;
111
112
public
:
113
EFTrackingXrtAlgorithm
(
const
std::string& name, ISvcLocator* pSvcLocator);
114
StatusCode
initialize
() override final;
115
StatusCode
execute
(
const
EventContext& ctx)
const
override final;
116
};
117
118
#endif
119
AthReentrantAlgorithm.h
IDeviceMgmtSvc.h
ReadHandleKeyArray.h
WriteHandleKeyArray.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
EFTrackingXrtAlgorithm::m_vSizeInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_vSizeInterfaces
Definition
EFTrackingXrtAlgorithm.h:65
EFTrackingXrtAlgorithm::determine_mem_flags
std::optional< xrt::bo::flags > determine_mem_flags(const std::unique_ptr< xrt::kernel > &kernel, const std::size_t index) const
Definition
EFTrackingXrtAlgorithm.cxx:362
EFTrackingXrtAlgorithm::m_vSizeDataStreamKeys
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_vSizeDataStreamKeys
Definition
EFTrackingXrtAlgorithm.h:41
EFTrackingXrtAlgorithm::m_inputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_inputInterfaces
Definition
EFTrackingXrtAlgorithm.h:58
EFTrackingXrtAlgorithm::m_kernels
std::map< std::string, std::unique_ptr< xrt::kernel > > m_kernels
Definition
EFTrackingXrtAlgorithm.h:100
EFTrackingXrtAlgorithm::ATLAS_THREAD_SAFE
std::vector< xrt::bo > m_inputBuffers ATLAS_THREAD_SAFE
Definition
EFTrackingXrtAlgorithm.h:104
EFTrackingXrtAlgorithm::m_runs
std::map< std::string, std::unique_ptr< xrt::run > > m_runs
Definition
EFTrackingXrtAlgorithm.h:101
EFTrackingXrtAlgorithm::execute
StatusCode execute(const EventContext &ctx) const override final
Definition
EFTrackingXrtAlgorithm.cxx:255
EFTrackingXrtAlgorithm::m_kernelOrder
Gaudi::Property< std::vector< std::vector< std::string > > > m_kernelOrder
Definition
EFTrackingXrtAlgorithm.h:86
EFTrackingXrtAlgorithm::m_inputDataStreamKeys
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_inputDataStreamKeys
Keys to access encoded 64bit words following the EFTracking specification.
Definition
EFTrackingXrtAlgorithm.h:40
EFTrackingXrtAlgorithm::m_sharedInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, int, std::string, int > > > m_sharedInterfaces
Definition
EFTrackingXrtAlgorithm.h:79
EFTrackingXrtAlgorithm::m_outputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_outputInterfaces
Definition
EFTrackingXrtAlgorithm.h:72
EFTrackingXrtAlgorithm::m_DeviceMgmtSvc
ServiceHandle< AthXRT::IDeviceMgmtSvc > m_DeviceMgmtSvc
Definition
EFTrackingXrtAlgorithm.h:44
EFTrackingXrtAlgorithm::m_outputDataStreamKeys
SG::WriteHandleKeyArray< std::vector< unsigned long > > m_outputDataStreamKeys
Definition
EFTrackingXrtAlgorithm.h:42
EFTrackingXrtAlgorithm::m_bufferSize
Gaudi::Property< std::size_t > m_bufferSize
Definition
EFTrackingXrtAlgorithm.h:93
EFTrackingXrtAlgorithm::initialize
StatusCode initialize() override final
Definition
EFTrackingXrtAlgorithm.cxx:15
EFTrackingXrtAlgorithm::EFTrackingXrtAlgorithm
EFTrackingXrtAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition
EFTrackingXrtAlgorithm.cxx:9
EFTrackingXrtAlgorithm::m_chronoSvc
ServiceHandle< IChronoSvc > m_chronoSvc
Definition
EFTrackingXrtAlgorithm.h:51
ServiceHandle
Definition
ClusterMakerTool.h:36
const
SG::ReadHandleKeyArray
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Definition
StoreGate/StoreGate/ReadHandleKeyArray.h:32
SG::WriteHandleKeyArray
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray
Definition
WriteHandleKeyArray.h:32
index
Definition
index.py:1
Generated on
for ATLAS Offline Software by
1.17.0