-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: allow for reordered DD4hep_service geometry arguments #1035
fix: allow for reordered DD4hep_service geometry arguments #1035
Conversation
Hopefully one of the CI jobs will fail. Then I'll merge the fix, and then hopefully CI will not fail anymore. |
Seems like it's not going to fail since it requires on specific ordering and only calling specific algorithms. |
@simonge This change should fix it. I tested with
and had no more failures. |
Thanks @wdconinc, trying to test this but today a bug loading the geometry xml has appeared. |
…_service-in-algorithm-init-matters
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.
Works well, thanks
This reverts commit 167ae08.
Reverted the reordering that was intended to trigger the bug. Needs new approval. |
… const pointers (#1045) ### Briefly, what does this PR introduce? While looking into #1032, #1035, #1036 I started realizing two things: - cell ID position converters are created by algorithms from geometry instead of doing this once in the service, - there is no const protection in the detector pointers passed to algorithms (i.e. an algorithm could change geometry), - there is no protection against null pointers being passed from geometry. The first two points are related since the interface for creating a cell ID position converter requires a non-const detector (see also AIDASoft/DD4hep#1148). This PR centralizes the creation of cell ID position converters, clarifies ownership through unique_ptrs, and makes sure no null pointers are passed to the algorithms. In places where the constructor gets the const not_null pointer, we can also impose this in the class on the relevant member variable. ### What kind of change does this PR introduce? - [x] Bug fix (issue: avoid creation of cell ID position converters in algorithms) - [ ] 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 - [x] Changes have been communicated to collaborators: - @simonge reordered MatrixTransferStatic init arguments - @c-dilks @chchatte92 this also affects RichGeo_service etc. ### Does this PR introduce breaking changes? What changes might users need to make to their code? Yes, now requires GSL (which has always been in eic-shell and is a requirement). ### Does this PR change default behavior? No. --------- Co-authored-by: Christopher Dilks <c-dilks@users.noreply.github.com> Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Briefly, what does this PR introduce?
This fixes the DD4hep_service to allow querying the geometry in any order, and avoids race conditions in the
detector()
andcellIDPositionConverter()
calls.TODO:
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.