Skip to content
Snippets Groups Projects

Add tagged_bool and use it to make ITrajPoca::minimize more explicit

Merged Gerhard Raven requested to merge make_itrajpoca_more_explicit into master

Make the restrictToRange specification in ITrajPoca::minimize more explicit by introducing a tagged bool instead of plain bool so that instead of:

  ITrajPoca* pocaTool = ...;
  Trajectory& traj1 = ...;
  Trajectory& traj2 = ...;
  Gaudi::XYZVector distance;
  auto sc = pocaTool->minimize( traj1, mu1, true,
                                traj2, mu2, true,
                                distance, 0.001*Gaudi::Units::mm)

one now has to write:

  ITrajPoca* pocaTool = ...;
  Trajectory& traj1 = ...;
  Trajectory& traj2 = ...;
  Gaudi::XYZVector distance;
  auto sc = pocaTool->minimize( traj1, mu1, ITrajPoca::RestrictToRange{true},
                                traj2, mu2, ITrajPoca::RestrictToRange{true},
                                distance, 0.001*Gaudi::Units::mm)

which explicitly documents the meaning of the 3rd and 6th arguments at the call site.

Requires Rec!663 (merged)

Edited by Gerhard Raven

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading