Skip to content

assign only sorted sets to properties to ensure a reproducible configuration

Walter Lampl requested to merge wlampl/athena:sortedSetProps into 23.0

This MR is an alternative proposed to !62968 (closed).

Background: The iteration order over python sets is not reproducible (on purpose in recent python versions, see https://docs.python.org/3.4/reference/datamodel.html#object.__hash__) Consequently, the order of elements in a vector-property filled from python sets are not reproducible. In none of the cases I found the client cxx-code relies on the order, so this is not a real bug. But its potentially confusing when diff'ing configurations.

This MR works around this issue by sorting the elements of the python set before assigning it to the property.

Aside: Gaudi::Property<std::set<unsigend> > is possible and better match for properties that contain an unsorted collection of unique numbers, like DQ-Defects or LAr Frond-End Board identifiers.

Merge request reports