key4hep / k4FWCore

Core Components for the Gaudi-based Key4hep Framework
Apache License 2.0
10 stars 26 forks source link

Fix data race in EventHeaderCreator #224

Closed m-fila closed 2 days ago

m-fila commented 3 weeks ago

BEGINRELEASENOTES

ENDRELEASENOTES

A static local variable was not thread safe and resulting in a data race when used in parallel environment of GaudiHive (skipping or duplicating event numbers).

I considered two ways to fix it:

In both cases the event numbers in the output will be not sorted.

The version with with EventContext is used currently but can be changed if needed