Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
columnar::PhysliteTestHelpers::ColumnDataScalar< T > Struct Template Referencefinal
Inheritance diagram for columnar::PhysliteTestHelpers::ColumnDataScalar< T >:
Collaboration diagram for columnar::PhysliteTestHelpers::ColumnDataScalar< T >:

Public Member Functions

 ColumnDataScalar (const std::string &val_columnName, const std::string &val_branchName)
 
virtual bool connect (TTree *tree, std::unordered_map< std::string, const PhysliteTestHelpers::IColumnData * > &, std::unordered_map< std::string, ColumnInfo > &requestedColumns) override
 
virtual std::size_t getSize () const override
 
virtual void setData (ColumnarToolWrapperData &tool, Long64_t entry) override
 

Public Attributes

std::string columnName
 
std::string branchName
 
data {}
 
TBranch * branch = nullptr
 
Benchmark benchmark
 

Detailed Description

template<typename T>
struct columnar::PhysliteTestHelpers::ColumnDataScalar< T >

Definition at line 133 of file ColumnarPhysliteTest.cxx.

Constructor & Destructor Documentation

◆ ColumnDataScalar()

template<typename T >
columnar::PhysliteTestHelpers::ColumnDataScalar< T >::ColumnDataScalar ( const std::string &  val_columnName,
const std::string &  val_branchName 
)
inline

Definition at line 141 of file ColumnarPhysliteTest.cxx.

142  : columnName (val_columnName), branchName (val_branchName), benchmark (columnName) {}

Member Function Documentation

◆ connect()

template<typename T >
virtual bool columnar::PhysliteTestHelpers::ColumnDataScalar< T >::connect ( TTree *  tree,
std::unordered_map< std::string, const PhysliteTestHelpers::IColumnData * > &  ,
std::unordered_map< std::string, ColumnInfo > &  requestedColumns 
)
inlineoverridevirtual

Implements columnar::PhysliteTestHelpers::IColumnData.

Definition at line 144 of file ColumnarPhysliteTest.cxx.

145  {
146  auto iter = requestedColumns.find (columnName);
147  if (iter == requestedColumns.end())
148  return false;
149 
150  branch = tree->GetBranch (branchName.c_str());
151  if (!branch)
152  throw std::runtime_error ("failed to get branch: " + branchName);
153  branch->SetAddress (&data);
154 
155  requestedColumns.erase (iter);
156  return true;
157  }

◆ getSize()

template<typename T >
virtual std::size_t columnar::PhysliteTestHelpers::ColumnDataScalar< T >::getSize ( ) const
inlineoverridevirtual

Implements columnar::PhysliteTestHelpers::IColumnData.

Definition at line 159 of file ColumnarPhysliteTest.cxx.

160  {
161  return 1;
162  }

◆ setData()

template<typename T >
virtual void columnar::PhysliteTestHelpers::ColumnDataScalar< T >::setData ( ColumnarToolWrapperData tool,
Long64_t  entry 
)
inlineoverridevirtual

Implements columnar::PhysliteTestHelpers::IColumnData.

Definition at line 164 of file ColumnarPhysliteTest.cxx.

165  {
166  benchmark.startTimer ();
167  branch->GetEntry (entry);
168  benchmark.stopTimer ();
169  tool.setColumn (columnName, 1, &data);
170  }

Member Data Documentation

◆ benchmark

template<typename T >
Benchmark columnar::PhysliteTestHelpers::ColumnDataScalar< T >::benchmark

Definition at line 139 of file ColumnarPhysliteTest.cxx.

◆ branch

template<typename T >
TBranch* columnar::PhysliteTestHelpers::ColumnDataScalar< T >::branch = nullptr

Definition at line 138 of file ColumnarPhysliteTest.cxx.

◆ branchName

template<typename T >
std::string columnar::PhysliteTestHelpers::ColumnDataScalar< T >::branchName

Definition at line 136 of file ColumnarPhysliteTest.cxx.

◆ columnName

template<typename T >
std::string columnar::PhysliteTestHelpers::ColumnDataScalar< T >::columnName

Definition at line 135 of file ColumnarPhysliteTest.cxx.

◆ data

template<typename T >
T columnar::PhysliteTestHelpers::ColumnDataScalar< T >::data {}

Definition at line 137 of file ColumnarPhysliteTest.cxx.


The documentation for this struct was generated from the following file:
columnar::PhysliteTestHelpers::ColumnDataScalar::columnName
std::string columnName
Definition: ColumnarPhysliteTest.cxx:135
tree
TChain * tree
Definition: tile_monitor.h:30
columnar::PhysliteTestHelpers::ColumnDataScalar::benchmark
Benchmark benchmark
Definition: ColumnarPhysliteTest.cxx:139
columnar::PhysliteTestHelpers::ColumnDataScalar::branch
TBranch * branch
Definition: ColumnarPhysliteTest.cxx:138
columnar::PhysliteTestHelpers::ColumnDataScalar::data
T data
Definition: ColumnarPhysliteTest.cxx:137
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
columnar::PhysliteTestHelpers::ColumnDataScalar::branchName
std::string branchName
Definition: ColumnarPhysliteTest.cxx:136