artdaq_demo_hdf5  v1_02_01
artdaq::hdf5::HighFiveDatasetHelper Class Reference

Helper class for HighFiveNtupleDataset. More...

#include <artdaq-demo-hdf5/HDF5/highFive/highFiveDatasetHelper.hh>

Public Member Functions

 HighFiveDatasetHelper (HighFive::DataSet const &dataset, size_t chunk_size=128)
 HighFiveDatasetHelper Constructor. More...
 
template<typename T >
void write (T const &data)
 Write a value to the column, resizing if necessary. More...
 
template<typename T >
void write (T const &data, size_t width)
 Write a value to the column, resizing if necessary. More...
 
template<typename T >
std::vector< T > read (size_t row)
 Read a set of value from a row of the column. More...
 
template<typename T >
readOne (size_t row)
 Read a single value from the column. More...
 
size_t getDatasetSize ()
 Get the number of rows in the column. More...
 
size_t getRowSize ()
 Get the number of entries in each row. More...
 

Detailed Description

Helper class for HighFiveNtupleDataset.

This class represents a column in an Ntuple-formatted group of datasets

Definition at line 14 of file highFiveDatasetHelper.hh.

Constructor & Destructor Documentation

artdaq::hdf5::HighFiveDatasetHelper::HighFiveDatasetHelper ( HighFive::DataSet const &  dataset,
size_t  chunk_size = 128 
)
inline

HighFiveDatasetHelper Constructor.

Parameters
datasetHighFive::DataSet to read/write
chunk_sizeNumber of rows per chunk in the dataset

Definition at line 22 of file highFiveDatasetHelper.hh.

Member Function Documentation

size_t artdaq::hdf5::HighFiveDatasetHelper::getDatasetSize ( )
inline

Get the number of rows in the column.

Returns
The number of rows in the column

Definition at line 99 of file highFiveDatasetHelper.hh.

size_t artdaq::hdf5::HighFiveDatasetHelper::getRowSize ( )
inline

Get the number of entries in each row.

Returns
The number of entries in each row

Definition at line 104 of file highFiveDatasetHelper.hh.

template<typename T >
std::vector<T> artdaq::hdf5::HighFiveDatasetHelper::read ( size_t  row)
inline

Read a set of value from a row of the column.

Parameters
rowRow to read
Returns
Vector of values read from column

Definition at line 68 of file highFiveDatasetHelper.hh.

template<typename T >
T artdaq::hdf5::HighFiveDatasetHelper::readOne ( size_t  row)
inline

Read a single value from the column.

Parameters
rowRow to read
Returns
Value in the first slot in the column at the desginated row

Definition at line 87 of file highFiveDatasetHelper.hh.

template<typename T >
void artdaq::hdf5::HighFiveDatasetHelper::write ( T const &  data)
inline

Write a value to the column, resizing if necessary.

Parameters
dataValue to write

Definition at line 40 of file highFiveDatasetHelper.hh.

template<typename T >
void artdaq::hdf5::HighFiveDatasetHelper::write ( T const &  data,
size_t  width 
)
inline

Write a value to the column, resizing if necessary.

Parameters
dataValue to write
widthNumber of dataset values represented by data

Definition at line 54 of file highFiveDatasetHelper.hh.


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