ATLAS Offline Software
Loading...
Searching...
No Matches
ColumnarPhysliteTest.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef COLUMNAR_TEST_FIXTURES__COLUMNAR_PHYS_LITE_TEST_H
9#define COLUMNAR_TEST_FIXTURES__COLUMNAR_PHYS_LITE_TEST_H
10
11#include <AsgTools/AsgTool.h>
16
17#include <gtest/gtest.h>
18
19#include <functional>
20#include <span>
21#include <string>
22#include <vector>
23
24class TFile;
25class TTree;
26
27namespace columnar
28{
31
32 namespace TestUtils
33 {
34 class IColumnData;
35 }
36
37
38 struct ColumnarPhysLiteTest : testing::Test
39 {
40 std::unique_ptr<TFile> file;
41 TTree *tree = nullptr;
42
43 std::vector<std::shared_ptr<TestUtils::IColumnData>> knownColumns;
44 std::vector<std::shared_ptr<TestUtils::IColumnData>> usedColumns;
45 std::unordered_map<std::string,const std::vector<ColumnarOffsetType>*> offsetColumns;
46
49
51 std::string makeUniqueName ();
52
54 static bool checkMode ();
55
56 void setupKnownColumns (std::span<const TestUtils::TestDefinition> testDefinitions);
57
58 void setupColumns (const ColumnVectorHeader& columnHeader);
59
60 void doCall (const TestUtils::TestDefinition& testDefinition);
61
62 void doCallMulti (const std::vector<TestUtils::TestDefinition>& testDefinitions);
63 };
64}
65
66#endif
the header information for the entire columnar data vector
a class that interfaces an IColumnarTool to a ColumnVectorHeader
std::vector< std::shared_ptr< TestUtils::IColumnData > > knownColumns
std::vector< std::shared_ptr< TestUtils::IColumnData > > usedColumns
std::string makeUniqueName()
make a unique tool name to be used in unit tests
std::unordered_map< std::string, const std::vector< ColumnarOffsetType > * > offsetColumns
void setupKnownColumns(std::span< const TestUtils::TestDefinition > testDefinitions)
void doCall(const TestUtils::TestDefinition &testDefinition)
void setupColumns(const ColumnVectorHeader &columnHeader)
void doCallMulti(const std::vector< TestUtils::TestDefinition > &testDefinitions)
static bool checkMode()
check whether we have the right mode