rootpy.root2hdf5.root2hdf5(rfile, hfile, rpath='', entries=-1, userfunc=None, show_progress=False, ignore_exception=False, **kwargs)[source]

Convert all trees in a ROOT file into tables in an HDF5 file.


rfile : string or asrootpy’d ROOT File

A ROOT File handle or string path to an existing ROOT file.

hfile : string or PyTables HDF5 File

A PyTables HDF5 File handle or string path to an existing HDF5 file.

rpath : string, optional (default=’‘)

Top level path to begin traversal through the ROOT file. By default convert everything in and below the root directory.

entries : int, optional (default=-1)

The number of entries to read at once while converting a ROOT TTree into an HDF5 table. By default read the entire TTree into memory (this may not be desired if your TTrees are large).

userfunc : callable, optional (default=None)

A function that will be called on every tree and that must return a tree or list of trees that will be converted instead of the original tree.

show_progress : bool, optional (default=False)

If True, then display and update a progress bar on stdout as each tree is converted.

ignore_exception : bool, optional (default=False)

If True, then ignore exceptions raised in converting trees and instead skip such trees.

kwargs : dict, optional

Additional keyword arguments for the tree2array function.