예제 #1
0
def harvesttree(textfile=''):
    filename, description = treedescription()
    tree = TTree('tree', 'data from ascii file')
    if len(textfile) > 0:
        nlines = tree.ReadFile(textfile, description)
    elif len(filename) > 0:
        nlines = tree.ReadFile(filename, description)
    else:
        print 'WARNING: file name is empty. No tree is read.'

    tree.SetMarkerStyle(8)
    tree.SetMarkerSize(0.5)

    return tree