Skip to content
Snippets Groups Projects
Commit 323d8317 authored by Adam Edward Barton's avatar Adam Edward Barton :speech_balloon:
Browse files

Merge branch 'cbk/tests' into 'master'

Cleanup of CutFlowSvc tests

See merge request atlas/athena!37990
parents 66b27d31 3e89ef1a
No related branches found
No related tags found
No related merge requests found
......@@ -69,4 +69,14 @@ if( NOT XAOD_STANDALONE )
SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py
PROPERTIES TIMEOUT 300
POST_EXEC_SCRIPT nopost.sh )
atlas_add_test( CutFlowSvcOutputMT
SCRIPT athena EventBookkeeperTools/TestCutFlowSvcOutput.py --threads=2
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 )
endif()
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# setup the input
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
if 'inputFiles' in dir():
athenaCommonFlags.FilesInput = inputFiles.split(',')
athenaCommonFlags.FilesInput = inputFiles.split(',') # noqa: F821
del inputFiles
else:
athenaCommonFlags.FilesInput = [
'/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/mc16_13TeV.410501.PowhegPythia8EvtGen_A14_ttbar_hdamp258p75_nonallhad.merge.AOD.e5458_s3126_r9364_r9315/AOD.11182705._000001.pool.root.1'
]
# get a handle to the ApplicationManager
from AthenaCommon.AppMgr import theApp
theApp.EvtMax = 10
# setup basic sequencing
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
# setup old EventInfo conversion
from xAODEventInfoCnv.xAODEventInfoCnvConf import xAODMaker__EventInfoCnvAlg
topSequence += xAODMaker__EventInfoCnvAlg()
......
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
###############################################################
#
# Minimal athena options to execute the CutFlowSvc with algorithms
......@@ -12,16 +12,17 @@
#==============================================================
# debug logging
from AthenaCommon.Constants import DEBUG
from AthenaCommon.Logging import logging
logging.getLogger('CreateCutFlowSvc').setLevel(DEBUG)
# basic job configuration
import AthenaCommon.AtlasUnixStandardJob
import AthenaCommon.AtlasUnixStandardJob # noqa: F401
# setup the input
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
if 'inputFiles' in dir():
athenaCommonFlags.FilesInput = inputFiles.split(',')
athenaCommonFlags.FilesInput = inputFiles.split(',') # noqa: F821
del inputFiles
else:
athenaCommonFlags.FilesInput = [
......@@ -39,7 +40,7 @@ from AthenaCommon.AppMgr import ServiceMgr, ToolSvc
from AthenaCommon.AppMgr import theApp
# load POOL support
import AthenaPoolCnvSvc.ReadAthenaPool
import AthenaPoolCnvSvc.ReadAthenaPool # noqa: F401
# setup some configuration
from RecExConfig.RecFlags import rec
......
......@@ -15,8 +15,8 @@ from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
from EventBookkeeperTools.EventBookkeeperToolsConfig import BookkeeperDumperToolCfg
# Argument parsing
parser = ArgumentParser(prog='dump-cbk')
parser.add_argument('input', metavar='input', type=str, nargs='?',
parser = ArgumentParser(prog='test_BookkeeperDumpertool')
parser.add_argument('input', type=str, nargs='?',
help='Specify the input file')
args = parser.parse_args()
......
......@@ -17,8 +17,8 @@ from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg, CutFlowOutputList
# Argument parsing
parser = ArgumentParser(prog='dump-cbk')
parser.add_argument('input', metavar='input', type=str, nargs='?',
parser = ArgumentParser(prog='test_CutFlowSvc')
parser.add_argument('input', type=str, nargs='?',
help='Specify the input file')
args = parser.parse_args()
......@@ -44,6 +44,11 @@ ConfigFlags.lock()
# Setup service
acc = MainServicesCfg(ConfigFlags)
acc.merge(PoolReadCfg(ConfigFlags))
if 'EventInfo' not in ConfigFlags.Input.Collections:
from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
acc.merge(EventInfoCnvAlgCfg(ConfigFlags, disableBeamSpot=True))
acc.merge(CutFlowSvcCfg(ConfigFlags))
acc.addEventAlgo(CompFactory.TestFilterReentrantAlg("TestReentrant1", FilterKey="TestReentrant1", Modulo=2))
acc.addEventAlgo(CompFactory.TestFilterReentrantAlg("TestReentrant2", FilterKey="TestReentrant2", Modulo=4))
......
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