Skip to content

SiHitCollectionCnv_p3(_p2) Protect against values stored std::vector<unsigned short> exceeding USHRT_MAX

John Derek Chapman requested to merge jchapman/athena:ATLASSIM-6398_main into master

Manual sweep of !60999 (merged) to master.

As part of the compression of SiHitCollection properties which are shared between successive SiHit objects are only recorded once in the persistent format. Other vectors in the persistent format keep track of how many SiHit instances share the current value. These vectors are std::vector<unsigned short>. There was an implicit assumption that we would never get more than USHRT_MAX consecutive SiHit objects with a matching property. The logic in SiHitCollectionCnv_p2/p3 has been unchanged for a long time, but the samples requested in ATLMCPROD-10454 managed to break it. The fix is to check if the number of consecutive SiHit objects with a matching property has reached USHRT_MAX and behave as if the value of the property has changed in that case. NB TRT_HitCollectionCnv_p3/p4 already have this protection, so no changes are required there.

See ATLASSIM-6398.

Merge request reports

Loading