Commit b594aeb8 authored by Olga Bessidskaia Bylund's avatar Olga Bessidskaia Bylund Committed by Christian Gutschow
Browse files

Bug fix for reading lhe input files for tW DS1, DS2

parent 36cd3600
Pipeline #1885031 passed with stages
in 2 minutes and 11 seconds
......@@ -33,7 +33,18 @@ decay z > all all
launch"""%runArgs.randomSeed)
mscard.close()
madspin_on_lhe(runArgs.inputGeneratorFile,"madspin_card.dat",runArgs=runArgs,keep_original=True)
import tarfile
if tarfile.is_tarfile(runArgs.inputGeneratorFile):
myTarball = tarfile.open(runArgs.inputGeneratorFile)
myEvents = None
for afile in myTarball.getnames():
if afile.endswith('.events'): myEvents = afile
if myEvents is None:
raise RuntimeError('No input events file found!')
else:
events_file = myTarball.extractfile( myEvents )
madspin_on_lhe(myEvents,"madspin_card.dat",runArgs=runArgs,keep_original=True)
myTarball.close()
#### Shower
......
......@@ -33,7 +33,18 @@ decay z > all all
launch"""%runArgs.randomSeed)
mscard.close()
madspin_on_lhe(runArgs.inputGeneratorFile,"madspin_card.dat",runArgs=runArgs,keep_original=True)
import tarfile
if tarfile.is_tarfile(runArgs.inputGeneratorFile):
myTarball = tarfile.open(runArgs.inputGeneratorFile)
myEvents = None
for afile in myTarball.getnames():
if afile.endswith('.events'): myEvents = afile
if myEvents is None:
raise RuntimeError('No input events file found!')
else:
events_file = myTarball.extractfile( myEvents )
madspin_on_lhe(myEvents,"madspin_card.dat",runArgs=runArgs,keep_original=True)
myTarball.close()
#### Shower
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment