Belle II Software  release-08-01-10
VariablesToHDF5 Class Reference
Inheritance diagram for VariablesToHDF5:
Collaboration diagram for VariablesToHDF5:

Public Member Functions

def __init__ (self, listname, variables, filename)
 
def initialize (self)
 
def event (self)
 
def terminate (self)
 

Private Attributes

 _filename
 Output filename.
 
 _listname
 Particle list name.
 
 _variables
 List of variables.
 
 _varnames
 variable names
 
 _var_objects
 variable objects for each variable
 
 _evtmeta
 Event metadata.
 
 _plist
 Pointer to the particle list.
 
 _hdf5file
 The hdf5 file.
 
 _dtype
 The data type.
 
 _table
 The pytable.
 

Detailed Description

Dump variables directly to HDF5

This Module is the equivalent of VariablesToNtuple but creates an hdf5 file
instead of a root file. It is slower as it is implemented in pure python and
should currently be considered a proof of concept.

Definition at line 21 of file b2pandas_utils.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  listname,
  variables,
  filename 
)
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 hdf5 file to be created

Definition at line 30 of file b2pandas_utils.py.

30  def __init__(self, listname, variables, filename):
31  """Constructor to initialize the internal state
32 
33  Arguments:
34  listname(str): name of the particle list
35  variables(list(str)): list of variables to save for each particle
36  filename(str): name of the hdf5 file to be created
37  """
38  super().__init__()
39 
40  self._filename = filename
41 
42  self._listname = listname
43 
44  self._variables = variables
45 

Member Function Documentation

◆ event()

def event (   self)
Create a new row in the hdf5 file with for each particle in the list

Definition at line 88 of file b2pandas_utils.py.

◆ initialize()

def initialize (   self)
Create the hdf5 file and list of variable objects to be used during
event processing.

Definition at line 46 of file b2pandas_utils.py.

◆ terminate()

def terminate (   self)
save and close the output

Definition at line 108 of file b2pandas_utils.py.


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