

def print_root_structure(file_name):
    'Prints the structure of root file in readable format'
    with rootpy.io.root_open(file_name, 'READ') as root_file:
        for (path, dirs, objects) in root_file.walk():
            n_tabs = str.count(path, '/')
            print(('\t' * n_tabs), str.split(path, '/')[(- 1)])
            for objName in objects:
                obj = root_file.Get(((path + '/') + objName))
                print(('\t' * (n_tabs + 1)), path)

dataset/ETHPy150Open anaderi/lhcb_trigger_ml/hep_ml/rootutilities.py print_root_structure/VarMisuse@116/163 `obj`->`path`