diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py index ded5ba448285c2075dbe9b458d99ce99ee71327d..e280093f5ea84d2333d268072542c4f7ef656adc 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/CFValidation.py @@ -20,6 +20,11 @@ def findViewAlgs( inputNodes, viewNodes ): # If node is a sequence, explore further if isSequence( node ): + # Empty nodes can cause Gaudi scheduler bug https://gitlab.cern.ch/gaudi/Gaudi/-/issues/135 + if len( node.getChildren() ) == 0 and node.ModeOR: + + raise RuntimeError( "Empty CF sequence in OR mode can cause Gaudi scheduler bug. Please remove " + node.getName() ) + # Identify view CF nodes if node.getName() in viewNodes.keys(): diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py index 5b5dbf7b3b5459f22189690bd6631d3c5160435a..4721965a9c2ce6cb8b8d716c346223636a997ca7 100644 --- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py +++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Test/ViewCFTest.py @@ -20,8 +20,12 @@ class ViewCFTest( unittest.TestCase ): vdv1 = CfgMgr.AthViews__ViewDataVerifier("vdv1") vdv2 = CfgMgr.AthViews__ViewDataVerifier("vdv2") - # Add an algorithm to a sequence + # Test error for empty sequence topSequence += seqOR( "makeViewSequence" ) + with self.assertRaisesRegex( RuntimeError, "Please remove makeViewSequence" ): + findViewAlgs( topSequence.getChildren(), {} ) + + # Add an algorithm to the sequence topSequence.makeViewSequence += evca1 #topSequence.makeViewSequence += evca2