ATLAS Offline Software
TestVectorTool.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__TEST_VECTOR_TOOL_H
13 #define EFTRACKING_FPGA_INTEGRATION__TEST_VECTOR_TOOL_H
14 
19 
20 #include <string>
21 #include <vector>
22 
24 {
28  struct TVHolder
29  {
30  TVHolder() = default;
31  TVHolder(const std::string &name) : name(name) {}
32  std::string name = "";
33  std::vector<uint64_t> inputTV{0};
34  std::vector<uint64_t> refTV{0};
35  };
36 }
37 
46 class TestVectorTool : public extends<AthAlgTool, IEFTrackingFPGAIntegrationTool>
47 {
48 public:
49  using extends::extends;
50 
51  StatusCode initialize() override;
52 
58  StatusCode prepareTV(const std::string &inputFile, std::vector<uint64_t> &testVector) const;
59 
63  StatusCode compare(const std::vector<uint64_t> &tv_1, const std::vector<uint64_t> &tv_2) const;
64 
70  StatusCode compare(const EFTrackingFPGAIntegration::TVHolder &tvHolder, const std::vector<uint64_t> &tv_comp) const;
71 
77  StatusCode encodePixelL2G(const xAOD::PixelClusterContainer *pixelClusters, std::vector<uint64_t> &encodedData) const;
78 
85  StatusCode encodeStripL2G(const xAOD::StripClusterContainer *stripClusters, std::vector<uint64_t> &encodedData) const;
86 };
87 
88 #endif // EFTRACKING_FPGA_INTEGRATION__TEST_VECTOR_TOOL_H
EFTrackingFPGAIntegration::TVHolder::refTV
std::vector< uint64_t > refTV
Definition: TestVectorTool.h:34
EFTrackingFPGAIntegration::TVHolder::TVHolder
TVHolder(const std::string &name)
Definition: TestVectorTool.h:31
TestVectorTool::initialize
StatusCode initialize() override
Definition: TestVectorTool.cxx:16
TestVectorTool::prepareTV
StatusCode prepareTV(const std::string &inputFile, std::vector< uint64_t > &testVector) const
Prepare test vector in the form of std::vector<uint64_t>, can be either .txt or .bin.
Definition: TestVectorTool.cxx:23
EFTrackingFPGAIntegration::TVHolder::name
std::string name
Definition: TestVectorTool.h:32
TestVectorTool::compare
StatusCode compare(const std::vector< uint64_t > &tv_1, const std::vector< uint64_t > &tv_2) const
Compare two TV in the form of std::vector<uint64_t>
Definition: TestVectorTool.cxx:80
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:16
TestVectorTool::encodePixelL2G
StatusCode encodePixelL2G(const xAOD::PixelClusterContainer *pixelClusters, std::vector< uint64_t > &encodedData) const
Encode xAOD pixel cluster to L2G EDM TV.
Definition: TestVectorTool.cxx:160
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PixelClusterContainer.h
AthAlgTool.h
EFTrackingFPGAIntegration::TVHolder
Definition: TestVectorTool.h:29
EFTrackingFPGAIntegration
The class for enconding RDO to FPGA format.
Definition: BenchmarkAlg.h:28
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
TestVectorTool::encodeStripL2G
StatusCode encodeStripL2G(const xAOD::StripClusterContainer *stripClusters, std::vector< uint64_t > &encodedData) const
Encode xAOD strip cluster to L2G EDM TV.
Definition: TestVectorTool.cxx:268
TestVectorTool
Definition: TestVectorTool.h:47
StripClusterContainer.h
IEFTrackingFPGAIntegrationTool.h
EFTrackingFPGAIntegration::TVHolder::TVHolder
TVHolder()=default
EFTrackingFPGAIntegration::TVHolder::inputTV
std::vector< uint64_t > inputTV
Definition: TestVectorTool.h:33