Skip to content

Update packages needed to make ConfigFlag dual use in Athena and AnalysisBase

Chris Meyer requested to merge cjmeyer/athena:dual-use-config-flags into master

Note: this is a second attemp at !54147 (merged) which was reverted since it removed athena.py from AthAnalysis. I incorrectly used XAOD_ANALYSIS assuming it only referred to AnalysisBase (not the case; it also includes AthAnalysis). Here I've changed it to XAOD_STANDALONE, and added the proper labels to do a full suite a build checks.

This MR includes 3 new packages in AnalysisBase:

Control/AthenaCommon
Control/AthenaConfiguration
Tools/PyUtils

While AthenaCommon isn't strictly necessary, it pulls in Logging, Constants and SystemOfUnits which reduces the number of try ... except statements in AthenaConfiguration. The compilation is updated to only pull in these three files when in AnalysisBase, otherwise try statements in AnaAlgorithm think it's running in Athena (since this package is available) and set things up incorrectly in AnalysisBase.

Checks for the Gaudi environment are added to MetaReader so it also works when running in AnalysisBase. The main difference is to rely on FileMetaData instead of EventStreamInfo for filling many of the basic properties, e.g., isMC.

AllConfigFlags is largely kept the same. This means AnalysisBase has many flags loaded that are not relevant. If some of the irrelevant (for AB) flags are called, they will cause a crash since this results in an import of modules only available in Athena. Since they are lazy loaded, things work fine as long as these flags aren't called by a user.

Finally, six is removed (dual compatability for python 2 and 3) since it is no longer needed in 22.*, and this keeps us from adding it as a dependency to AnalysisBase.

Edited by Chris Meyer

Merge request reports

Loading