Belle II Software development
VariablesToHDF5 Class Reference
Inheritance diagram for VariablesToHDF5:
VariablesToTable

Public Member Functions

def __init__ (self, listname, variables, filename, Optional[str] hdf_table_name=None)
 

Detailed Description

Legacy class to not break existing code

Definition at line 329 of file b2pandas_utils.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  listname,
  variables,
  filename,
Optional[str]   hdf_table_name = None 
)
Constructor to initialize the internal state

Arguments:
    listname(str): name of the particle list
    variables(list(str)): list of variables to save for each particle
    filename(str): name of the output file to be created.
        Needs to end with `.csv` for csv output, `.parquet` or `.pq` for parquet output,
        `.h5`, `.hdf` or `.hdf5` for hdf5 output and `.feather` or `.arrow` for feather output
    hdf_table_name(str): name of the table in the hdf5 file.
        If not provided, it will be the same as the listname
    event_buffer_size(int): number of events to buffer before writing to disk,
        higher values will use more memory but write faster and result in smaller files
    **writer_kwargs: additional keyword arguments to pass to the writer.
        For details, see the documentation of the writer in the apache arrow documentation.
        Only use, if you know what you are doing!

Reimplemented from VariablesToTable.

Definition at line 334 of file b2pandas_utils.py.

334 def __init__(self, listname, variables, filename, hdf_table_name: Optional[str] = None,):
335 super().__init__(listname, variables, filename, hdf_table_name)
336 assert self._filename.split(".")[-1] in ["h5", "hdf", "hdf5"], (
337 "Filename must end with .h5, .hdf or .hdf5 for HDF5 output. "
338 f"Got {self._filename}"
339 )
340
341

The documentation for this class was generated from the following file: