Skip to content

Draft: auto configure block options

When the blockName is set in a ConfigBlock and add to a ConfigSequence, the options will be added to a metadata object in the ConfigSequence under blockName.optionName = optionValue.

Added an autoConfigure attribute to the config block options. The autoConfigure attribute can be set to a string where block options are contained in {...}. For options of type dict (list), dict entries (list items) can be configured by setting autoConfigure to a dict (lists) of autoConfig strings.

For example, if the containerName option for the muon working point had the autoConfigure string set to {Muons.containerName}, was not set by the user, and the muons block was added to the ConfigSequence, then {Muons.containerName} would be replaced with AnaMuons or whatever was set by the user in the muons block.

Settings from the autoconfigureFromFlags flags can also be referenced using {config.flags...}.

Auto configuration of options occurs when calling ConfigSequence.fullConfigure().

At the moment, only the muon working point containerName and the output containers for muons and event info are auto configured. If people are happy with the current implementation, this can be extended to the other blocks and their options.

Can only reference and configure block options so !70461 (merged) needs to be merged before many other block options can be auto configured.

The changes should be backwards compatible: some settings will not need to be set but it wont affect anything if someone sets them anyways.

Edited by Joseph Earl Lambert

Merge request reports