Project
Loading...
Searching...
No Matches
o2::framework::TableBuilder Class Reference

#include <TableBuilder.h>

Public Member Functions

void setLabel (const char *label)
 
 TableBuilder (arrow::MemoryPool *pool=arrow::default_memory_pool())
 
 ~TableBuilder ()
 
template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
auto persist (std::array< char const *, sizeof...(ARGS)+1 > const &columnNames)
 
template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) == 0) && (!ShouldNotDeconstruct<ARG0>)
auto persist (std::array< char const *, countColumns< ARG0, ARGS... >()> const &columnNames)
 
template<typename... ARGS>
auto persistTuple (framework::pack< ARGS... >, std::array< char const *, sizeof...(ARGS)> const &columnNames)
 Same a the above, but use a tuple to persist stuff.
 
template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
auto unsafePersist ()
 
template<typename T >
auto cursor ()
 
template<typename T >
auto unsafeCursor ()
 Same as cursor(), but uses UnsafeAppend. Only safe after reserve().
 
template<typename... Cs>
auto cursor (framework::pack< Cs... >)
 
template<typename T , typename E >
auto cursor ()
 
template<typename... Ts>
auto reserveArrays (std::tuple< Ts... > &holders, int s)
 Reserve method to expand the columns as needed.
 
template<typename... ARGS>
auto reserve (o2::framework::pack< ARGS... > &&, int s)
 
void extracted (bool &status)
 Actually creates the arrow::Table from the builders.
 
std::shared_ptr< arrow::Table > finalize ()
 

Static Public Member Functions

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) == 0) && (!ShouldNotDeconstruct<ARG0>)
static constexpr int countColumns ()
 
template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
static constexpr int countColumns ()
 

Detailed Description

Helper class which creates a lambda suitable for building an arrow table from a tuple. This can be used, for example to build an arrow::Table from a TDataFrame.

Definition at line 626 of file TableBuilder.h.

Constructor & Destructor Documentation

◆ TableBuilder()

o2::framework::TableBuilder::TableBuilder ( arrow::MemoryPool *  pool = arrow::default_memory_pool())
inline

Definition at line 680 of file TableBuilder.h.

◆ ~TableBuilder()

o2::framework::TableBuilder::~TableBuilder ( )
inline

Definition at line 686 of file TableBuilder.h.

Member Function Documentation

◆ countColumns() [1/2]

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) == 0) && (!ShouldNotDeconstruct<ARG0>)
static constexpr int o2::framework::TableBuilder::countColumns ( )
inlinestaticconstexpr

Definition at line 665 of file TableBuilder.h.

◆ countColumns() [2/2]

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
static constexpr int o2::framework::TableBuilder::countColumns ( )
inlinestaticconstexpr

Definition at line 673 of file TableBuilder.h.

◆ cursor() [1/3]

template<typename T >
auto o2::framework::TableBuilder::cursor ( )
inline

Definition at line 752 of file TableBuilder.h.

◆ cursor() [2/3]

template<typename T , typename E >
auto o2::framework::TableBuilder::cursor ( )
inline

Definition at line 775 of file TableBuilder.h.

◆ cursor() [3/3]

template<typename... Cs>
auto o2::framework::TableBuilder::cursor ( framework::pack< Cs... >  )
inline

Definition at line 769 of file TableBuilder.h.

◆ extracted()

void o2::framework::TableBuilder::extracted ( bool &  status)

Actually creates the arrow::Table from the builders.

◆ finalize()

std::shared_ptr< arrow::Table > o2::framework::TableBuilder::finalize ( )

Definition at line 60 of file TableBuilder.cxx.

◆ persist() [1/2]

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) == 0) && (!ShouldNotDeconstruct<ARG0>)
auto o2::framework::TableBuilder::persist ( std::array< char const *, countColumns< ARG0, ARGS... >()> const &  columnNames)
inline

Definition at line 708 of file TableBuilder.h.

◆ persist() [2/2]

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
auto o2::framework::TableBuilder::persist ( std::array< char const *, sizeof...(ARGS)+1 > const &  columnNames)
inline

Creates a lambda which is suitable to persist things in an arrow::Table

Definition at line 695 of file TableBuilder.h.

◆ persistTuple()

template<typename... ARGS>
auto o2::framework::TableBuilder::persistTuple ( framework::pack< ARGS... >  ,
std::array< char const *, sizeof...(ARGS)> const &  columnNames 
)
inline

Same a the above, but use a tuple to persist stuff.

Definition at line 720 of file TableBuilder.h.

◆ reserve()

template<typename... ARGS>
auto o2::framework::TableBuilder::reserve ( o2::framework::pack< ARGS... > &&  ,
int  s 
)
inline

Definition at line 790 of file TableBuilder.h.

◆ reserveArrays()

template<typename... Ts>
auto o2::framework::TableBuilder::reserveArrays ( std::tuple< Ts... > &  holders,
int  s 
)
inline

Reserve method to expand the columns as needed.

Definition at line 784 of file TableBuilder.h.

◆ setLabel()

void o2::framework::TableBuilder::setLabel ( const char label)

Definition at line 82 of file TableBuilder.cxx.

◆ unsafeCursor()

template<typename T >
auto o2::framework::TableBuilder::unsafeCursor ( )
inline

Same as cursor(), but uses UnsafeAppend. Only safe after reserve().

Definition at line 761 of file TableBuilder.h.

◆ unsafePersist()

template<typename ARG0 , typename... ARGS>
requires (sizeof...(ARGS) > 0) || ShouldNotDeconstruct<ARG0>
auto o2::framework::TableBuilder::unsafePersist ( )
inline

Same as persist, but uses UnsafeAppend (no capacity check). Only safe after reserve() has been called with the correct size.

Definition at line 741 of file TableBuilder.h.


The documentation for this class was generated from the following files: