Fix export of dd4hep::units to python #1058
Merged
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
The export of dd4hep::units is problematic in the presence of identical libraries from DD4hep in the LD_LIBRARY_PATH:
The ROOT auto-class loading tends to falsely load these libraries if constants from the dd4hep namespace are requested in python. This is clearly wrong: the original libraries may not be binary compatible. The
The export of the units using a helper class fixes this and ensures that the auto load mechanism is not automatically triggered. This is at least a formally correct solution until the auto load mechanism is better understood.
In the ROOT loader for DDDigi the
TBranch::SetAutoDelete(true)
was not set causing eventually double deletion and arbitrary crashes. Data read by DDDigi are put on the store and deleted by the application to allow subsequent reading for feeding other threads. If ROOT would take care of the deletion, multi-threaded processing is not possible.ENDRELEASENOTES