3 #include <boost/core/demangle.hpp>
7 #include <highfive/H5File.hpp>
11 #include "hdtree/Exception.h"
31 Writer(
const std::pair<std::string, std::string>& file_tree_path,
32 bool inplace =
false,
int rows_per_chunk = 10000,
bool shuffle =
true,
33 int compression_level = 6);
60 const std::string&
name()
const;
77 void structure(
const std::string& branch_name,
78 const std::pair<std::string, int>& type);
80 HighFive::DataSet createDataSet(
const std::string& branch_name,
81 HighFive::DataType data_type);
98 return s <<
"Writer(" << w.
name() <<
")";
Definitions for names of structures required by serialization methods.
Write the fire DataSets into a deterministic structure in the output HDF5 data file.
Definition: Writer.h:21
std::size_t entries_
the expected number of entries in this file
Definition: Writer.h:120
const std::string & name() const
Get the name of this file.
Definition: Writer.cxx:44
std::size_t rows_per_chunk_
number of rows to keep in each chunk
Definition: Writer.h:122
void flush()
Flush the data to disk.
Definition: Writer.cxx:35
std::size_t entries() const
Get the number of entries in the file.
Definition: Writer.h:86
HighFive::File file_
our highfive file
Definition: Writer.h:110
Writer(const Writer &)=delete
don't allow copies of the Writer
~Writer()
Close up our file, making sure to flush contents to disk.
Definition: Writer.cxx:33
void increment()
increment the number of entries in the HDTree
Definition: Writer.cxx:46
friend std::ostream & operator<<(std::ostream &s, const Writer &w)
Stream this writer.
Definition: Writer.h:97
HighFive::DataSpace space_
the dataspace shared amongst all of our datasets
Definition: Writer.h:118
void operator=(const Writer &)=delete
don't allow copies of the Writer
void structure(const std::string &branch_name, const std::pair< std::string, int > &type)
Persist the structure of the event object at the input branch_name.
Definition: Writer.cxx:48
int getRowsPerChunk() const
get rows per chunk
Definition: Writer.h:43
HighFive::DataSetCreateProps create_props_
the creation properties to be used on datasets we are writing
Definition: Writer.h:116
Writer(const std::pair< std::string, std::string > &file_tree_path, bool inplace=false, int rows_per_chunk=10000, bool shuffle=true, int compression_level=6)
Open the file in write mode.
Definition: Writer.cxx:8
HighFive::Group tree_
handle to the HighFive group we will make be an HDTree
Definition: Writer.h:114
Geant4 does a GLOBAL definition of the keyword TRUE.
Definition: Atomic.cxx:3