Page MenuHomeHEPForge

No OneTemporary

diff --git a/Tests/python/merge-TVT-EW b/Tests/python/merge-TVT-EW
--- a/Tests/python/merge-TVT-EW
+++ b/Tests/python/merge-TVT-EW
@@ -1,74 +1,74 @@
#! /usr/bin/env python
import logging
import sys
import os, yoda
"""%prog
Script for merging yoda files
"""
import sys
if sys.version_info[:3] < (2,4,0):
print "rivet scripts require Python version >= 2.4.0... exiting"
sys.exit(1)
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog base")
verbgroup = OptionGroup(parser, "Verbosity control")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
- yodafiles=["-Run-II-Z-e","-Run-II-Z-mu","-Run-II-Z-LowMass-mu","-Run-II-Z-HighMass-mu","-Run-I-W","-Run-I-Z","-Run-I-WZ"]
+ yodafiles=["-Run-II-W","-Run-II-Z-e","-Run-II-Z-mu","-Run-II-Z-LowMass-mu","-Run-II-Z-HighMass-mu","-Run-I-W","-Run-I-Z","-Run-I-WZ"]
## Get histos
outhistos={}
for f in yodafiles:
file='Rivet-'+args[0]+f+".yoda"
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as yoda" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.iteritems() :
if("RAW" in aopath) :continue
if(aopath.find("D0_2010_S8821313")>0) :
if(aopath.find("d01")>0 and file.find("-e")>0) :
outhistos[aopath] = ao
elif(aopath.find("d02")>0 and file.find("-mu")>0) :
outhistos[aopath] = ao
elif(aopath.find("D0_2015_I1324946")>0) :
if(file.find("LowMass")>0) :
if(aopath.find("d03")>0 or aopath.find("d04")>0) :
outhistos[aopath] = ao
elif(file.find("HighMass")>0) :
if(aopath.find("d05")>0 or aopath.find("d06")>0) :
outhistos[aopath] = ao
else:
if(aopath.find("d01")>0 or aopath.find("d02")>0) :
outhistos[aopath] = ao
else :
outhistos[aopath] = ao
# output the yoda file
name = args[0]+"-EW.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 4:48 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3805234
Default Alt Text
(2 KB)

Event Timeline