Skip to content
Snippets Groups Projects
Verified Commit fc07d1f4 authored by Tadej Novak's avatar Tadej Novak
Browse files

Fix EventBookkeeperTools tests in AthAnalysis

parent fcbdffaa
No related branches found
No related tags found
No related merge requests found
...@@ -75,8 +75,10 @@ if( NOT XAOD_STANDALONE ) ...@@ -75,8 +75,10 @@ if( NOT XAOD_STANDALONE )
PROPERTIES TIMEOUT 300 PROPERTIES TIMEOUT 300
POST_EXEC_SCRIPT nopost.sh ) POST_EXEC_SCRIPT nopost.sh )
atlas_add_test( CutFlowSvcOutputMP if( NOT XAOD_ANALYSIS )
SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2 atlas_add_test( CutFlowSvcOutputMP
PROPERTIES TIMEOUT 300 SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --nprocs=2
POST_EXEC_SCRIPT nopost.sh ) PROPERTIES TIMEOUT 300
POST_EXEC_SCRIPT nopost.sh )
endif()
endif() endif()
...@@ -15,8 +15,12 @@ def GetCurrentStreamName( msg ): ...@@ -15,8 +15,12 @@ def GetCurrentStreamName( msg ):
msg.info("Couldn't get input stream name from the RecFlags... trying AthFile directly.") msg.info("Couldn't get input stream name from the RecFlags... trying AthFile directly.")
from PyUtils.MetaReader import read_metadata from PyUtils.MetaReader import read_metadata
from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaCommon.AppMgr import ServiceMgr as svcMgr
input_file = svcMgr.EventSelector.InputCollections[0] 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 = read_metadata(input_file)
metadata = metadata[input_file] # promote all keys one level up metadata = metadata[input_file] # promote all keys one level up
......
...@@ -43,8 +43,11 @@ from AthenaCommon.AppMgr import theApp ...@@ -43,8 +43,11 @@ from AthenaCommon.AppMgr import theApp
import AthenaPoolCnvSvc.ReadAthenaPool # noqa: F401 import AthenaPoolCnvSvc.ReadAthenaPool # noqa: F401
# setup some configuration # setup some configuration
from RecExConfig.RecFlags import rec try:
rec.mergingStreamName = 'Stream1' from RecExConfig.RecFlags import rec
rec.mergingStreamName = 'Stream1'
except ModuleNotFoundError:
pass
# setup the CutFlowSvc and corresponding tools # setup the CutFlowSvc and corresponding tools
from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc from EventBookkeeperTools.CutFlowHelpers import CreateCutFlowSvc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment