Add tagged_bool and use it to make ITrajPoca::minimize more explicit
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)
Merge request reports
Activity
mentioned in merge request Rec!663 (merged)
mentioned in merge request Rec!662 (closed)
for reference, here's another blog on the topic: http://www.bfilipek.com/2017/03/on-toggle-parameters.html
@wouter FYI
added 6 commits
-
242cb945...2fc35df5 - 4 commits from branch
master
- 66243f48 - add TaggedBool
- 86c133df - Make ITrajPoca::minimize with optional restrictToRange more explicit
-
242cb945...2fc35df5 - 4 commits from branch
added 1 commit
- aca80e70 - Make ITrajPoca::minimize with optional restrictToRange more explicit
- [2017-07-16 00:02] Validation started with lhcb-nightly-builds-test#359
- [2017-07-16 00:03] Validation started with lhcb-head#1537
- [2017-07-16 00:04] Validation started with lhcb-gaudi-head-noavx#71
- [2017-07-16 00:04] Validation started with lhcb-clang-test#644
- [2017-07-16 00:04] Validation started with lhcb-lcg-dev4#221
- [2017-07-16 00:04] Validation started with lhcb-gaudi-head-noavx2#52
- [2017-07-16 00:04] Validation started with lhcb-lcg-dev3#221
- [2017-07-16 00:04] Validation started with lhcb-gaudi-head#1534
- [2017-07-17 00:02] Validation started with lhcb-nightly-builds-test#360
- [2017-07-17 00:03] Validation started with lhcb-head#1538
- [2017-07-17 00:04] Validation started with lhcb-gaudi-head-noavx#72
- [2017-07-17 00:04] Validation started with lhcb-clang-test#645
- [2017-07-17 00:04] Validation started with lhcb-lcg-dev3#222
- [2017-07-17 00:04] Validation started with lhcb-gaudi-head#1535
Edited by Software for LHCb@wouter please let me know if you are happy with these changes
mentioned in commit 4f7dcb41
mentioned in commit Alignment@b6f76bab
mentioned in merge request Alignment!45 (merged)
mentioned in commit Alignment@18cee012
mentioned in merge request Rec!1421 (merged)