rootpy.io.root_open¶
-
rootpy.io.
root_open
(filename, mode='')[source]¶ Open a ROOT file via ROOT’s static ROOT.TFile.Open [1] function and return an asrootpy’d File.
Parameters: filename : string
The absolute or relative path to the ROOT file.
mode : string, optional (default=’‘)
Mode indicating how the file is to be opened. This can be either one of the options supported by ROOT.TFile.Open [2], or one of a, a+, r, r+, w or w+, with meanings as for the built-in open() function [3].
Returns: root_file : File
an instance of rootpy’s File subclass of ROOT’s TFile.
References
[R5961] http://root.cern.ch/root/html/TFile.html#TFile:Open [R6061] http://root.cern.ch/root/html/TFile.html#TFile:TFile@2 [R6161] https://docs.python.org/2/library/functions.html#open