ATLASRECTS-5086 . Avoid overwriting the existing TrkSummary (especially without deleting it first)
This should help with ATLASRECTS-5086 .
The old (21.0 etc) and prb desired behaviour :
- https://gitlab.cern.ch/atlas/athena/blob/21.0/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx#L191
- https://gitlab.cern.ch/atlas/athena/blob/21.2/Tracking/TrkTools/TrkTrackSummaryTool/src/TrackSummaryTool.cxx#L195
If a summary already exists then return a clone of the existing Trk::TrackSummay from a Trk::Track. In short create does not create a new always but can use the existing. If one wants a brand new should use the update. if one does not exist create tries to install one
Now, the previous code in master had a bug as it was always installing a new one to the Trk::Track (even if it was a clone of the existing) but was forgetting to release/delete the old.
Now, this is avoided as is something is there we do not try to install something in place, we just return a clone (ala the 21.0 behaviour)
Edited by Christos Anastopoulos