def processBenchmark(path, outputRootFile): (release, bname, extension) = valtools.decodePath(path) if bname != webpage.benchmarkName_: print "sorry, you have to go to the", bname, "directory to produce this comparison. Note that you cannot compare different benchmarks." sys.exit(4) benchmark = valtools.benchmark(extension) benchmark.release_ = release print benchmark.benchmarkUrl(website) root = benchmark.rootFileOnWebSite(website) shutil.copy(root, outputRootFile) print 'retrieved ', root return benchmark
def processBenchmark( path, outputRootFile ): (release, bname, extension ) = valtools.decodePath( path ) if bname != webpage.benchmarkName_: print "sorry, you have to go to the",bname,"directory to produce this comparison. Note that you cannot compare different benchmarks." sys.exit(4) benchmark = valtools.benchmark( extension ) benchmark.release_ = release print benchmark.benchmarkUrl( website ) root = benchmark.rootFileOnWebSite( website ) shutil.copy(root, outputRootFile) print 'retrieved ', root return benchmark
help="Benchmark title", default="") webpage.parser_.add_option("-g", "--gensource", dest="pyGenSource", help="python file for the CMSSW source of the generated events, which is used in input to your simulation and reconstruction process", default="None") webpage.parser_.add_option("-s", "--simulation", dest="pySim", help="python file for your CMSSW simulation and/or reconstruction process.", default="None") webpage.parseArgs() if len(webpage.args_)!=0: webpage.parser_.print_help() sys.exit(1) benchmark = valtools.benchmark() webpage.setOutputDir( benchmark.fullName() ) macro = 'plot.C' recipe = webpage.options_.recipe genConfig = webpage.options_.pyGenSource simConfig = webpage.options_.pySim benchmarkConfig = 'benchmark_cfg.py' # information about CMSSW cmssw = os.environ['CMSSW_VERSION'] showTags = os.popen( 'showtags -t -r -u').read() title = webpage.benchmarkName_
parser.add_option("-e", "--extension", dest="extension", help="adds an extension to the name of this benchmark", default=None) (options,args) = parser.parse_args() if len(args)!=1: parser.print_help() sys.exit(1) otherRelease = args[0] website = valtools.website() bench0 = valtools.benchmark( options.extension ) bench1 = valtools.benchmark( options.extension, otherRelease) print 'comparing', bench0.release_, 'and', bench1.release_ # link the 2 root files locally print bench0.rootFileOnWebSite( website ) print bench1.rootFileOnWebSite( website ) link0 = 'benchmark_0.root' link1 = 'benchmark_1.root' if os.path.isfile(link0): os.unlink( link0 ) if os.path.isfile(link1): os.unlink( link1 )
"--extension", dest="extension", help="adds an extension to the name of this benchmark", default=None) (options, args) = parser.parse_args() if len(args) != 1: parser.print_help() sys.exit(1) otherRelease = args[0] website = valtools.website() bench0 = valtools.benchmark(options.extension) bench1 = valtools.benchmark(options.extension, otherRelease) print 'comparing', bench0.release_, 'and', bench1.release_ # link the 2 root files locally print bench0.rootFileOnWebSite(website) print bench1.rootFileOnWebSite(website) link0 = 'benchmark_0.root' link1 = 'benchmark_1.root' if os.path.isfile(link0): os.unlink(link0) if os.path.isfile(link1): os.unlink(link1)
parser.add_option("-f", "--force", dest="force",action="store_true", help="force the submission. Be careful!", default=False) (options,args) = parser.parse_args() if len(args)!=0: parser.print_help() sys.exit(1) website = valtools.website() bench = valtools.benchmark( options.extension ) localBench = valtools.benchmark() print 'submitting from local: ', localBench print ' to: ', bench comparisons = website.listComparisons( bench ) if len(comparisons)>0: print 'You are about to make the following list of comparison pages obsolete. These pages will thus be removed:' print comparisons answer = None while answer != 'y' and answer != 'n': answer = raw_input('do you agree? [y/n]') if answer == 'n': sys.exit(0)
parser.add_option("-f", "--force", dest="force", action="store_true", help="force the submission. Be careful!", default=False) (options, args) = parser.parse_args() if len(args) != 0: parser.print_help() sys.exit(1) website = valtools.website() bench = valtools.benchmark(options.extension) localBench = valtools.benchmark() print 'submitting from local: ', localBench print ' to: ', bench comparisons = website.listComparisons(bench) if len(comparisons) > 0: print 'You are about to make the following list of comparison pages obsolete. These pages will thus be removed:' print comparisons answer = None while answer != 'y' and answer != 'n': answer = raw_input('do you agree? [y/n]') if answer == 'n': sys.exit(0)
help= "python file for the CMSSW source of the generated events, which is used in input to your simulation and reconstruction process", default="None") webpage.parser_.add_option( "-s", "--simulation", dest="pySim", help="python file for your CMSSW simulation and/or reconstruction process.", default="None") webpage.parseArgs() if len(webpage.args_) != 0: webpage.parser_.print_help() sys.exit(1) benchmark = valtools.benchmark() webpage.setOutputDir(benchmark.fullName()) macro = 'plot.C' recipe = webpage.options_.recipe genConfig = webpage.options_.pyGenSource simConfig = webpage.options_.pySim benchmarkConfig = 'benchmark_cfg.py' # information about CMSSW cmssw = os.environ['CMSSW_VERSION'] showTags = os.popen('showtags -t -r -u').read() title = webpage.benchmarkName_
showTags = os.popen('showtags -t -r -u').read() #print showTags macro = 'plot.C' captions = 'captions.txt' benchmarkName = os.path.basename(os.getcwd()) title = benchmarkName templateFile = 'index.html' compareLine = None if options.compare != None: title = '%s_%s_VS_%s' % (benchmarkName, cmssw, options.compare) print title macro = 'compare.C' captions = 'captions.txt' website = valtools.website() benchCompare = valtools.benchmark(None, options.compare) compareLine = '<b>Compared with</b> <a href="%s">%s</a>' % ( benchCompare.benchmarkUrl(website), options.compare) outputDir = title indexhtml = "%s/%s" % (templates, templateFile) # get the pictures pictures = [] if os.path.isdir(dirPlots): #print 'getting pictures from %s' % dirPlots tmppictures = os.listdir(dirPlots) #print tmppictures for pic in tmppictures: (root, ext) = os.path.splitext(pic) if ext == '.jpg' or ext == '.png' or ext == '.gif':
showTags = os.popen( 'showtags -t -r -u').read() #print showTags macro = 'plot.C' captions = 'captions.txt' benchmarkName = os.path.basename( os.getcwd() ) title = benchmarkName templateFile = 'index.html' compareLine = None if options.compare != None: title = '%s_%s_VS_%s' % ( benchmarkName, cmssw, options.compare) print title macro = 'compare.C' captions = 'captions.txt' website = valtools.website() benchCompare = valtools.benchmark( None, options.compare) compareLine = '<b>Compared with</b> <a href="%s">%s</a>'%(benchCompare.benchmarkUrl( website ), options.compare) outputDir = title indexhtml = "%s/%s" % (templates,templateFile) # get the pictures pictures = [] if os.path.isdir(dirPlots): #print 'getting pictures from %s' % dirPlots tmppictures = os.listdir( dirPlots ) #print tmppictures for pic in tmppictures: (root, ext) = os.path.splitext(pic) if ext == '.jpg' or ext == '.png' or ext == '.gif':