ATLAS Offline Software
|
Namespaces | |
defaults | |
hist | |
internal | |
clssses to add type traits for H5 | |
Classes | |
struct | AppOpts |
class | Consumers |
class | DefaultMerger |
class | IH5Merger |
struct | IOOpts |
struct | TreeCopyOpts |
class | VariableFillers |
Variable filler arrays. More... | |
class | Writer |
Writer. More... | |
struct | WriterConfiguration |
class | WriterXd |
WriterXd. More... | |
Typedefs | |
template<typename T > | |
using | CRefConsumer = Consumers< const T & > |
CRefConsumer. More... | |
template<size_t N, typename T > | |
using | CRefWriter = Writer< N, const T & > |
CRefWriter. More... | |
template<typename T > | |
using | SimpleWriter = Writer< 0, const T & > |
SimpleWriter. More... | |
Enumerations | |
enum | Compression { Compression::STANDARD, Compression::HALF_PRECISION, Compression::HALF_PRECISION_LARGE } |
Functions | |
bool | checkDatasetsToMerge (const H5::DataSet &target, const H5::DataSet &source, hsize_t mergeAxis) |
Make sure that two datasets can be merged. More... | |
bool | checkDatasetsToMerge (const H5::DataSet &target, const H5::DataSet &source, hsize_t mergeAxis, std::string &errMsg) |
Make sure that two datasets can be merged. More... | |
void | mergeDatasets (H5::DataSet &target, const H5::DataSet &source, hsize_t mergeAxis, std::size_t bufferSize=-1) |
Merge two datasets. More... | |
H5::DataSet | createDataSet (H5::H5Location &targetLocation, const H5::DataSet &source, hsize_t mergeAxis, int chunkSize=-1, int mergeExtent=-1) |
Make a new dataset using the properties of another. More... | |
std::size_t | getRowSize (const H5::DataSet &ds, hsize_t axis) |
Calculate the size of a row of a dataset in bytes. More... | |
template<size_t N, class I > | |
Writer< N, I > | makeWriter (H5::Group &group, const std::string &name, const Consumers< I > &consumers, const std::array< hsize_t, N > &extent=internal::uniform< N >(5), hsize_t batch_size=defaults::batch_size) |
makeWriter More... | |
void | copyRootTree (TTree &tt, H5::Group &fg, const TreeCopyOpts &opts) |
std::string | getTree (const std::string &file_name) |
AppOpts | getTreeCopyOpts (int argc, char *argv[]) |
Variables | |
const size_t | CHUNK_SIZE = 128 |
HDF5 Tuple Writer.
HDF5 Writer.
This is a tool to write N-dimensional arrays of compound data types to HDF5 files.
Skip down to the WriterXd
and VariableFillers
classes below to see the stuff that you'll have to interact with.
Skip down to the Writer
and Consumers
classes below to see the stuff that you'll have to interact with.
using H5Utils::CRefConsumer = typedef Consumers<const T&> |
CRefConsumer.
Convenience wrapper, CRefConsumer<T>
is equivelent to H5Utils::Consumers<const T&>
.
using H5Utils::CRefWriter = typedef Writer<N, const T&> |
CRefWriter.
Convenience wrapper, CRefWriter<N,T>
is equivelent to H5Utils::Writer<N, const T&>
.
using H5Utils::SharedConsumer = typedef std::shared_ptr<internal::IDataConsumer<I> > |
using H5Utils::SimpleWriter = typedef Writer<0, const T&> |
SimpleWriter.
Convenience wrapper, SimpleWriter<T>
is equivelent to H5Utils::Writer<0, const T&>
.
|
strong |
Enumerator | |
---|---|
STANDARD | |
HALF_PRECISION | |
HALF_PRECISION_LARGE |
Definition at line 11 of file CompressionEnums.h.
bool H5Utils::checkDatasetsToMerge | ( | const H5::DataSet & | target, |
const H5::DataSet & | source, | ||
hsize_t | mergeAxis | ||
) |
Make sure that two datasets can be merged.
target | The dataset to merge into |
source | The dataset to merge from |
mergeAxis | The axis to merged along. |
Definition at line 53 of file MergeUtils.cxx.
bool H5Utils::checkDatasetsToMerge | ( | const H5::DataSet & | target, |
const H5::DataSet & | source, | ||
hsize_t | mergeAxis, | ||
std::string & | errMsg | ||
) |
Make sure that two datasets can be merged.
target | The dataset to merge into | |
source | The dataset to merge from | |
mergeAxis | The axis to merged along. | |
[out] | errMsg | If the datasets cannot be merged, fill this string with an explanation |
Definition at line 62 of file MergeUtils.cxx.
void H5Utils::copyRootTree | ( | TTree & | tt, |
H5::Group & | fg, | ||
const TreeCopyOpts & | opts | ||
) |
Definition at line 125 of file copyRootTree.cxx.
H5::DataSet H5Utils::createDataSet | ( | H5::H5Location & | targetLocation, |
const H5::DataSet & | source, | ||
hsize_t | mergeAxis, | ||
int | chunkSize = -1 , |
||
int | mergeExtent = -1 |
||
) |
Make a new dataset using the properties of another.
targetLocation | The location to place the new dataset |
source | The dataset to create from |
mergeAxis | The axis to merge along |
chunkSize | The chunk size to use. If negative then the chunk size from the source is used. |
mergeExtent | The maximum extent to allow along the merge axis. -1 means unlimited. |
This will not merge the source dataset into the new one!
Definition at line 222 of file MergeUtils.cxx.
std::size_t H5Utils::getRowSize | ( | const H5::DataSet & | ds, |
hsize_t | axis | ||
) |
Calculate the size of a row of a dataset in bytes.
ds | The dataset to use |
axis | The axis that the row is orthogonal to |
A row is the hyperplane orthogonal to the axis. This will throw an overflow error if the row size overflows a std::size_t. This is rather unlikely because that means that there wouldn't be enough memory addresses to hold a single row in memory!
Definition at line 254 of file MergeUtils.cxx.
std::string H5Utils::getTree | ( | const std::string & | file_name | ) |
Definition at line 36 of file getTree.cxx.
AppOpts H5Utils::getTreeCopyOpts | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 12 of file treeCopyOpts.cxx.
Writer<N,I> H5Utils::makeWriter | ( | H5::Group & | group, |
const std::string & | name, | ||
const Consumers< I > & | consumers, | ||
const std::array< hsize_t, N > & | extent = internal::uniform<N>(5) , |
||
hsize_t | batch_size = defaults::batch_size |
||
) |
makeWriter
Convenience function to make a writer from an existing list of Consumers. Allows you to deduce the input type from consumers.
To be used like
auto writer = H5Utils::makeWriter<2>(group, name, consumers);
void H5Utils::mergeDatasets | ( | H5::DataSet & | target, |
const H5::DataSet & | source, | ||
hsize_t | mergeAxis, | ||
std::size_t | bufferSize = -1 |
||
) |
Merge two datasets.
target | The dataset to merge into |
source | The dataset to merge from |
mergeAxis | The axis to merged along. |
bufferSize | The maximum size of the buffer to use. Take care when setting this, if it is too large then the job may run into memory issues! This size is measured in bytes. |
Note that this does nothing to dataset attributes. This function ignores the chunking of the source and target datasets, only splitting up the source dataset along the merge axis.
Definition at line 130 of file MergeUtils.cxx.
const size_t H5Utils::CHUNK_SIZE = 128 |
Definition at line 15 of file treeCopyOpts.h.