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
DetElementCreator::process
non-zero to avoid erroneously raising an exception after finishing.ENDRELEASENOTES
I am not entirely sure if theDDDB
examples were turned off on purpose, there seem to be quite some test failures in there. It might be easier to move the new test case to somewhere else, I just put it intoDDDB
because it comes with a compact file that uses theDetElementCreator
plugin. I can also move all the "noise" into a separate PR, so that this only contains what is really necessary.The issue that is fixed by this
Without the (one line) fix, I run into the following issue:
The exception is raised here:
DD4hep/DDCore/src/DetectorImp.cpp
Lines 854 to 857 in 2a492e2
The return value in turn is set here:
DD4hep/DDCore/src/plugins/StandardPlugins.cpp
Lines 1406 to 1411 in 2a492e2
Which finally calls
PlacedVolumeManager::process
DD4hep/DDCore/src/VolumeProcessor.cpp
Line 33 in 2a492e2
The
process
that is called in this case isDetElementCreator::process
. One of the paths through this looks like thisDD4hep/DDCore/src/gdml/DetElementCreator.cpp
Lines 317 to 331 in 2a492e2
the other looks like this
DD4hep/DDCore/src/gdml/DetElementCreator.cpp
Lines 422 to 426 in 2a492e2
If I am not mistaken, this means that even if the
DetElementCreator
does nothing (i.e. automatic success?), it still returns 0. That at some point signals failure to the machinery. Hence, changing the default return value to 1, would fix this. I am not entirely sure about all the assumptions in this, but this would fix things for me.