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#include <ROOT/RNTupleDescriptor.hxx>
17#include <ROOT/RNTupleInspector.hxx>
18#include <ROOT/RNTupleReader.hxx>
19#include <ROOT/RPageStorageFile.hxx>
20#include <gtest/gtest.h>
21
22#include <functional>
23#include <span>
24#include <string>
25#include <vector>
26
27class TFile;
28class TTree;
29
30namespace columnar
31{
34
35 namespace TestUtils
36 {
37 class IColumnData;
38 struct RNTupleBackend;
39 }
40
41
42 struct ColumnarPhysLiteTest : testing::Test
43 {
44 std::unique_ptr<TFile> file;
45 TTree *tree = nullptr;
46 std::unique_ptr<ROOT::RNTupleReader> rntreader;
47 std::unique_ptr<ROOT::Experimental::RNTupleInspector> inspector;
49 std::vector<std::shared_ptr<TestUtils::IColumnData>> knownColumns;
50 std::vector<std::shared_ptr<TestUtils::IColumnData>> usedColumns;
51 std::unordered_map<std::string,const std::vector<ColumnarOffsetType>*> offsetColumns;
52
55
57 std::string makeUniqueName ();
58
60 static bool checkMode ();
61
62 void setupKnownColumns (std::span<const TestUtils::TestDefinition> testDefinitions);
63
64 void setupColumns (const ColumnVectorHeader& columnHeader);
65
66 void doCall (const TestUtils::TestDefinition& testDefinition);
67
68 void doCallMulti (const std::vector<TestUtils::TestDefinition>& testDefinitions);
69 };
70}
71
72#endif
the header information for the entire columnar data vector
a class that interfaces an IColumnarTool to a ColumnVectorHeader
columnar::TestUtils::RNTupleBackend * rntbackend
std::vector< std::shared_ptr< TestUtils::IColumnData > > knownColumns
std::vector< std::shared_ptr< TestUtils::IColumnData > > usedColumns
std::unique_ptr< ROOT::Experimental::RNTupleInspector > inspector
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)
std::unique_ptr< ROOT::RNTupleReader > rntreader
void doCallMulti(const std::vector< TestUtils::TestDefinition > &testDefinitions)
static bool checkMode()
check whether we have the right mode