Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L LHCb
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 198
    • Issues 198
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Jira
    • Jira
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • LHCbLHCb
  • LHCb
  • Merge requests
  • !785

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

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Gerhard Raven requested to merge make_itrajpoca_more_explicit into master Jul 15, 2017
  • Overview 5
  • Commits 2
  • Pipelines 0
  • Changes 4

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 Jul 16, 2017 by Gerhard Raven
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: make_itrajpoca_more_explicit