, mode='')[source]

Open a ROOT file via ROOT’s static ROOT.TFile.Open [1] function and return an asrootpy’d File.


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].


root_file : File

an instance of rootpy’s File subclass of ROOT’s TFile.