Conversation
There was a problem hiding this comment.
Pull request overview
Refactors a few remaining “iterator loop + break” patterns into std::find_if-based lookups now that podio collections support this more cleanly, and removes outdated commented examples.
Changes:
- Replace manual association-search loops with
std::find_ifin scattered-electron association logic. - Update beam-particle selection helpers in
Beam.hto usestd::find_if. - Remove a large block of obsolete commented-out iteration examples.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/algorithms/reco/ScatteredElectronsTruth.cc |
Uses std::find_if to locate the truth↔reco association instead of a manual loop. |
src/algorithms/reco/InclusiveKinematicsElectron.cc |
Removes outdated commented code demonstrating older iteration patterns. |
src/algorithms/reco/HadronicFinalState.cc |
Uses std::find_if for truth↔reco association lookup instead of a manual loop. |
src/algorithms/reco/Beam.h |
Refactors “find first with PDG/status” helpers to std::find_if and adds <algorithm>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
) This PR applies the include-what-you-use fixes as suggested by https://github.com/eic/EICrecon/actions/runs/22023709298. Please merge this PR into the branch `find_if` to resolve failures in PR #2383. Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
simonge
left a comment
There was a problem hiding this comment.
Looks good. Capybara differences appear to be from other simultaneous PRs.
### Briefly, what does this PR introduce? Needs: - [x] podio-1.3 (AIDASoft/podio#626), in eic-shell as of 2025.09 In a few places, due to historical limitations of podio collections, we were still using iterator-based loops with tests and early break to do things that are more nicely done with `find_if` nowadays. This PR introduces the `find_if` based approach in a few cases, and removes a comment block complaints about all that used to not work... ### What kind of change does this PR introduce? - [x] Bug fix (issue: tech debt) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: epic-capybara <139920704+epic-capybara@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
It seems GitHub is having issues with checkout. I'll keep retrying the merge queue... |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This reverts commit e4db126.
) This PR applies the include-what-you-use fixes as suggested by https://github.com/eic/EICrecon/actions/runs/22023709298. Please merge this PR into the branch `find_if` to resolve failures in PR #2383. Auto-generated by [create-pull-request][1] [1]: https://github.com/peter-evans/create-pull-request Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
### Briefly, what does this PR introduce? Needs: - [x] podio-1.3 (AIDASoft/podio#626), in eic-shell as of 2025.09 In a few places, due to historical limitations of podio collections, we were still using iterator-based loops with tests and early break to do things that are more nicely done with `find_if` nowadays. This PR introduces the `find_if` based approach in a few cases, and removes a comment block complaints about all that used to not work... ### What kind of change does this PR introduce? - [x] Bug fix (issue: tech debt) - [ ] New feature (issue #__) - [ ] Documentation update - [ ] Other: __ ### Please check if this PR fulfills the following: - [ ] Tests for the changes have been added - [ ] Documentation has been added / updated - [ ] Changes have been communicated to collaborators ### Does this PR introduce breaking changes? What changes might users need to make to their code? No. ### Does this PR change default behavior? No. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: epic-capybara <139920704+epic-capybara@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Briefly, what does this PR introduce?
Needs:
In a few places, due to historical limitations of podio collections, we were still using iterator-based loops with tests and early break to do things that are more nicely done with
find_ifnowadays. This PR introduces thefind_ifbased approach in a few cases, and removes a comment block complaints about all that used to not work...What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
No.
Does this PR change default behavior?
No.