Skip to content

Add MT to track observer tool

Each track is uniquely identified using a thread-safe std::atomic<std::uint32_t> (defined in AmbiguityProcessorUtility.cxx), which serves as Id for the tool. If a track has a parent, the unique Id of the parent is also saved by the tool. As the ambiguity processor tools delete tracks, all tracks (including temporary tracks) are saved to the tool's cache entry, i.e. an ObservedTracksMap object. The TrackPtr.h class is also augmented with a unique Id.

Two instances of the TrkObserverTool must be instantiated in order to avoid data handle conflicts:

  • Instance that does not initialize the data handles and is used throughout the ambiguity solving
  • Instance that initializes the data handles and is only used to write out the observed tracks after the ambiguity solving is done

The track uid defaults to -1 when required and the observer tool is not enabled.

Edited by Sebastien Rettie

Merge request reports