3 from ...decorators
import timed
4 from ...utility
import ProcessManager, SingleProcessThread
8 @
timed(
"single-core generation")
10 """! Run a single Powheg process in its own timed thread.
12 @param process PowhegBox process.
14 @author James Robinson <james.robinson@cern.ch>
20 """! Run a single Powheg process in its own thread.
22 @param process PowhegBox process.
24 @author James Robinson <james.robinson@cern.ch>
26 if not os.path.isfile(process.executable):
27 raise OSError(
"Powheg executable {} not found!".
format(process.executable))
28 threads = [SingleProcessThread(process.executable,
29 warning_output=(process.warning_output
if hasattr(process,
"warning_output")
else None),
30 info_output=(process.info_output
if hasattr(process,
"info_output")
else None),
31 error_output=(process.error_output
if hasattr(process,
"error_output")
else None))]
32 manager = ProcessManager(threads)
33 while manager.monitor():