2Generic HDF5Reader class to read and store data.
4from hdf5libs
import HDF5RawDataFile
12 Abstract reader class for HDF5 files.
14 Derived classes must complete all methods
15 decorated with @abc.abstractmethod.
19 _FAIL_TEXT_COLOR =
'\033[91m'
20 _WARNING_TEXT_COLOR =
'\033[93m'
21 _BOLD_TEXT =
'\033[1m'
22 _END_TEXT_COLOR =
'\033[0m'
25 def __init__(self, filename: str, verbosity: int = 0, batch_mode: bool =
False) ->
None:
27 Loads a given HDF5 file.
30 filename (str): HDF5 file to open.
31 verbosity (int): Verbose level. 0: Only errors. 1: Warnings. 2: All.
54 Filter the fragment paths of interest.
56 This should be according to the derived reader's
57 data type of interest, e.g., filter for TriggerActivity.
62 """ Return the list of fragment paths. """
66 """ Set the list of fragment paths. """
72 """ Read one fragment from :fragment_path:. """
76 """ Read all fragments. """
86 + f
"WARNING: Skipped {self._num_empty} frags."
94 """ Clear the contents of the member data. """
98 """ Reset the fragment paths to the initialized state. """