Merge output events if running in multicore mode.
- Parameters
-
cores | Number of cores in use. |
n_events_unscaled | Total number of events generated. |
powheg_LHE_output | Name of LHE file produced by PowhegBox. |
- Author
- James Robinson james.nosp@m..rob.nosp@m.inson.nosp@m.@cer.nosp@m.n.ch
Definition at line 14 of file merge_output.py.
14 def merge_output(cores, n_events_unscaled, powheg_LHE_output):
15 """! Merge output events if running in multicore mode.
17 @param cores Number of cores in use.
18 @param n_events_unscaled Total number of events generated.
19 @param powheg_LHE_output Name of LHE file produced by PowhegBox.
21 @author James Robinson <james.robinson@cern.ch>
23 logger.info(
"Concatenating output LHE files: expecting {}, found {}".
format(cores, len(glob.glob(
"pwgevents*.lhe"))))
24 LHE.merge(
"pwgevents*.lhe", powheg_LHE_output)
25 subprocess.call(
"rm pwgevents-*.lhe 2> /dev/null", shell=
True)
27 FileParser(
"powheg*.input").text_replace(
"numevts .*",
"numevts {}".
format(n_events_unscaled))