From e46fc4ba34f3f688048972c4d15484bb0834dcb2 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 12 Sep 2023 14:00:48 +0200 Subject: [PATCH 1/3] Explicitly import os in examples --- k4MarlinWrapper/examples/clicRec_e4h_input.py | 3 +++ test/gaudi_opts/clicReconstruction_mt.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/k4MarlinWrapper/examples/clicRec_e4h_input.py b/k4MarlinWrapper/examples/clicRec_e4h_input.py index 3a201ee4..94d6e4b0 100644 --- a/k4MarlinWrapper/examples/clicRec_e4h_input.py +++ b/k4MarlinWrapper/examples/clicRec_e4h_input.py @@ -16,6 +16,9 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +import os + from Gaudi.Configuration import * from Configurables import LcioEvent, MarlinProcessorWrapper diff --git a/test/gaudi_opts/clicReconstruction_mt.py b/test/gaudi_opts/clicReconstruction_mt.py index 0fbd620d..237bc03a 100644 --- a/test/gaudi_opts/clicReconstruction_mt.py +++ b/test/gaudi_opts/clicReconstruction_mt.py @@ -16,6 +16,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +import os + from Gaudi.Configuration import * # Parallel stuff From cdbe913195eca338cfbcb80789b3f528a3891621 Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 12 Sep 2023 14:06:43 +0200 Subject: [PATCH 2/3] Make sure to import os in conversion script test --- test/scripts/clicRec.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/scripts/clicRec.sh b/test/scripts/clicRec.sh index dc095083..7cd9bb2f 100644 --- a/test/scripts/clicRec.sh +++ b/test/scripts/clicRec.sh @@ -41,6 +41,7 @@ fi echo "Modifying clicReconstruction.py file..." # Replace SLCIO file path # sed -i 's|/run/simulation/with/ctest/to/create/a/file.slcio|testSimulation.slcio|g' clicReconstruction.py +sed -i '1s/^/import os\n/' clicReconstruction.py sed -i 's|/run/simulation/with/ctest/to/create/a/file.slcio|$TEST_DIR/inputFiles/testSimulation.slcio|g' clicReconstruction.py # Uncomment selected optional processors sed -i 's;EvtMax = 10,;EvtMax = 3,;' clicReconstruction.py From 6a1f212f8269498e5e372e3776472adc38a4fc3d Mon Sep 17 00:00:00 2001 From: tmadlener Date: Tue, 12 Sep 2023 14:08:49 +0200 Subject: [PATCH 3/3] Update documentation to import os --- doc/starterkit/k4MarlinWrapperCLIC/Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/starterkit/k4MarlinWrapperCLIC/Readme.md b/doc/starterkit/k4MarlinWrapperCLIC/Readme.md index c26edafe..720ca4a9 100644 --- a/doc/starterkit/k4MarlinWrapperCLIC/Readme.md +++ b/doc/starterkit/k4MarlinWrapperCLIC/Readme.md @@ -108,6 +108,7 @@ during [Simulation](#simulation). ```bash cd CLICPerformance/clicConfig +sed -i '1s/^/import os\n/' clicReconstruction.py sed -i 's;read.Files = \[".*"\];read.Files = \["ttbar.slcio"\];' clicReconstruction.py sed -i 's;EvtMax = 10,;EvtMax = 3,;' clicReconstruction.py sed -i 's;"MaxRecordNumber": ["10"],;"MaxRecordNumber": ["3"],;' clicReconstruction.py