xAODCore Dictionary Updates, master branch (2020.05.19.)
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 CMake module,
xAODUtilitiesConfig.cmake
, which provides theatlas_add_xaod_smart_pointer_dicts(...)
helper function for generating the XML lines corresponding to the types that the helper functions fromxAODCore/tools/DictHelpers.h
instantiated; - A new header,
xAODCore/tools/DictHelpers.h
, which provides a convenient way to include all headers needed by the previous CMake function ti work.
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).
Note that this is the second attempt at this update, after !32919 (closed). On which @mnowak rightfully pointed out that instantiating all the smart pointer types in the dictionary headers is not necessary these days with ROOT 6.
Pinging @ssnyder, @fwinkl and @krumnack for information purposes.