14 Overload implementation of the HEPProcess with the correct handling of the path calculation.
17 def __init__(self, result_queue, log_file_name, parameters, path, random_seed=None, max_event=0):
18 """Create a new basf2 calculation process."""
26 super(Basf2CalculationProcess, self).
__init__(result_queue=result_queue, log_file_name=log_file_name,
27 parameters=parameters)
31 A function to prepare a path with the modules given in path.
46 Make sure all output by python and or C is written to the same output file
49 sys.stdout = sys.__stdout__
50 sys.stderr = sys.__stderr__
56 os.dup2(logfile.fileno(), sys.stdout.fileno())
57 os.dup2(logfile.fileno(), sys.stderr.fileno())
61 _basf2.logging.zero_counters()
62 _basf2.logging.add_json()
66 The function given to the process to start the calculation.
67 Do not call by yourself.
68 Resets the logging system, logs onto console and a file and sets the queues
69 (the result queue and the process queue) correctly.
88 from ROOT
import Belle2
102 other_store_array)
in all_arrays])
for i,
103 store_array
in enumerate(store_arrays)])
104 nodes_json = json.dumps(nodes)
105 self.
result_queue.put(
"ipython.dependencies", nodes_json)