2 include(
"EvgenProdTools/merge_lhe_files.py")
4 from Herwig7_i.Herwig7_iConf
import Herwig7
5 from Herwig7_i.Herwig7ConfigLHEF
import Hw7ConfigLHEF
8 Herwig7Config = Hw7ConfigLHEF(genSeq, runArgs)
12 from AthenaCommon
import Logging
13 athMsgLog = Logging.logging.getLogger(
'Herwig7_i/Herwig7_LHEF.py')
14 if ".tar.gz" in runArgs.inputGeneratorFile
or ".tgz" in runArgs.inputGeneratorFile:
15 athMsgLog.info(
"inputGeneratorFile '{}' is compressed - will look for uncompressed LHE file".
format(runArgs.inputGeneratorFile))
16 lhe_files = glob.glob(
"*._*.ev*ts")
17 athMsgLog.info(
"Number of lhe files {}".
format(len(lhe_files)))
18 if len(lhe_files) == 0:
19 raise RuntimeError(
"Could not find uncompressed LHE file")
20 if len(lhe_files) > 1:
21 athMsgLog.info(
"Found more than one uncompressed LHE file: {}".
format(lhe_files))
25 my_lhe_file =
"merged_lhef._0.events"
27 lhe_files[0] = my_lhe_file
28 athMsgLog.info(
"Using uncompressed LHE file '{}' as inputGeneratorFile".
format(lhe_files[0]))
29 runArgs.inputGeneratorFile = lhe_files[0]