Class: TFile

JSROOT. TFile

new JSROOT.TFile(url, newfile_callback)

Interface to read objects from ROOT files.

Use JSROOT.OpenFile to create instance of the class

Name Type Description
url string

file URL

newfile_callback function

function called when file header is read

Methods

ReadDirectory(dir_name, cycle, readdir_callback)

Read the directory content from a root file

If directory was already read - return previously read object Same functionality as TFile.ReadObject

Name Type Description
dir_name string

directory name

cycle number

directory cycle

readdir_callback function

callback with read directory

ReadObject(obj_name, cycle, user_call_back, only_dir)

Read any object from a root file

One could specify cycle number in the object name or as separate argument Last argument should be callback function, while data reading from file is asynchron

Name Type Default Description
obj_name string

name of object, may include cycle number like "hpxpy;1"

cycle number optional

cycle number

user_call_back function

function called when object read from the file

only_dir boolean false optional

if true, only TDirectory derived class will be read