ATLAS Offline Software
Loading...
Searching...
No Matches
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
11
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
45
46class TestVectorTool : public extends<AthAlgTool, IEFTrackingFPGAIntegrationTool>
47{
48public:
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
StatusCode encodePixelL2G(const xAOD::PixelClusterContainer *pixelClusters, std::vector< uint64_t > &encodedData) const
Encode xAOD pixel cluster to L2G EDM TV.
StatusCode initialize() override
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.
StatusCode encodeStripL2G(const xAOD::StripClusterContainer *stripClusters, std::vector< uint64_t > &encodedData) const
Encode xAOD strip cluster to L2G EDM TV.
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>
The class for enconding RDO to FPGA format.
PixelClusterContainer_v1 PixelClusterContainer
Define the version of the pixel cluster container.
StripClusterContainer_v1 StripClusterContainer
Define the version of the strip cluster container.
std::vector< uint64_t > inputTV
TVHolder(const std::string &name)