Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- """\
- %prog <rootfile> [<rootfile2> ...]
- Open a ROOT TBrowser to view the given files' contents.\
- """
- import optparse
- op = optparse.OptionParser(usage=__doc__)
- opts, args = op.parse_args()
- if not args:
- op.print_usage()
- exit(1)
- import os
- if not os.path.exists(args[0]):
- print "File '%s' does not exist... exiting\n" % args[0]
- exit(2)
- import ROOT, time
- files = [ROOT.TFile(a) for a in args]
- b = ROOT.TBrowser()
- while b:
- time.sleep(1)
- for f in files:
- f.Close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement