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>
15
16#include <gtest/gtest.h>
17
18#include <functional>
19#include <string>
20#include <vector>
21
22class TFile;
23class TTree;
24
25namespace columnar
26{
28
29 namespace TestUtils
30 {
31 class IColumnData;
32 }
33
34
35 struct ColumnarPhysLiteTest : testing::Test
36 {
37 std::unique_ptr<TFile> file;
38 TTree *tree = nullptr;
39
40 std::vector<std::shared_ptr<TestUtils::IColumnData>> knownColumns;
41 std::vector<std::shared_ptr<TestUtils::IColumnData>> usedColumns;
42 std::unordered_map<std::string,const std::vector<ColumnarOffsetType>*> offsetColumns;
43
46
48 std::string makeUniqueName ();
49
51 static bool checkMode ();
52
53 void setupKnownColumns ();
54
55 void setupColumns (ToolColumnVectorMap& toolWrapper);
56
57 void doCall (asg::AsgTool& tool, const std::string& name, const std::string& container, TestUtils::IXAODToolCaller& xAODToolCaller, const std::vector<std::pair<std::string,std::string>>& containerRenames, const std::string& sysName = "");
58 };
59}
60
61#endif
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
a wrapper around a CP tool in xAOD mdoe to call it in the PHYSLITE test
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
void setupColumns(ToolColumnVectorMap &toolWrapper)
void doCall(asg::AsgTool &tool, const std::string &name, const std::string &container, TestUtils::IXAODToolCaller &xAODToolCaller, const std::vector< std::pair< std::string, std::string > > &containerRenames, const std::string &sysName="")
std::string makeUniqueName()
make a unique tool name to be used in unit tests
std::unordered_map< std::string, const std::vector< ColumnarOffsetType > * > offsetColumns
static bool checkMode()
check whether we have the right mode