Converter class for converting between HDF5 and LH5 file formats. More...
#include <RMGConvertLH5.hh>
Static Public Member Functions | |
| static bool | ConvertToLH5 (std::string, std::string, std::set< std::string >, const std::map< int, std::pair< int, std::string > > &, bool, bool part_of_batch=false, int n_ev=-1) |
| Convert a Geant4 HDF5 output file to LH5 format. | |
| static bool | ConvertFromLH5 (std::string, std::string, bool, bool part_of_batch, std::map< std::string, std::map< std::string, std::string > > &) |
| Convert an LH5 input file to HDF5 format. | |
Static Public Attributes | |
| static bool | fIsStandalone = false |
Converter class for converting between HDF5 and LH5 file formats.
This class provides methods to convert Geant4 HDF5 output files into the LH5 format and also to convert LH5 input files back to HDF5. It supports conversion of ntuple data.
|
static |
Convert an LH5 input file to HDF5 format.
This function converts the specified LH5 file to HDF5 format suitable for reading by Geant4, reformatting ntuple tables into ntuple datasets.
| lh5_file_name | The input LH5 file name. |
| ntuple_group_name | The name of the ntuple group in the LH5 file. |
| dry_run | If true, the conversion is performed in-memory without writing to disk. |
| part_of_batch | Indicates if this conversion is part of a batch operation. |
| units_map | Output parameter: a mapping from ntuple names to their unit dictionaries. |
|
static |
Convert a Geant4 HDF5 output file to LH5 format.
This function converts the specified HDF5 file to the LH5 format, reformatting the ntuple data into table format.
| hdf5_file_name | The input HDF5 file name. |
| ntuple_group_name | The name of the ntuple group in the HDF5 file. |
| aux_ntuples | A set of auxiliary ntuple names. |
| ntuple_meta | A mapping of detector uids to a pair of ntuple id and ntuple name. |
| dry_run | If true, the conversion is performed in-memory without writing to disk. |
| part_of_batch | Indicates if this conversion is part of a batch operation. |
| n_ev | number of events to write as an additional attribute into the file. |