6 #include <highfive/H5File.hpp>
8 #include "hdtree/AbstractBranch.h"
10 #include "hdtree/Writer.h"
39 Reader(
const std::pair<std::string, std::string>& file_tree_path,
40 bool inplace =
false);
65 virtual std::pair<std::string, int>
type(
const std::string& branch_name);
71 virtual std::string
name()
const;
83 std::vector<std::string>
list(
const std::string& group_path)
const;
88 HighFive::DataSet
getDataSet(
const std::string& branch_name)
const;
99 HighFive::DataType
getDataSetType(
const std::string& dataset)
const;
149 virtual void copy(
unsigned long int i_entry,
const std::string& branch_name,
165 void mirror(
const std::string& branch_name,
Writer& output);
198 void copy(
unsigned long int i_entry,
unsigned long int n);
210 std::unordered_map<std::string, std::unique_ptr<MirrorObject>>
A mirror event object.
Definition: Reader.h:178
unsigned long int last_entry_
the last entry that was copied
Definition: Reader.h:186
MirrorObject(const std::string &branch_name, Reader &reader, Writer &writer)
Construct this mirror object and any of its (data or object) children.
Definition: Reader.cxx:98
std::unique_ptr< BaseBranch > size_member_
handle to the size member of this object (if it exists)
Definition: Reader.h:182
std::vector< std::unique_ptr< MirrorObject > > obj_members_
list of sub-objects within this object
Definition: Reader.h:184
std::unique_ptr< BaseBranch > data_
handle to the atomic data type once we get down to that point
Definition: Reader.h:180
void copy(unsigned long int i_entry, unsigned long int n)
Copy the n entries starting from i_entry.
Definition: Reader.cxx:156
Reading a file generated by fire.
Definition: Reader.h:24
virtual std::string name() const
Get the name of this file.
Definition: Reader.cxx:17
HighFive::File file_
our highfive file
Definition: Reader.h:203
HighFive::DataSet getDataSet(const std::string &branch_name) const
Get data set.
Definition: Reader.cxx:25
HighFive::ObjectType getH5ObjectType(const std::string &path) const
Get the H5 type of object at the input path.
Definition: Reader.cxx:33
virtual void copy(unsigned long int i_entry, const std::string &branch_name, Writer &output)
Copy the input data set to the output file.
Definition: Reader.cxx:72
virtual bool canCopy() const
We can copy.
Definition: Reader.h:135
std::size_t entries_
the number of entries in this file, set in constructor
Definition: Reader.h:207
Reader(const Reader &)=delete
never want to copy a reader
std::size_t entries() const
Get the number of entries in the file.
Definition: Reader.h:129
HighFive::Group tree_
the HighFive group that is our HDTree
Definition: Reader.h:205
virtual std::pair< std::string, int > type(const std::string &branch_name)
Get the type of the input object.
Definition: Reader.cxx:42
std::unordered_map< std::string, std::unique_ptr< MirrorObject > > mirror_objects_
our in-memory mirror objects for data being copied to the output file without processing
Definition: Reader.h:211
virtual std::vector< std::pair< std::string, std::string > > availableObjects()
Get the event objects available in the file.
Definition: Reader.cxx:37
void mirror(const std::string &branch_name, Writer &output)
Mirror the structure of the passed branch_name from us into the output file.
Definition: Reader.cxx:62
Reader(const std::pair< std::string, std::string > &file_tree_path, bool inplace=false)
Open the file in read mode.
Definition: Reader.cxx:8
HighFive::DataType getDataSetType(const std::string &dataset) const
Deduce the type of the dataset requested.
Definition: Reader.cxx:29
std::vector< std::string > list(const std::string &group_path) const
List the entries inside of a group.
Definition: Reader.cxx:19
std::string getTypeName(const std::string &obj_name) const
Get the 'type' attribute from the input group name.
void operator=(const Reader &)=delete
never want to copy a reader
Write the fire DataSets into a deterministic structure in the output HDF5 data file.
Definition: Writer.h:21
Geant4 does a GLOBAL definition of the keyword TRUE.
Definition: Atomic.cxx:3