Skip to content

Proposal for global derived conditions

Ben Couturier requested to merge bcouturi_AddGlobalDerivedConditions into master

With the current definition of derived conditions, it is not possible for algorithms to share the definition and the content of derived conditions. This leads to inefficiency and complexity in the configuration, and it is desirable to simplify this.

One way to solve this problem would be to allow multiple algorithm to declare/define the condition, provided the definition is identical. Doing this check is not possible with the GenericConditionUpdateCall class which can take any functor class. (It would also be possible to separate the definition and the declaration of usage but it is not clear where the definition should be placed, without increasing the complexity of the configuration management to make sure all required derived conditions have been defined).

It is however possible to create another ConditionUpdateCall class that is templated to only accept function pointer. It is used by a new call "addGlobalConditionDerivation" that can check whether the new definition is the same by checking whether the function pointer and arguments are identical.

The current MR adds this functionality (via the addGlobalDerivedCondition method which algorithms can invoke at initialization time) as well as a test.

It still needs:

  • the same functionality for the DetDesc version of the derived conditions
  • improved logging and error handling
Edited by Sebastien Ponce

Merge request reports

Loading