Skip to content

CPAlgorithms: add options to not configure any block on data or MC

Baptiste Ravina requested to merge ravinab/athena:skip_data into main

New options are made available to ConfigBlock: skipOnData and skipOnMC, which respectively prevent the block from calling makeAlgs when running on data or MC samples.

The logic is evaluated before the config block's makeAlgs, which means that when an expert has decided that a config block e.g. cannot be run on data and wrote

if config.dataType() is DataType.Data:
    return

the user cannot override this via skipOnData/skipOnMC.

The use-case is to allow users to skip algorithms they don't need/want to run on data or MC, when these are already registered centrally in PhysicsAnalysis/Algorithms, saving them from a sparse-checkout of Athena and local hacks into the relevant config blocks, or from having to set up multiple YAML configs.

Merge request reports