Add a steering file for using the native EDM4hep algorithms#70
Draft
Add a steering file for using the native EDM4hep algorithms#70
Conversation
3 tasks
andresailer
reviewed
Dec 3, 2025
| Dict[str, Any]: The converted dictionary. | ||
| """ | ||
|
|
||
| return {k: [str(v).lower()] if isinstance(v, bool) else [str(elem) for elem in v] if isinstance(v, list) else [str(v)] if isinstance(v, float) or isinstance(v, int) else [v] if isinstance(v, str) else v for k, v in dict.items()} |
Collaborator
There was a problem hiding this comment.
Suggested change
| return {k: [str(v).lower()] if isinstance(v, bool) else [str(elem) for elem in v] if isinstance(v, list) else [str(v)] if isinstance(v, float) or isinstance(v, int) else [v] if isinstance(v, str) else v for k, v in dict.items()} | |
| return {k: [str(v).lower()] if isinstance(v, bool) else [str(elem) for elem in v] if isinstance(v, list) else [str(v)] if isinstance(v, (float, int)) else [v] if isinstance(v, str) else v for k, v in dict.items()} |
isinstance can take a tuple of types as the second argument
Or put the str also in that tuple for simplicity.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
BEGINRELEASENOTES
CLDReconstruction_iosvc.py, a steering file that uses IOSvc and the native algorithms when possibleENDRELEASENOTES
Tested that the original marlin reconstruction gives the same results before and after since nothing should have changed for it, both with
--truthTrackingand without (up to some ID changes because I think there is non-deterministic ordering in Refit, but the tracks are the same).