From 4320cea742ee4199b1b8023e2567c1b088c754f7 Mon Sep 17 00:00:00 2001 From: Oliver Lantwin Date: Wed, 5 Mar 2025 09:43:57 +0100 Subject: [PATCH] fix: Replace dummy output file with MemFile Fixes #531. The use of the deprecated SetOutputFile is also fixed. --- python/shipStrawTracking.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/shipStrawTracking.py b/python/shipStrawTracking.py index 6b5f49534..037660cc4 100644 --- a/python/shipStrawTracking.py +++ b/python/shipStrawTracking.py @@ -74,7 +74,9 @@ def run_track_pattern_recognition(input_file, geo_file, output_file, method): import shipDet_conf run = ROOT.FairRunSim() run.SetName("TGeant4") # Transport engine - run.SetOutputFile("dummy") # Output file + # Create dummy output file as the input file is updated directly and + # histograms are written to output file (hists.root by default) + run.SetSink(ROOT.FairRootFileSink(ROOT.TMemFile('output', 'recreate'))) run.SetUserConfig("g4Config_basic.C") # geant4 transport not used, only needed for the mag field rtdb = run.GetRuntimeDb()