Skip to content

Try to rm the const_cast and thread unsafe annotations from the TrackSlimmingTool (ATLASRECTS-7295)

Let me ping @ssnyder and @fwinkl .

This might work or not at the end, but is one of the ways to get rid of the const_casts.

Steps

  1. We want to split the types, from the persistification hints that we want to treat in a special manner. Basically, these are 2 different things set/used into different manner, I assume they are together due to legacy/persistency/convenience.

  2. Now this brings already one problem as we have the persistent side storing a single ulong. This leads to the bulk of the changes being in the T/P converters.

  3. To keep the single ulong in the persistent side, and 2 bitsets in the transient side we need to somehow be able to join the 2 bitsets for storing in pers and splitting them back in trans. See (https://godbolt.org/z/58bo8qr34).

  4. Then for the hints that we have now split out we want them to be only set one time from the slimmingTool . If we try to reset already set hints we throw. See (https://godbolt.org/z/GEaETxMo3)

  5. In the slimming tool we collect all the hints in a local bitset and then we move them to this special setter.

If the slimming tool thins things only once, and I have not nuked the T/P side it might work ...

Edited by Christos Anastopoulos

Merge request reports