Skip to content

Bring standalone element link behaviour into line with athena

Jon Burr requested to merge jburr/athena:ThinnedAthLinks into 21.2

The default constructor for ElementLinkBase is different in the standalone implementation and the athena implementation. This MR fixes this so that default constructed links have their index set to -1 (the INVALID value).

This has the useful effect that it means that it is possible to distinguish links which have been deliberately constructed as null and those which had valid targets but those targets were removed (most likely by the derivation framework). In order to make using this fact easier and more explicit in code I also added wasTargetRemoved functions to both implementations, as well as a few supporting functions to the standalone ElementLinkBase class (including the isDefault function which is useful in its own right).

This already has a potential client in the tau analysis code (ATLTAU-1712).

Tagging @akraszna, @dguest, @mihuebne, @christos

Edited by Jon Burr

Merge request reports

Loading