Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 import subprocess as sub
00016 import sys
00017 from optparse import OptionParser
00018
00019 parser = OptionParser(usage="usage: %prog cmssw_release [options]")
00020
00021
00022 parser.add_option("-d","--data ",
00023 action="store",
00024 dest="data",
00025 default=False,
00026 help="Fetch data relvals")
00027
00028 parser.add_option("-m","--mc ",
00029 action="store",
00030 dest="mc",
00031 default=False,
00032 help="Fetch Monte Carlo relvals")
00033
00034 parser.add_option("--p1","--path1 ",
00035 action="store",
00036 dest="path1",
00037 default="",
00038 help="Additional path to match in relvals")
00039
00040 parser.add_option("--p2","--path2 ",
00041 action="store",
00042 dest="path2",
00043 default="",
00044 help="Additional path to match in relvals")
00045
00046 (options, args) = parser.parse_args()
00047
00048
00049
00050
00051
00052
00053 cmssw_release = args[0]
00054
00055
00056 relvaldir="RelVal"
00057 if options.data:
00058 relvaldir+="Data"
00059
00060
00061 releasedir=cmssw_release[:10]+"x"
00062
00063
00064 thepath=cmssw_release
00065 if len(options.path1)>0:
00066 thepath="%s.*%s"%(options.path1,thepath)
00067 if len(options.path2)>0:
00068 thepath="%s.*%s"%(thepath,options.path2)
00069 command='relmon_rootfiles_spy.py ROOT/%s/%s/ -u -g -p %s'%(relvaldir,releasedir,thepath)
00070 print command
00071 sub.call(command.split(" "))
00072
00073
00074
00075
00076