Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8310218
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/Sampling/mergeGrids.py b/Sampling/mergeGrids.py
--- a/Sampling/mergeGrids.py
+++ b/Sampling/mergeGrids.py
@@ -1,68 +1,68 @@
#! /usr/bin/env python
import os
import sys
import glob
"""\
%prog [--setupfile=FILE] [--tag=TAG] RUNNAME
Combine Herwig++ grid files
"""
if __name__ == '__main__':
from optparse import OptionParser
parser = OptionParser(usage=__doc__)
parser.add_option('-x', '--setupfile', type='string',
help='Specify the setup file which has been used.',
default='',
dest='setupFile')
parser.add_option('-t', '--tag', type='string',
help='Specify the tag name which has been used.',
default='',
dest='tagName')
opts, args = parser.parse_args()
if len(args) < 1:
sys.stderr.write('Please specify a run name\n')
sys.exit(1)
runName=args[0]
if runName.endswith('.run'):
runName = runName[:-4]
setupName=opts.setupFile
tagName=opts.tagName
if setupName:
runName = runName + '/' + setupName
if tagName:
runName = runName + '/' + tagName
- gridId = 'Matchbox/' + runName
+ gridId = 'Herwig/' + runName
# print 'Looking in ' + gridId
gridFiles=glob.glob(gridId + '/integrationJob*/HerwigGrids.xml')
if not gridFiles:
sys.stderr.write('No grid files have been found to combine\n')
sys.exit(1)
# print gridFiles
gridCombined = open(gridId + '/HerwigGrids.xml','w')
gridCombined.write('<Grids>\n')
for gridFile in gridFiles:
grid = open(gridFile,'r')
gridContent = grid.read()
gridContent = gridContent.replace('<Grids>','')
gridContent = gridContent.replace('</Grids>','')
gridCombined.write(gridContent)
grid.close()
gridCombined.write('</Grids>\n')
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Dec 21, 5:45 PM (12 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4023688
Default Alt Text
(1 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment