-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove excess selector code #1587
Open
simonge
wants to merge
24
commits into
main
Choose a base branch
from
Remove-Excess-Selector-Code
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
7b79806
Removed Selector Code
simonge 2f8fae7
Added functionality to the RangeSplit and ValueSplit functors
simonge 0f2ce1d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] a601ad4
Changes suggested by sonarcloud
simonge ccce8f5
Overload the constructor rather than messing around with variants
simonge c499b4e
Re-add default
simonge 95286e9
More sonarcloud advised changes
simonge 20cb0b4
Remove suggested const flags to see if the CI behaves better
simonge 134a54d
Removed Selector Code
simonge 0e1c3a1
Added functionality to the RangeSplit and ValueSplit functors
simonge fc9c691
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5aed707
Changes suggested by sonarcloud
simonge 2c188c2
Overload the constructor rather than messing around with variants
simonge bbff480
Re-add default
simonge 6b3010e
More sonarcloud advised changes
simonge 9786e24
Remove suggested const flags to see if the CI behaves better
simonge 28e73c0
Merge remote-tracking branch 'origin/main' into Remove-Excess-Selecto…
simonge 320406e
Merge branch 'Remove-Excess-Selector-Code' of github.com:eic/EICrecon…
simonge 5f943e0
Fix indentation
simonge c336c4f
Created BooleanSplit functor and reverted ValueSplit
simonge b13bbe8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d22b853
Convert BooleanSplit to use float type as the charged field in Recons…
simonge 6b1c511
Merge branch 'Remove-Excess-Selector-Code' of github.com:eic/EICrecon…
simonge 5acacfd
specify float array
simonge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
45 changes: 0 additions & 45 deletions
45
src/algorithms/reco/ChargedReconstructedParticleSelector.h
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
41 changes: 0 additions & 41 deletions
41
src/global/reco/ChargedReconstructedParticleSelector_factory.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also const ref the
ids
arg here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, optionally, I've wondered about a
TrueFalseSplit
functor a number of times. That's really just aValueSplit
(which is how this gets implemented in plugins), but it could have the benefit of accepting a function that returns a bool, which is semantically cleaner than relying on bool to integer conversions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would have to move away from the simple std::find implementation for anything other than ==. I'll have another think, as changing the functors already there is making them less clear. It should be possible to pass an array of boolean operators along with values and member functions to a functor.
After the vertexing discussion, access to min/max might be nice too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BooleanSplit (name can still be changed) should be able to perform the jobs of RangeSplit and ValueSplit where an array of functions which return a bool from two inputs is passed alongside the array of values to compare. The bools are all reduced by and rather than trying to mix in some more complexity.
What is missing the the ability to compare types other than float, I'm not sure how to approach for instance asking for e.g. ReconstructedParticles with PDG "equal_to" and a goodnessOfPID "greater_than". Maybe it's not important, could be done in a few steps, or this sort of thing is not what we'll want to do in eicrecon.