Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
BenchmarkAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
12 #ifndef EFTRACKING_FPGA_INTEGRATION_BENCHMARKALG_H
13 #define EFTRACKING_FPGA_INTEGRATION_BENCHMARKALG_H
14 
15 // EFTracking include
20 
21 // Athena include
24 #include "GaudiKernel/ServiceHandle.h"
25 #include "GaudiKernel/IChronoSvc.h"
26 
28 {
36  {
37  public:
38  using IntegrationBase::IntegrationBase;
39  virtual StatusCode initialize() override final;
40  virtual StatusCode execute(const EventContext &ctx) const override final;
41  virtual StatusCode finalize() override final;
42  StatusCode runPassThrough(std::vector<uint64_t> &pixelChainOutput, std::vector<uint64_t> &stripChainOutput, const EventContext &ctx) const;
43  StatusCode runDataPrep(std::vector<uint64_t> &pixelChainOutput, std::vector<uint64_t> &stripChainOutput, const EventContext &ctx) const;
44 
45  private:
47  "ChronoStatSvc", name()};
48 
49  ToolHandle<xAODClusterMaker> m_xaodClusterMaker{
50  this,
51  "xAODClusterMaker",
52  "xAODClusterMaker",
53  "Tool for creating xAOD cluster containers"};
54 
55  ToolHandle<TestVectorTool> m_testVectorTool{
56  this, "TestVectorTool", "TestVectorTool", "Tool for preparing test vectors"};
57 
58  ToolHandle<FPGADataFormatTool> m_FPGADataFormatTool{
59  this, "FPGADataFormatTool", "FPGADataFormatTool", "Tool for formatting FPGA data"};
60 
62  this, "InputPixelClusterKey", "ITkPixelClusters", "Key to access input pixel clusters"};
63 
65  this, "InputStripClusterKey", "ITkStripClusters", "Key to access input strip clusters"};
66 
67  SG::ReadHandleKey<PixelRDO_Container> m_pixelRDOKey{this, "PixelRDO", "ITkPixelRDOs"};
68 
69  SG::ReadHandleKey<SCT_RDO_Container> m_stripRDOKey{this, "StripRDO", "ITkStripRDOs"};
70 
71  Gaudi::Property<std::string> m_xclbin{
72  this, "xclbin", "", "xclbin path and name"};
73 
74  Gaudi::Property<std::string> m_edmKernelName{
75  this, "EDMPrepKernelName", "", "Name of the FPGA kernel"};
76 
77  Gaudi::Property<std::string> m_pixelClusterKernelName{
78  this, "PixelClusterKernelName", "", "Name of the pixel clustering kernel"};
79 
80  Gaudi::Property<std::string> m_stripClusterKernelName{
81  this, "StripClusterKernelName", "", "Name of the strip clustering kernel"};
82 
83  Gaudi::Property<std::string> m_pixelL2GKernelName{
84  this, "PixelL2GKernelName", "", "Name of the pixel L2G kernel"};
85 
86  Gaudi::Property<std::string> m_stripL2GKernelName{
87  this, "StripL2GKernelName", "", "Name of the strip L2G kernel"};
88 
89  Gaudi::Property<bool> m_runPassThrough{
90  this, "runPassThrough", true, "Run the pass-through kernel"};
91 
92  mutable std::atomic<ulonglong> m_numEvents{0};
93  mutable std::atomic<cl_ulong> m_pixelInputTime{0};
94  mutable std::atomic<cl_ulong> m_stripInputTime{0};
95  mutable std::atomic<cl_ulong> m_pixelClusteringTime{0};
96  mutable std::atomic<cl_ulong> m_stripClusteringTime{0};
97  mutable std::atomic<cl_ulong> m_pixelL2GTime{0};
98  mutable std::atomic<cl_ulong> m_stripL2GTime{0};
99  mutable std::atomic<cl_ulong> m_edmPrepTime{0};
100  mutable std::atomic<cl_ulong> m_pixelOutputTime{0};
101  mutable std::atomic<cl_ulong> m_stripOutputTime{0};
102  mutable std::atomic<cl_ulong> m_kernelTime{0};
103  };
104 }
105 
106 #endif // EFTRACKING_FPGA_INTEGRATION_BENCHMARKALG_H
EFTrackingFPGAIntegration::BenchmarkAlg::m_edmKernelName
Gaudi::Property< std::string > m_edmKernelName
Name of the FPGA kernel.
Definition: BenchmarkAlg.h:74
IntegrationBase
The base class for the EFTracking FPGA integration development.
Definition: IntegrationBase.h:38
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripClusteringTime
std::atomic< cl_ulong > m_stripClusteringTime
Time for strip clustering.
Definition: BenchmarkAlg.h:96
EFTrackingFPGAIntegration::BenchmarkAlg::m_chronoSvc
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
Definition: BenchmarkAlg.h:46
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GKernelName
Gaudi::Property< std::string > m_pixelL2GKernelName
Name of the pixel L2G kernel.
Definition: BenchmarkAlg.h:83
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelL2GTime
std::atomic< cl_ulong > m_pixelL2GTime
Time for pixel L2G.
Definition: BenchmarkAlg.h:97
EFTrackingFPGAIntegration::BenchmarkAlg::initialize
virtual StatusCode initialize() override final
Detect the OpenCL devices and prepare OpenCL context.
Definition: BenchmarkAlg.cxx:17
IntegrationBase.h
EFTrackingFPGAIntegration::BenchmarkAlg::m_inputPixelClusterKey
SG::ReadHandleKey< xAOD::PixelClusterContainer > m_inputPixelClusterKey
Key to access input pixel clusters.
Definition: BenchmarkAlg.h:61
SG::ReadHandleKey< xAOD::PixelClusterContainer >
EFTrackingFPGAIntegration::BenchmarkAlg::finalize
virtual StatusCode finalize() override final
Definition: BenchmarkAlg.cxx:522
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelRDOKey
SG::ReadHandleKey< PixelRDO_Container > m_pixelRDOKey
Definition: BenchmarkAlg.h:67
EFTrackingFPGAIntegration::BenchmarkAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Should be overriden by derived classes to perform meaningful work.
Definition: BenchmarkAlg.cxx:46
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripOutputTime
std::atomic< cl_ulong > m_stripOutputTime
Time for strip output buffer read.
Definition: BenchmarkAlg.h:101
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripRDOKey
SG::ReadHandleKey< SCT_RDO_Container > m_stripRDOKey
Definition: BenchmarkAlg.h:69
SCT_RDO_Container.h
EFTrackingFPGAIntegration::BenchmarkAlg
This is the class for the benchmark algorithm specific to the FPGA integration and output conversion.
Definition: BenchmarkAlg.h:36
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelInputTime
std::atomic< cl_ulong > m_pixelInputTime
Time for pixel input buffer write.
Definition: BenchmarkAlg.h:93
EFTrackingFPGAIntegration
Definition: BenchmarkAlg.h:28
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripL2GKernelName
Gaudi::Property< std::string > m_stripL2GKernelName
Name of the strip L2G kernelS.
Definition: BenchmarkAlg.h:86
EFTrackingFPGAIntegration::BenchmarkAlg::m_FPGADataFormatTool
ToolHandle< FPGADataFormatTool > m_FPGADataFormatTool
Tool for formatting FPGA data.
Definition: BenchmarkAlg.h:58
EFTrackingFPGAIntegration::BenchmarkAlg::m_xclbin
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
Definition: BenchmarkAlg.h:71
EFTrackingFPGAIntegration::BenchmarkAlg::m_testVectorTool
ToolHandle< TestVectorTool > m_testVectorTool
Tool for preparing test vectors.
Definition: BenchmarkAlg.h:55
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripClusterKernelName
Gaudi::Property< std::string > m_stripClusterKernelName
Name of the strip clustering kernel.
Definition: BenchmarkAlg.h:80
EFTrackingFPGAIntegration::BenchmarkAlg::m_xaodClusterMaker
ToolHandle< xAODClusterMaker > m_xaodClusterMaker
Tool for creating xAOD containers.
Definition: BenchmarkAlg.h:49
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
EFTrackingFPGAIntegration::BenchmarkAlg::m_numEvents
std::atomic< ulonglong > m_numEvents
Number of events processed.
Definition: BenchmarkAlg.h:92
PixelRDO_Container.h
EFTrackingFPGAIntegration::BenchmarkAlg::m_kernelTime
std::atomic< cl_ulong > m_kernelTime
Time for kernel execution.
Definition: BenchmarkAlg.h:102
EFTrackingFPGAIntegration::BenchmarkAlg::m_inputStripClusterKey
SG::ReadHandleKey< xAOD::StripClusterContainer > m_inputStripClusterKey
Key to access input strip clusters.
Definition: BenchmarkAlg.h:64
xAODClusterMaker.h
FPGADataFormatTool.h
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripInputTime
std::atomic< cl_ulong > m_stripInputTime
Time for strip input buffer write.
Definition: BenchmarkAlg.h:94
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelClusterKernelName
Gaudi::Property< std::string > m_pixelClusterKernelName
Name of the pixel clustering kernel.
Definition: BenchmarkAlg.h:77
EFTrackingFPGAIntegration::BenchmarkAlg::runPassThrough
StatusCode runPassThrough(std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
Definition: BenchmarkAlg.cxx:270
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelClusteringTime
std::atomic< cl_ulong > m_pixelClusteringTime
Time for pixel clustering.
Definition: BenchmarkAlg.h:95
EFTrackingFPGAIntegration::BenchmarkAlg::m_pixelOutputTime
std::atomic< cl_ulong > m_pixelOutputTime
Time for pixel output buffer read.
Definition: BenchmarkAlg.h:100
TestVectorTool.h
EFTrackingFPGAIntegration::BenchmarkAlg::m_stripL2GTime
std::atomic< cl_ulong > m_stripL2GTime
Time for strip L2G.
Definition: BenchmarkAlg.h:98
EFTrackingFPGAIntegration::BenchmarkAlg::m_edmPrepTime
std::atomic< cl_ulong > m_edmPrepTime
Time for EDM preparation.
Definition: BenchmarkAlg.h:99
ServiceHandle< IChronoSvc >
EFTrackingFPGAIntegration::BenchmarkAlg::m_runPassThrough
Gaudi::Property< bool > m_runPassThrough
Run the pass-through kernel.
Definition: BenchmarkAlg.h:89
EFTrackingFPGAIntegration::BenchmarkAlg::runDataPrep
StatusCode runDataPrep(std::vector< uint64_t > &pixelChainOutput, std::vector< uint64_t > &stripChainOutput, const EventContext &ctx) const
Definition: BenchmarkAlg.cxx:331