From a992f6122ad0de3bfa9ec777e5ebbfd98dad913d Mon Sep 17 00:00:00 2001 From: Marco Giacalone Date: Wed, 17 Dec 2025 20:36:20 +0100 Subject: [PATCH] Fix Pythia8 CI testing The Pythia8() function exists already in the Pythia namespace loaded with ROOT, so when executing the macro a function redefinition error was thrown. By replacing the name to pythia8() the problem is solved. --- MC/config/ALICE3/ini/tests/pythia8_ArAr.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_KrKr.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_OO.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_PbPb.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_XeXe.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_hardQCD_136tev.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_hf_hardQCD_136tev.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_ropes.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_ropes_136tev.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_shoving.C | 2 +- MC/config/ALICE3/ini/tests/pythia8_pp_shoving_136tev.C | 2 +- MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C | 8 ++++---- test/README.md | 2 +- test/run_generator_tests.sh | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/MC/config/ALICE3/ini/tests/pythia8_ArAr.C b/MC/config/ALICE3/ini/tests/pythia8_ArAr.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_ArAr.C +++ b/MC/config/ALICE3/ini/tests/pythia8_ArAr.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_KrKr.C b/MC/config/ALICE3/ini/tests/pythia8_KrKr.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_KrKr.C +++ b/MC/config/ALICE3/ini/tests/pythia8_KrKr.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_OO.C b/MC/config/ALICE3/ini/tests/pythia8_OO.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_OO.C +++ b/MC/config/ALICE3/ini/tests/pythia8_OO.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_PbPb.C b/MC/config/ALICE3/ini/tests/pythia8_PbPb.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_PbPb.C +++ b/MC/config/ALICE3/ini/tests/pythia8_PbPb.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C b/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_PbPb_536tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_XeXe.C b/MC/config/ALICE3/ini/tests/pythia8_XeXe.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_XeXe.C +++ b/MC/config/ALICE3/ini/tests/pythia8_XeXe.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp.C b/MC/config/ALICE3/ini/tests/pythia8_pp.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C b/MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_136tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_hardQCD_136tev.C b/MC/config/ALICE3/ini/tests/pythia8_pp_hardQCD_136tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_hardQCD_136tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_hardQCD_136tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_hf_hardQCD_136tev.C b/MC/config/ALICE3/ini/tests/pythia8_pp_hf_hardQCD_136tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_hf_hardQCD_136tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_hf_hardQCD_136tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_ropes.C b/MC/config/ALICE3/ini/tests/pythia8_pp_ropes.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_ropes.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_ropes.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_ropes_136tev.C b/MC/config/ALICE3/ini/tests/pythia8_pp_ropes_136tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_ropes_136tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_ropes_136tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_shoving.C b/MC/config/ALICE3/ini/tests/pythia8_pp_shoving.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_shoving.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_shoving.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/ALICE3/ini/tests/pythia8_pp_shoving_136tev.C b/MC/config/ALICE3/ini/tests/pythia8_pp_shoving_136tev.C index 49c15680f..0676e4c22 100644 --- a/MC/config/ALICE3/ini/tests/pythia8_pp_shoving_136tev.C +++ b/MC/config/ALICE3/ini/tests/pythia8_pp_shoving_136tev.C @@ -2,7 +2,7 @@ int External() { return 0; } -int Pythia8() +int pythia8() { return External(); } \ No newline at end of file diff --git a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C index 9250232c0..ac9df9f68 100644 --- a/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C +++ b/MC/config/PWGEM/ini/tests/pythia8_OO_536_VM2ll.C @@ -50,7 +50,7 @@ int External() { return 0; } -//int Pythia8() -//{ -// return External(); -//} +int pythia8() +{ + return External(); +} diff --git a/test/README.md b/test/README.md index 3c2a90d47..6745eae5b 100644 --- a/test/README.md +++ b/test/README.md @@ -26,7 +26,7 @@ Whenever an `ini` file is detedcted to be tested, a test macro is required to be ``` Note, that `run_tests.sh` will automatically detect all generators used in an `ini`. For at least one generator defined in the `ini` file there must be a test. Each test is defined as a function in the `.C` macro. Assuming you want to test `External` and `Pythia8` generator, the macro should look like ```cpp -int Pythia8() +int pythia8() { // do your test return ret; diff --git a/test/run_generator_tests.sh b/test/run_generator_tests.sh index 6c5f3b8b8..8141a5f64 100755 --- a/test/run_generator_tests.sh +++ b/test/run_generator_tests.sh @@ -21,7 +21,7 @@ export ROOT_INCLUDE_PATH LD_LIBRARY_PATH # Entrypoint for O2DPG related tests # ###################################### -CHECK_GENERATORS="Pythia8 External" +CHECK_GENERATORS="pythia8 External" # The test parent dir to be cretaed in current directory TEST_PARENT_DIR="o2dpg_tests/generators"