Rework ownership of Trk::Track::m_trackSummary
In the existing code base, this member is a raw pointer with assumed
ownership, and there is also a data hiding problem since the
TrackSummaryTool
is marked as a friend class of Track
. This commit
fixes several minor issues with this data member:
-
The member is converted to a
std::unique_ptr
, instead of a raw pointer. This makes the ownership mechanics clearer, and saves us a few deletes here and there. -
All instances where the data member was being accessed outside of the class have been replaced with a setter method.
-
The existing setter method was changed to accept a
std::unique_ptr
, in accordance with the data member itself. -
Trk::TrackSummaryTool
was removed as a friend class ofTrk::Track
.
Merge request reports
Activity
This merge request affects 2 packages:
- Tracking/TrkEvent/TrkTrack
- Tracking/TrkTools/TrkTrackSummaryTool
Adding @amorley as watcher
added Tracking master review-pending-level-1 labels
CI Result SUCCESS (hash fb378440)Athena AthSimulation AthGeneration AnalysisBase externals cmake make required tests optional tests Full details available on this CI monitor view
Athena: number of compilation errors 0, warnings 0
AthSimulation: number of compilation errors 0, warnings 0
AthGeneration: number of compilation errors 0, warnings 0
AnalysisBase: number of compilation errors 0, warnings 0
For experts only: Jenkins output [CI-MERGE-REQUEST-CC7 20114]OK seems everything has been migrated so as this to finally work in master !!!
So good to see it done . From the 2 the friendship was the more annoying in 21 and before (we had no setters). This and the structure of the tools was making the ownership convolved.
Nice to see we can start dropping some of these
Edited by Christos Anastopoulosadded review-approved label and removed review-pending-level-1 label
mentioned in commit dff2da64
added sweep:ignore label