Skip to content

introduce a first version of options for configuration blocks

Nils Erik Krumnack requested to merge krumnack/athena:block_properties into master

The basic idea/goal of configuration blocks is that the configuration system can read a configuration text file and then configure the blocks accordingly. This is made a lot simpler if the configurable options on the blocks can be set via a uniform interface.

This is just a first draft of such a mechanism that allows to add the options and set them by name from the python side. All I want from this MR is a basic interface that allows to add the options on the individual blocks and set them through a python interface. That will then allow me to update all the configuration blocks to expose options before I move on.

The mechanism for setting option values is even more rudimentary, doing just the minimal thing to allow setting the properties through a standard interface. This is mostly there to allow me to move forward somehow, but some details may change. The interface I have right now is probably not ideal for anybody, neither for the text nor the python configuration. That probably needs some changing at some point.

There is a much more sophisticated prototype available, but because of its complexity I didn't want to incorporate it into this first draft. Instead the interface I have should be (mostly) compatible with the interface that prototype exposes. It can then be retrofitted in here at some point. The full prototype is here: https://gitlab.cern.ch/jburr/configblock/-/tree/master/

Also: For photons the recomputeIsEM option should probably not be repeated in both the calibration and selection blocks. There needs to be a special method for forwarding options from one block to the next which will come in a future update, or when the full option mechanism gets incorporated here.

Edited by Nils Erik Krumnack

Merge request reports