Belle II Software  release-05-02-19
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.
 
 _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 14 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 22 of file b2pandas_utils.py.

22  def __init__(self, listname, variables, filename):
23  """Constructor to initialize the internal state
24 
25  Arguments:
26  listname(str): name of the particle list
27  variables(list(str)): list of variables to save for each particle
28  filename(str): name of the hdf5 file to be created
29  """
30  super().__init__()
31 
32  self._filename = filename
33 
34  self._listname = listname
35 
36  self._variables = variables
37 

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 74 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 38 of file b2pandas_utils.py.

◆ terminate()

def terminate (   self)
save and close the output

Definition at line 93 of file b2pandas_utils.py.


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