Fix race condition in calculation of hits subbank size
This fixes a race condition that was causing data to be overwritten in the SelReport hits subbank. This fixes a (non-deterministic) cause of the integrity check error reported in #534 (closed). I tested by:
- Using incorrect (trunk) geometry to produce frequent events with large numbers of tracks
- Writing a trigger line that accepts all reconstructed tracks
- Running Allen on dumped MEPs from run 295933 and decoding the SelReports with the inspection script from piquet-tools
On 2024-patches
, the above recipe consistently produces a failure of the HltSelRepRBHits
integrity check within about 10 events. With this fix, 100k events run successfully.
The output from running the test 100x with this branch is here: https://cernbox.cern.ch/s/dTTOFNjbhHe1X1w. No integrity check failure occurs.
Edited by Thomas Boettcher