ATLAS Offline Software
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::size_t> m_bufferSize {
80  this,
81  "bufferSize",
82  8192,
83  "Capacity of xrt buffers in terms of 64bit words."
84  };
85 
86  std::map<std::string, std::unique_ptr<xrt::kernel>> m_kernels{};
87  std::map<std::string, std::unique_ptr<xrt::run>> m_runs{};
88 
89  // Buffer objects
90  mutable std::vector<xrt::bo> m_inputBuffers ATLAS_THREAD_SAFE {};
91  mutable std::vector<xrt::bo> m_outputBuffers ATLAS_THREAD_SAFE {};
92 
93  public:
94  EFTrackingXrtAlgorithm(const std::string& name, ISvcLocator* pSvcLocator);
95  StatusCode initialize() override final;
96  StatusCode execute(const EventContext& ctx) const override final;
97 };
98 
99 #endif
100 
ReadHandleKeyArray.h
EFTrackingXrtAlgorithm::m_outputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_outputInterfaces
Definition: EFTrackingXrtAlgorithm.h:72
EFTrackingXrtAlgorithm::EFTrackingXrtAlgorithm
EFTrackingXrtAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Definition: EFTrackingXrtAlgorithm.cxx:9
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
EFTrackingXrtAlgorithm
Definition: EFTrackingXrtAlgorithm.h:36
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
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::m_kernels
std::map< std::string, std::unique_ptr< xrt::kernel > > m_kernels
Definition: EFTrackingXrtAlgorithm.h:86
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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::ATLAS_THREAD_SAFE
std::vector< xrt::bo > m_inputBuffers ATLAS_THREAD_SAFE
Definition: EFTrackingXrtAlgorithm.h:90
columnar::final
CM final
Definition: ColumnAccessor.h:106
EFTrackingXrtAlgorithm::m_DeviceMgmtSvc
ServiceHandle< AthXRT::IDeviceMgmtSvc > m_DeviceMgmtSvc
Definition: EFTrackingXrtAlgorithm.h:44
IDeviceMgmtSvc.h
EFTrackingXrtAlgorithm::m_inputInterfaces
Gaudi::Property< std::vector< std::tuple< std::string, std::string, int > > > m_inputInterfaces
Definition: EFTrackingXrtAlgorithm.h:58
AthReentrantAlgorithm.h
WriteHandleKeyArray.h
EFTrackingXrtAlgorithm::execute
StatusCode execute(const EventContext &ctx) const override final
Definition: EFTrackingXrtAlgorithm.cxx:112
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
EFTrackingXrtAlgorithm::m_vSizeDataStreamKeys
SG::ReadHandleKeyArray< std::vector< unsigned long > > m_vSizeDataStreamKeys
Definition: EFTrackingXrtAlgorithm.h:41
EFTrackingXrtAlgorithm::initialize
StatusCode initialize() override final
Definition: EFTrackingXrtAlgorithm.cxx:15
EFTrackingXrtAlgorithm::m_bufferSize
Gaudi::Property< std::size_t > m_bufferSize
Definition: EFTrackingXrtAlgorithm.h:79
EFTrackingXrtAlgorithm::m_outputDataStreamKeys
SG::WriteHandleKeyArray< std::vector< unsigned long > > m_outputDataStreamKeys
Definition: EFTrackingXrtAlgorithm.h:42
EFTrackingXrtAlgorithm::m_runs
std::map< std::string, std::unique_ptr< xrt::run > > m_runs
Definition: EFTrackingXrtAlgorithm.h:87
ServiceHandle< AthXRT::IDeviceMgmtSvc >
EFTrackingXrtAlgorithm::m_chronoSvc
ServiceHandle< IChronoSvc > m_chronoSvc
Definition: EFTrackingXrtAlgorithm.h:51