Skip to content

Add "empty" conditions when they are missing from the database

Roel Aaij requested to merge default_conditions into master

For "classic" conditions a null condition is added. A test for .get<nlohmann::json>().is_null() can be used in user code to provide fallback behaviour. As a result the handling of the Tell40Links condition is simplified. This feature is tested by existing tests, where the Tell40Links condition is always requested, but sometimes absent from the test DB.

For alignment conditions a condition that neither moves nor rotates is added. A warning is printed for each condition to indicate that this is happening. This is tested by removing from the test DB some conditions that are used by the tests, but implemented neither translation nor rotation. The DD4hep output is captured and checked for expected warnings.

FYI: @rmatev, @jonrob, @clemenci, @sponce, @cmarinbe, @decianm

Merge request reports