Project
Loading...
Searching...
No Matches
o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT > Class Template Reference

#include <TableView.h>

Classes

struct  FrameData
 descriptor pointing to payload of one frame More...
 
struct  FrameIndex
 FrameIndex is composed from column description and row number. More...
 
class  iterator
 Iterator class for configurable direction, i.e. either row or column. More...
 
class  outerIterator
 iterator for the outer access of the index, either row or column direction More...
 

Public Types

using RowDescType = RowDescT
 
using ColumnIndexType = ColumnDescT
 
using ParserType = ParserT
 
typedef FrameData(* AccessFct) (unsigned, unsigned)
 
using ColumnIterator = outerIterator< iterator::kAlongRow >
 definition of the outer iterator over column
 
using RowIterator = outerIterator< iterator::kAlongColumn >
 definition of the outer iterator over row
 

Public Member Functions

 TableView ()=default
 
 ~TableView ()=default
 
size_t addRow (RowDescType rowData, std::byte *seqData, size_t seqSize)
 
void clear ()
 clear the index, i.e. all internal lists
 
size_t getNColumns () const
 get number of columns in the created index
 
size_t getNRows () const
 get number of rows, i.e. number rows in the created index
 
const RowDescTypegetRowData (size_t row) const
 get row data for a data set
 
ColumnIterator begin ()
 begin of the outer iteration
 
ColumnIterator end ()
 end of outer iteration
 

Detailed Description

template<typename RowDescT, typename ColumnDescT, typename ParserT>
class o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >

Container class for multiple sequences of data wrapped by markers.

This is a container for data sequences of multiple frames consisting of a header marker struct, a payload, and an optional trailer marker struct. Each sequence forms a row in the TableView, the columns are provided by the markers/frames.

A parser is used to step through the data sequence and extract headers, trailers and payload positions.

Requirements:

  • both header and trailer type must provide an operator bool() method to check validity
  • the size of one frame needs to be extracted either from the header marker or the trailer marker. The first requires forward, the latter backward parsing. In the first case, the trailer is optional, while in the latter required

Definition at line 54 of file TableView.h.

Member Typedef Documentation

◆ AccessFct

template<typename RowDescT , typename ColumnDescT , typename ParserT >
typedef FrameData(* o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::AccessFct) (unsigned, unsigned)

Definition at line 166 of file TableView.h.

◆ ColumnIndexType

template<typename RowDescT , typename ColumnDescT , typename ParserT >
using o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::ColumnIndexType = ColumnDescT

Definition at line 61 of file TableView.h.

◆ ColumnIterator

template<typename RowDescT , typename ColumnDescT , typename ParserT >
using o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::ColumnIterator = outerIterator<iterator::kAlongRow>

definition of the outer iterator over column

Definition at line 307 of file TableView.h.

◆ ParserType

template<typename RowDescT , typename ColumnDescT , typename ParserT >
using o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::ParserType = ParserT

Definition at line 62 of file TableView.h.

◆ RowDescType

template<typename RowDescT , typename ColumnDescT , typename ParserT >
using o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::RowDescType = RowDescT

Definition at line 60 of file TableView.h.

◆ RowIterator

template<typename RowDescT , typename ColumnDescT , typename ParserT >
using o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::RowIterator = outerIterator<iterator::kAlongColumn>

definition of the outer iterator over row

Definition at line 309 of file TableView.h.

Constructor & Destructor Documentation

◆ TableView()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::TableView ( )
default

◆ ~TableView()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::~TableView ( )
default

Member Function Documentation

◆ addRow()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
size_t o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::addRow ( RowDescType  rowData,
std::byte *  seqData,
size_t  seqSize 
)
inline

Add a new data sequence, the set is traversed according to parser

TODO: functors to check header and trailer validity as well as retrieving the frame size could be passed as arguments.

Parameters
rowDataDescriptive data struct for the sequence
seqDataPointer to sequence
seqSizeLength of sequence
Returns
number of inserted elements

Definition at line 98 of file TableView.h.

◆ begin()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
ColumnIterator o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::begin ( )
inline

begin of the outer iteration

Definition at line 312 of file TableView.h.

◆ clear()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
void o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::clear ( )
inline

clear the index, i.e. all internal lists

Definition at line 133 of file TableView.h.

◆ end()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
ColumnIterator o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::end ( )
inline

end of outer iteration

Definition at line 318 of file TableView.h.

◆ getNColumns()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
size_t o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::getNColumns ( ) const
inline

get number of columns in the created index

Definition at line 141 of file TableView.h.

◆ getNRows()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
size_t o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::getNRows ( ) const
inline

get number of rows, i.e. number rows in the created index

Definition at line 144 of file TableView.h.

◆ getRowData()

template<typename RowDescT , typename ColumnDescT , typename ParserT >
const RowDescType & o2::algorithm::TableView< RowDescT, ColumnDescT, ParserT >::getRowData ( size_t  row) const
inline

get row data for a data set

Definition at line 147 of file TableView.h.


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