TrackParticleCreator: Go around the issue of ForceUpdate discussed in ATR-19773
One of the main thread safety issues of the TrackParticleCreator was the ForceUpdate Summary where one forces a const Trk::Track to be updated.
i.e this call
if (m_forceTrackSummaryUpdate) {
// Do we really need to update const Trk::Track* track?
Trk::Track& nonConstTrack = const_cast<Trk::Track&>(*track);
m_trackSummaryTool->updateTrack(nonConstTrack);
}
This option (at least directly ...) is used only in legacy Trigger code, but according to ATR-19773 although this code is legacy, people want to retain it with the same semantics, as the code needs to run in NoMT as reference or so (@jmasik can correct me but this is my take away from ATR-19773).
If we ever remove it or there is no need to run like this, we can get rid also of the need of a noMT
version.
To avoid duplicating too much code hide the non-MT part inside a virtual call.
The standard version does not do anything here, no const_cast --> thread safe
The NoMT version does the const_cast above and I marked it at large as ATLAS_NO_THREAD_SAFE
.
Legacy clients that rely on updating a const Trk::Track taken from store should be using the NoMT
version
and can run only in legacy mode
i.e no-MT ... (hope the names make it a bit explicit ...)