Skip to content

Commit 7e25bd8

Browse files
committed
fix: use StopMCRun instead of StopRun in GeneratePrimaries
StopRun() calls exit(0) which bypasses destructors and prevents proper file closure. StopMCRun() signals the MC engine to stop gracefully after the current event.
1 parent 078d8f1 commit 7e25bd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fairroot/base/sim/FairMCApplication.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ void FairMCApplication::GeneratePrimaries()
977977
if (fEvGen) {
978978
// LOG(debug) << "FairMCApplication::GeneratePrimaries()";
979979
if (!fEvGen->GenerateEvent(fStack.get())) {
980-
StopRun();
980+
StopMCRun();
981981
}
982982
}
983983
}

0 commit comments

Comments
 (0)