Skip to content

xAODCore Dictionary Updates, master branch (2020.05.15.)

Similar to !32914 (merged), this MR continues sampling updates from !32081 (closed) into digestible chunks.

In order to organise the dictionary generation of the xAOD packages a little better, this MR introduces some new functionality in xAODCore.

  • A new header, xAODCore/tools/DictHelpers.h, which provides some convenience macros for instantiating (smart pointer) types that we typically want to generate dictionaries for;
  • A new CMake module, xAODUtilitiesConfig.cmake, which provides the atlas_add_xaod_smart_pointer_dicts(...) helper function for generating the XML lines corresponding to the types that the helper functions from xAODCore/tools/DictHelpers.h instantiated.

The idea here was to avoid the mindless repetitions of lines in the <Foo>Dict.h headers and selection.xml files across the packages. With the help of these macros and the CMake function the xAOD packages can express in a much more compact way which types they want to generate smart pointer dictionaries for.

The concept for this is not new at all. The atlas_add_dictionary(...) function can actually auto-generate type declarations for the dictionary that it wants to generate, through its many optional arguments, already. I was at first considering extending that function inside atlas/atlasexternals for this functionality at first, but then decided that it would be more elegant to have this implemented in xAODCore. A bit similar to how AthenaPoolUtilitiesTestConfig.cmake is used. (Just like for AthenaPoolUtilitiesTestConfig.cmake, I had to teach the project configurations how to find this module.)

With this functionality in place I also updated a number of "simpler" packages as part of this MR, to make use of this code. These are all packages that didn't declare any STL-only dictionaries, or any other dictionary that in !32081 (closed) I decided to migrate somewhere else. The list doesn't even include all the "simple" packages like that, as I wanted to keep this MR small enough to be reviewable. Once this MR is merged, I'll open separate MRs with the remaining updates that I developed in !32081 (closed).

Pinging @ssnyder, @fwinkl and @krumnack for information purpuses.

Merge request reports

Loading