Skip to content

GeneratorObjectsTPCnv: Adjust reading _p1 objects to avoid making invalid links.

When we read _p1 links, we need to determine which event collection to target. The target was being set to TruthEvent unless there was a nonzero event index, in which case it was being set to TruthEvent_PU. However, in some of those cases, the events contains TruthEvent but not TruthEvent_PU, the result being that we were making invalid links that would trip an assertion when used.

Now, make sure that TruthEvent_PU exists before targeting it. (Yeah, it's inefficient to do this for each link, but since this is only for reading old data, it's probably not worth doing it differently.) Fixes a crash seen in the MuonEventAthenaPool tests.

Merge request reports