File indexing completed on 2023-03-17 11:26:50
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 from __future__ import print_function
0013 import subprocess as sub
0014 import sys
0015 from optparse import OptionParser
0016
0017 parser = OptionParser(usage="usage: %prog cmssw_release [options]")
0018
0019
0020 parser.add_option("-d","--data ",
0021 action="store",
0022 dest="data",
0023 default=False,
0024 help="Fetch data relvals")
0025
0026 parser.add_option("-m","--mc ",
0027 action="store",
0028 dest="mc",
0029 default=False,
0030 help="Fetch Monte Carlo relvals")
0031
0032 parser.add_option("--p1","--path1 ",
0033 action="store",
0034 dest="path1",
0035 default="",
0036 help="Additional path to match in relvals")
0037
0038 parser.add_option("--p2","--path2 ",
0039 action="store",
0040 dest="path2",
0041 default="",
0042 help="Additional path to match in relvals")
0043
0044 (options, args) = parser.parse_args()
0045
0046
0047
0048
0049
0050
0051 cmssw_release = args[0]
0052
0053
0054 relvaldir="RelVal"
0055 if options.data:
0056 relvaldir+="Data"
0057
0058
0059 releasedir=cmssw_release[:10]+"x"
0060
0061
0062 thepath=cmssw_release
0063 if len(options.path1)>0:
0064 thepath="%s.*%s"%(options.path1,thepath)
0065 if len(options.path2)>0:
0066 thepath="%s.*%s"%(thepath,options.path2)
0067 command='relmon_rootfiles_spy.py ROOT/%s/%s/ -u -g -p %s'%(relvaldir,releasedir,thepath)
0068 print(command)
0069 sub.call(command.split(" "))
0070
0071
0072
0073
0074