From eb828520d580cfefab93839f379ffcbe8ac9ad80 Mon Sep 17 00:00:00 2001 From: Paul Buehler Date: Wed, 4 Dec 2024 15:41:29 +0100 Subject: [PATCH 1/2] Reset mParticles before filled with new set of particles --- Generators/src/GeneratorHepMC.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Generators/src/GeneratorHepMC.cxx b/Generators/src/GeneratorHepMC.cxx index 4f38b01811f98..9251a10c1a527 100644 --- a/Generators/src/GeneratorHepMC.cxx +++ b/Generators/src/GeneratorHepMC.cxx @@ -286,6 +286,7 @@ Bool_t GeneratorHepMC::importParticles() } /** loop over particles **/ + mParticles.clear(); auto particles = mEvent->particles(); for (int i = 0; i < particles.size(); ++i) { From d4cd93d0900effff77a201ddf5235c223fa55d42 Mon Sep 17 00:00:00 2001 From: Paul Buehler Date: Thu, 5 Dec 2024 15:40:28 +0100 Subject: [PATCH 2/2] Update GeneratorHepMC.cxx Return with false instead of stopping execution. --- Generators/src/GeneratorHepMC.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Generators/src/GeneratorHepMC.cxx b/Generators/src/GeneratorHepMC.cxx index 9251a10c1a527..2076910b2bf5f 100644 --- a/Generators/src/GeneratorHepMC.cxx +++ b/Generators/src/GeneratorHepMC.cxx @@ -159,7 +159,7 @@ Bool_t GeneratorHepMC::generateEvent() tries++; } while (tries < max_tries); - LOG(fatal) << "HepMC event gen failed (Does the file/stream have enough events)?"; + LOG(error) << "HepMC event gen failed (Does the file/stream have enough events)?"; /** failure **/ return false;