12 import subprocess
as sub
14 from optparse
import OptionParser
16 parser = OptionParser(usage=
"usage: %prog cmssw_release [options]")
19 parser.add_option(
"-d",
"--data ",
23 help=
"Fetch data relvals")
25 parser.add_option(
"-m",
"--mc ",
29 help=
"Fetch Monte Carlo relvals")
31 parser.add_option(
"--p1",
"--path1 ",
35 help=
"Additional path to match in relvals")
37 parser.add_option(
"--p2",
"--path2 ",
41 help=
"Additional path to match in relvals")
43 (options, args) = parser.parse_args()
50 cmssw_release = args[0]
58 releasedir=cmssw_release[:10]+
"x" 62 if len(options.path1)>0:
63 thepath=
"%s.*%s"%(options.path1,thepath)
64 if len(options.path2)>0:
65 thepath=
"%s.*%s"%(thepath,options.path2)
66 command=
'relmon_rootfiles_spy.py ROOT/%s/%s/ -u -g -p %s'%(relvaldir,releasedir,thepath)
68 sub.call(command.split(
" "))