AthConfigFlags: do not allow hashing of unlocked container
This MR contains several commits.
- The first is purely "cosmetic" and cleans up the unit test definition for
AthConfigFlags:- rename
TestAthConfigFlags.pyto lower-case to follow convention used in other files in this package - cleanup the unit test definition, i.e. use the auto-discovery for test functions to avoid accidentally not enabling new tests
- rename
- The second commit fixes a potentially dangerous behavior of the
AthConfigFlagshash feature (cc @tbold @ktopolni @rbielski):- Instead of returning
None, which would be considered an equal hash, throw an exception when trying to hash an unlockedAthConfigFlagscontainer. This avoids false accumulator caching in case someone forgets to lock the flag container. Mostly an issue for unit tests and mixed old/new-style job options. - Also simplify the hash calculation by only invoking
hashonce.
- Instead of returning
The other commits are necessary fixes to lock the ConfigFlags:
- RecExCommon: Initialize the
ConfigFlagsonce so they are available to other job options later. Apply any remaining changes and then lock them. This does not yet work for DPD making (ATLASRECTS-6636) and needs to be reviewed. - AthenaMonitoring: Move
DataQualityInit_jobOptionsearlier as they are modifyingConfigFlags.
Edited by Frank Winklmeier