Loading [MathJax]/extensions/MathMenu.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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>
12 
13 #include <gtest/gtest.h>
14 
15 #include <functional>
16 #include <string>
17 #include <vector>
18 
19 class TFile;
20 class TTree;
21 
22 namespace columnar
23 {
24  namespace PhysliteTestHelpers
25  {
26  class IColumnData;
27  }
28 
29  class ColumnarToolWrapper;
30 
31  struct ColumnarPhysLiteTest : testing::Test
32  {
33  std::unique_ptr<TFile> file;
34  TTree *tree = nullptr;
35 
36  std::vector<std::shared_ptr<PhysliteTestHelpers::IColumnData>> knownColumns;
37  std::vector<std::shared_ptr<PhysliteTestHelpers::IColumnData>> usedColumns;
38  std::unordered_map<std::string,const PhysliteTestHelpers::IColumnData*> sizeColumns;
39 
42 
44  std::string makeUniqueName ();
45 
47  static bool checkMode ();
48 
49  void setupKnownColumns ();
50 
51  void setupColumns (ColumnarToolWrapper& toolWrapper);
52 
54  struct XAODArgs
55  {
56  std::string inputContainer;
57  std::string outputContainer;
58  bool isPrepCall = false;
59  };
60 
61  void doCall (asg::AsgTool& tool, const std::string& name, const std::string& container, std::function<void(XAODArgs&)> callXAOD, const std::vector<std::pair<std::string,std::string>>& containerRenames, const std::string& sysName = "");
62  };
63 }
64 
65 #endif
CaloCondBlobAlgs_fillNoiseFromASCII.sysName
sysName
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:93
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
columnar::ColumnarPhysLiteTest::XAODArgs::outputContainer
std::string outputContainer
Definition: ColumnarPhysliteTest.h:57
columnar::ColumnarPhysLiteTest::setupColumns
void setupColumns(ColumnarToolWrapper &toolWrapper)
Definition: ColumnarPhysliteTest.cxx:594
columnar::ColumnarPhysLiteTest::XAODArgs::inputContainer
std::string inputContainer
Definition: ColumnarPhysliteTest.h:56
columnar::ColumnarPhysLiteTest::~ColumnarPhysLiteTest
~ColumnarPhysLiteTest()
columnar::ColumnarPhysLiteTest::ColumnarPhysLiteTest
ColumnarPhysLiteTest()
Definition: ColumnarPhysliteTest.cxx:459
columnar::ColumnarPhysLiteTest::file
std::unique_ptr< TFile > file
Definition: ColumnarPhysliteTest.h:33
columnar::ColumnarPhysLiteTest::XAODArgs::isPrepCall
bool isPrepCall
Definition: ColumnarPhysliteTest.h:58
columnar::ColumnarPhysLiteTest::makeUniqueName
std::string makeUniqueName()
make a unique tool name to be used in unit tests
Definition: ColumnarPhysliteTest.cxx:491
columnar::ColumnarPhysLiteTest::setupKnownColumns
void setupKnownColumns()
Definition: ColumnarPhysliteTest.cxx:503
columnar::ColumnarPhysLiteTest::knownColumns
std::vector< std::shared_ptr< PhysliteTestHelpers::IColumnData > > knownColumns
Definition: ColumnarPhysliteTest.h:36
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
columnar::ColumnarToolWrapper
a class that wraps an IColumnarTool for use in Python
Definition: ColumnarToolWrapper.h:36
columnar::ColumnarPhysLiteTest::doCall
void doCall(asg::AsgTool &tool, const std::string &name, const std::string &container, std::function< void(XAODArgs &)> callXAOD, const std::vector< std::pair< std::string, std::string >> &containerRenames, const std::string &sysName="")
Definition: ColumnarPhysliteTest.cxx:626
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
columnar::ColumnarPhysLiteTest::tree
TTree * tree
Definition: ColumnarPhysliteTest.h:34
columnar::ColumnarPhysLiteTest::checkMode
static bool checkMode()
check whether we have the right mode
Definition: ColumnarPhysliteTest.cxx:498
columnar
Definition: ClusterDef.h:16
columnar::ColumnarPhysLiteTest
Definition: ColumnarPhysliteTest.h:32
columnar::ColumnarPhysLiteTest::sizeColumns
std::unordered_map< std::string, const PhysliteTestHelpers::IColumnData * > sizeColumns
Definition: ColumnarPhysliteTest.h:38
AsgTool.h
columnar::ColumnarPhysLiteTest::XAODArgs
the arguments for the function calling in xAOD mode
Definition: ColumnarPhysliteTest.h:55
columnar::PhysliteTestHelpers::IColumnData
Definition: ColumnarPhysliteTest.cxx:95
columnar::ColumnarPhysLiteTest::usedColumns
std::vector< std::shared_ptr< PhysliteTestHelpers::IColumnData > > usedColumns
Definition: ColumnarPhysliteTest.h:37