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 T >
auto cursor ()
 
template<typename... Cs>
auto cursor (framework::pack< Cs... >)
 
template<typename T , typename E >
auto cursor ()
 
template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto preallocatedPersist (std::array< char const *, NCOLUMNS > const &columnNames, int nRows)
 
template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto bulkPersist (std::array< char const *, NCOLUMNS > const &columnNames, size_t nRows)
 
template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto bulkPersistChunked (std::array< char const *, NCOLUMNS > const &columnNames, size_t nRows)
 
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 632 of file TableBuilder.h.

Constructor & Destructor Documentation

◆ TableBuilder()

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

Definition at line 684 of file TableBuilder.h.

◆ ~TableBuilder()

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

Definition at line 690 of file TableBuilder.h.

Member Function Documentation

◆ bulkPersist()

template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto o2::framework::TableBuilder::bulkPersist ( std::array< char const *, NCOLUMNS > const &  columnNames,
size_t  nRows 
)
inline

Definition at line 780 of file TableBuilder.h.

◆ bulkPersistChunked()

template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto o2::framework::TableBuilder::bulkPersistChunked ( std::array< char const *, NCOLUMNS > const &  columnNames,
size_t  nRows 
)
inline

Definition at line 793 of file TableBuilder.h.

◆ 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 669 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 677 of file TableBuilder.h.

◆ cursor() [1/3]

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

Definition at line 744 of file TableBuilder.h.

◆ cursor() [2/3]

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

Definition at line 758 of file TableBuilder.h.

◆ cursor() [3/3]

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

Definition at line 752 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 712 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 699 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 724 of file TableBuilder.h.

◆ preallocatedPersist()

template<typename... ARGS, size_t NCOLUMNS = sizeof...(ARGS)>
auto o2::framework::TableBuilder::preallocatedPersist ( std::array< char const *, NCOLUMNS > const &  columnNames,
int  nRows 
)
inline

Definition at line 766 of file TableBuilder.h.

◆ reserve()

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

Definition at line 812 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 806 of file TableBuilder.h.

◆ setLabel()

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

Definition at line 82 of file TableBuilder.cxx.


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