ATLAS Offline Software
Loading...
Searching...
No Matches
F110StreamIntegrationAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
8
9#ifndef EFTRACKING_FPGA_INTEGRATION_F110StreamIntegrationAlg_H
10#define EFTRACKING_FPGA_INTEGRATION_F110StreamIntegrationAlg_H
11
12// EFTracking include
16
17// Athena include
20#include "GaudiKernel/ServiceHandle.h"
21#include "GaudiKernel/IChronoSvc.h"
24
26{
34 {
35 public:
36 using IntegrationBase::IntegrationBase;
37 virtual StatusCode initialize() override final;
38 virtual StatusCode execute(const EventContext &ctx) const override final;
39 virtual StatusCode finalize() override final;
40
41 private:
42 ServiceHandle<IChronoSvc> m_chronoSvc{"ChronoStatSvc", name()};
43
44 SG::ReadHandleKey<std::vector<uint64_t>> m_FPGAPixelRDO{this, "FPGAEncodedPixelKey", "FPGAEncodedPixelRDOs", "Pixel RDO converted to FPGA format"};
45 SG::ReadHandleKey<std::vector<uint64_t>> m_FPGAStripRDO{this, "FPGAEncodedStripKey", "FPGAEncodedStripRDOs", "Strip RDO converted to FPGA format"};
46
47 SG::ReadHandleKey<int> m_FPGAPixelRDOSize{this, "FPGAEncodedPixelSizeKey", "FPGAEncodedPixelSizeRDOs", "Pixel RDO converted to FPGA format"};
48 SG::ReadHandleKey<int> m_FPGAStripRDOSize{this, "FPGAEncodedStripSizeKey", "FPGAEncodedStripSizeRDOs", "Strip RDO converted to FPGA format"};
49
50 SG::WriteHandleKey<std::vector<uint32_t>> m_FPGAPixelOutput{this, "FPGAOutputPixelKey", "FPGAPixelOutput", "Pixel output from FPGA format"};
51 SG::WriteHandleKey<std::vector<uint32_t>> m_FPGAStripOutput{this, "FPGAOutputStripKey", "FPGAStripOutput", "Strip output from FPGA format"};
52
53 Gaudi::Property<int> m_FPGAThreads{this, "FPGAThreads", 1, "number of FPGA threads to initialize"};
54
55 Gaudi::Property<std::string> m_xclbin{this, "xclbin", "", "xclbin path and name"};
56
57 Gaudi::Property<std::string> m_pixelStartClusterKernelName{this, "PixelStartClusterKernelName", "", "Name of the pixel clustering start kernel"};
58 Gaudi::Property<std::string> m_pixelEndClusterKernelName{this, "PixelEndClusterKernelName", "", "Name of the pixel clustering end kernel"};
59
60 Gaudi::Property<std::string> m_stripStartClusterKernelName{this, "StripStartClusterKernelName", "", "Name of the strip clustering start kernel"};
61 Gaudi::Property<std::string> m_stripEndClusterKernelName{this, "StripEndClusterKernelName", "", "Name of the strip clustering end kernel"};
62
63
64 mutable std::atomic<ulonglong> m_numEvents{0};
65 mutable std::atomic<cl_ulong> m_pixelInputTime{0};
66 mutable std::atomic<cl_ulong> m_stripInputTime{0};
67
68 mutable std::atomic<cl_ulong> m_pixelPipelineTime{0};
69 mutable std::atomic<cl_ulong> m_stripPipelineTime{0};
70 mutable std::atomic<cl_ulong> m_pixelOutputTime{0};
71 mutable std::atomic<cl_ulong> m_stripOutputTime{0};
72
73 // Kernels
74 // Clustering
75 mutable std::vector<cl::Kernel> m_pixelStartClusteringKernels ATLAS_THREAD_SAFE;
76 mutable std::vector<cl::Kernel> m_pixelEndClusteringKernels ATLAS_THREAD_SAFE;
77 mutable std::vector<cl::Kernel> m_stripStartClusteringKernels ATLAS_THREAD_SAFE;
78 mutable std::vector<cl::Kernel> m_stripEndClusteringKernels ATLAS_THREAD_SAFE;
79
80 // Buffers for input
81 std::vector<cl::Buffer> m_pixelClusterInputBufferList;
82 std::vector<cl::Buffer> m_stripClusterInputBufferList;
83
84 // EDMPrep
85 std::vector<cl::Buffer> m_edmPixelOutputBufferList;
86 std::vector<cl::Buffer> m_edmStripOutputBufferList;
87
88 // Command queue
89 std::vector<cl::CommandQueue> m_acc_queues;
90 void getListofCUs(std::vector<std::string>& cuNames);
91
92
93 };
94}
95
96#endif // EFTRACKING_FPGA_INTEGRATION_F110StreamIntegrationAlg_H
This is the class for the benchmark algorithm specific to the FPGA integration and output conversion.
std::atomic< cl_ulong > m_stripPipelineTime
Time for strip pipeline.
Gaudi::Property< std::string > m_stripStartClusterKernelName
Name of the strip clustering kernel start.
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAPixelOutput
virtual StatusCode initialize() override final
Detect the OpenCL devices and prepare OpenCL context.
Gaudi::Property< std::string > m_pixelStartClusterKernelName
Name of the pixel clustering kernel start.
SG::WriteHandleKey< std::vector< uint32_t > > m_FPGAStripOutput
virtual StatusCode execute(const EventContext &ctx) const override final
Should be overriden by derived classes to perform meaningful work.
Gaudi::Property< std::string > m_stripEndClusterKernelName
Name of the strip clustering kernel start.
void getListofCUs(std::vector< std::string > &cuNames)
std::vector< cl::Kernel > m_pixelStartClusteringKernels ATLAS_THREAD_SAFE
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAStripRDO
std::atomic< cl_ulong > m_stripInputTime
Time for strip input buffer write.
std::atomic< cl_ulong > m_stripOutputTime
Time for strip output buffer read.
ServiceHandle< IChronoSvc > m_chronoSvc
Service for timing the algorithm.
std::atomic< cl_ulong > m_pixelPipelineTime
Time for pixel pipeline.
SG::ReadHandleKey< std::vector< uint64_t > > m_FPGAPixelRDO
std::atomic< cl_ulong > m_pixelInputTime
Time for pixel input buffer write.
std::atomic< ulonglong > m_numEvents
Number of events processed.
Gaudi::Property< std::string > m_pixelEndClusterKernelName
Name of the pixel clustering kernel start.
std::atomic< cl_ulong > m_pixelOutputTime
Time for pixel output buffer read.
The base class for the EFTracking FPGA integration development.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
The class for enconding RDO to FPGA format.