diff --git a/Event/EventBookkeeperTools/CMakeLists.txt b/Event/EventBookkeeperTools/CMakeLists.txt
index 1ce5b56d3970485a436af39f11234534a89ebb7c..35d4ceee59b91efc6c08e9d5bbad9665b1a2afa1 100644
--- a/Event/EventBookkeeperTools/CMakeLists.txt
+++ b/Event/EventBookkeeperTools/CMakeLists.txt
@@ -75,8 +75,10 @@ if( NOT XAOD_STANDALONE )
                    PROPERTIES TIMEOUT 300
                    POST_EXEC_SCRIPT nopost.sh )
 
-   atlas_add_test( CutFlowSvcOutputMP
-                   SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2
-                   PROPERTIES TIMEOUT 300
-                   POST_EXEC_SCRIPT nopost.sh )
+   if( NOT XAOD_ANALYSIS )
+      atlas_add_test( CutFlowSvcOutputMP
+                      SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2
+                      PROPERTIES TIMEOUT 300
+                      POST_EXEC_SCRIPT nopost.sh )
+   endif()
 endif()
diff --git a/Event/EventBookkeeperTools/python/CutFlowHelpers.py b/Event/EventBookkeeperTools/python/CutFlowHelpers.py
index deda3827fb6412372315f6582181ecc818152dbf..2e6b78f02778a57ebcfe30e25c78c77fa475b2bd 100644
--- a/Event/EventBookkeeperTools/python/CutFlowHelpers.py
+++ b/Event/EventBookkeeperTools/python/CutFlowHelpers.py
@@ -15,8 +15,12 @@ def GetCurrentStreamName( msg ):
         msg.info("Couldn't get input stream name from the RecFlags... trying AthFile directly.")
 
     from PyUtils.MetaReader import read_metadata
-    from AthenaCommon.AppMgr  import ServiceMgr as svcMgr
-    input_file = svcMgr.EventSelector.InputCollections[0]
+    from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+    try:
+        input_file = svcMgr.EventSelector.InputCollections[0]
+    except AttributeError:
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        input_file = athenaCommonFlags.FilesInput()[0]
     metadata = read_metadata(input_file)
     metadata = metadata[input_file]  # promote all keys one level up
 
diff --git a/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py b/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
index adf6506b2c8eb0eec6afea92fcb1c45eac895347..f595e41d00a648c8e697b569fac18763cd5ff971 100644
--- a/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
+++ b/Event/EventBookkeeperTools/share/TestCutFlowSvcOutput.py
@@ -43,8 +43,11 @@ from AthenaCommon.AppMgr import theApp
 import AthenaPoolCnvSvc.ReadAthenaPool  # noqa: F401
 
 # setup some configuration
-from RecExConfig.RecFlags import rec
-rec.mergingStreamName = 'Stream1'
+try:
+    from RecExConfig.RecFlags import rec
+    rec.mergingStreamName = 'Stream1'
+except ModuleNotFoundError:
+    pass
 
 # setup the CutFlowSvc and corresponding tools
 from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc