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

Implement ROOT persistency mechanism for detector descriptions (Part 2). #206

merged 4 commits into from Jul 17, 2017


None yet
1 participant

MarkusFrankATcernch commented Jul 17, 2017


Implement ROOT persistency mechanism for detector descriptions (continuation of #202).

Object extensions are now persistent.

This is however not for free: it requires a dictionary for the extension itself and it requires a dictionary for the class holding the extension. These are:

  • dd4hep::DetElement::DetElementExtension<IFACE,CONCRETE> for DetElement extensions.
  • dd4hep::SimpleExtension<IFACE,CONCRETE> for simple extension managed by the user framework (user calls explicitly destructor).
  • dd4hep::DeleteExtension<IFACE,CONCRETE> for simple extension managed by dd4hep (dd4hep calls automatically destructor on hosting object destruction).
  • dd4hep::CopyDeleteExtension<IFACE,CONCRETE>. As above, but these extensions support calling the copy constructor of the embedded object and hence allow to copy also the hosting objects.

Please note: to persistify these objects it was necessary to no longer use the type-info of the objects as an identifier, but rather a 64-bit-hash of the raw type-info-name. This relies that this name is identical across platforms. This typically is true for linux, but not enforced by any standard.


@MarkusFrankATcernch MarkusFrankATcernch merged commit 1e16d19 into AIDASoft:master Jul 17, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment