Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 29 lines (22 sloc) 685 Bytes
#!/usr/bin/env python
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-t","--tree", action="store", type="str", dest="tree",
help="Tree name", default=None)
options,args = parser.parse_args()
import sys
if not options.tree:
sys.exit("Must specify a tree name")
import ROOT
ROOT.PyConfig.IgnoreCommandLineOptions = True
from rootpy.io import open
if not args:
sys.exit("Must specify at least one file")
for filename in args:
file = open(filename)
if not file:
sys.exit("Could not open file %s"% args[0])
tree = file.Get(options.tree)
if tree.GetEntries() == 0:
print filename
file.Close()
Something went wrong with that request. Please try again.