15 import subprocess
as sub
17 from optparse
import OptionParser
19 parser = OptionParser(usage=
"usage: %prog cmssw_release [options]")
22 parser.add_option(
"-d",
"--data ",
26 help=
"Fetch data relvals")
28 parser.add_option(
"-m",
"--mc ",
32 help=
"Fetch Monte Carlo relvals")
34 parser.add_option(
"--p1",
"--path1 ",
38 help=
"Additional path to match in relvals")
40 parser.add_option(
"--p2",
"--path2 ",
44 help=
"Additional path to match in relvals")
46 (options, args) = parser.parse_args()
53 cmssw_release = args[0]
61 releasedir=cmssw_release[:10]+
"x"
65 if len(options.path1)>0:
66 thepath=
"%s.*%s"%(options.path1,thepath)
67 if len(options.path2)>0:
68 thepath=
"%s.*%s"%(thepath,options.path2)
69 command=
'relmon_rootfiles_spy.py ROOT/%s/%s/ -u -g -p %s'%(relvaldir,releasedir,thepath)
71 sub.call(command.split(
" "))