introduce a first version of options for configuration blocks
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.
Showing
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigBlock.py 70 additions, 2 deletions...Algorithms/AnalysisAlgorithmsConfig/python/ConfigBlock.py
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/ConfigSequence.py 40 additions, 0 deletions...orithms/AnalysisAlgorithmsConfig/python/ConfigSequence.py
- PhysicsAnalysis/Algorithms/AnalysisAlgorithmsConfig/python/FullCPAlgorithmsTest.py 4 additions, 2 deletions...s/AnalysisAlgorithmsConfig/python/FullCPAlgorithmsTest.py
- PhysicsAnalysis/Algorithms/EgammaAnalysisAlgorithms/python/PhotonAnalysisConfig.py 52 additions, 50 deletions...s/EgammaAnalysisAlgorithms/python/PhotonAnalysisConfig.py
- PhysicsAnalysis/Algorithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py 20 additions, 15 deletions...ithms/MuonAnalysisAlgorithms/python/MuonAnalysisConfig.py
Loading
Please register or sign in to comment