From 4793abb73606e2d8ad0a2e573e129adcdf88a3da Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Thu, 16 Jan 2020 16:11:10 +0100 Subject: [PATCH] Migrate EventAthenaPool TPCnv unit tests to ComponentAccumulator EventTPCnv_15.0.0_test - passes EventTPCnv_17.5.0_test - passes EventTPCnv_18.0.0_test - passes EventTPCnv_20.1.7.2_test - passes --- Event/EventAthenaPool/CMakeLists.txt | 9 +++++---- .../test/EventTPCnv_15.0.0_test.py | 19 +++++++++++++++++++ .../test/EventTPCnv_17.5.0_test.py | 19 +++++++++++++++++++ .../test/EventTPCnv_18.0.0_test.py | 19 +++++++++++++++++++ .../test/EventTPCnv_20.1.7.2_test.py | 19 +++++++++++++++++++ 5 files changed, 81 insertions(+), 4 deletions(-) create mode 100755 Event/EventAthenaPool/test/EventTPCnv_15.0.0_test.py create mode 100755 Event/EventAthenaPool/test/EventTPCnv_17.5.0_test.py create mode 100755 Event/EventAthenaPool/test/EventTPCnv_18.0.0_test.py create mode 100755 Event/EventAthenaPool/test/EventTPCnv_20.1.7.2_test.py diff --git a/Event/EventAthenaPool/CMakeLists.txt b/Event/EventAthenaPool/CMakeLists.txt index d27314cb55e..be53c3aed99 100644 --- a/Event/EventAthenaPool/CMakeLists.txt +++ b/Event/EventAthenaPool/CMakeLists.txt @@ -13,6 +13,7 @@ atlas_add_poolcnv_library( EventAthenaPoolPoolCnv # Install files from the package: atlas_install_joboptions( share/*.py ) +atlas_install_scripts( test/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) # Set up (a) test(s) for the converter(s): find_package( AthenaPoolUtilitiesTest ) @@ -20,13 +21,13 @@ find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND AND NOT GENERATIONBASE ) set( EVENTATHENAPOOL_REFERENCE_TAG EventAthenaPoolReference-01-00-00 ) - run_tpcnv_legacy_test( EventTPCnv_15.0.0 AOD-15.0.0-full + run_tpcnv_test( EventTPCnv_15.0.0 AOD-15.0.0-full REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) - run_tpcnv_legacy_test( EventTPCnv_17.5.0 AOD-17.5.0-full + run_tpcnv_test( EventTPCnv_17.5.0 AOD-17.5.0-full REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) - run_tpcnv_legacy_test( EventTPCnv_18.0.0 AOD-18.0.0-full + run_tpcnv_test( EventTPCnv_18.0.0 AOD-18.0.0-full REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) - run_tpcnv_legacy_test( EventTPCnv_20.1.7.2 ESD-20.1.7.2 + run_tpcnv_test( EventTPCnv_20.1.7.2 ESD-20.1.7.2 REFERENCE_TAG ${EVENTATHENAPOOL_REFERENCE_TAG} ) elseif( NOT ATHENAPOOLUTILITIESTEST_FOUND ) message( WARNING diff --git a/Event/EventAthenaPool/test/EventTPCnv_15.0.0_test.py b/Event/EventAthenaPool/test/EventTPCnv_15.0.0_test.py new file mode 100755 index 00000000000..852e4030ad1 --- /dev/null +++ b/Event/EventAthenaPool/test/EventTPCnv_15.0.0_test.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +""" +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" + +from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest + +if __name__ == "__main__": + infile = 'aod/AOD-15.0.0/AOD-15.0.0-full.pool.root' + + keys = [ + #EventInfo_p2 + 'McEventInfo', + + #EventStreamInfo_p1 + 'InputMetaDataStore/StreamAOD' + ] + + TPCnvTest(infile, keys, useIOVDbSvc=True) diff --git a/Event/EventAthenaPool/test/EventTPCnv_17.5.0_test.py b/Event/EventAthenaPool/test/EventTPCnv_17.5.0_test.py new file mode 100755 index 00000000000..6f05fc8e8c5 --- /dev/null +++ b/Event/EventAthenaPool/test/EventTPCnv_17.5.0_test.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +""" +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" + +from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest + +if __name__ == "__main__": + infile = 'aod/AOD-17.5.0/AOD-17.5.0-full.pool.root' + + keys = [ + #EventInfo_p3 + 'McEventInfo', + + #EventStreamInfo_p2 + 'InputMetaDataStore/StreamAOD', + ] + + TPCnvTest(infile, keys, useIOVDbSvc=True) diff --git a/Event/EventAthenaPool/test/EventTPCnv_18.0.0_test.py b/Event/EventAthenaPool/test/EventTPCnv_18.0.0_test.py new file mode 100755 index 00000000000..764bd4897a4 --- /dev/null +++ b/Event/EventAthenaPool/test/EventTPCnv_18.0.0_test.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +""" +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" + +from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest + +if __name__ == "__main__": + infile = 'aod/AOD-18.0.0/AOD-18.0.0-full.pool.root' + + keys = [ + #EventInfo_p4 + 'McEventInfo', + + #EventStreamInfo_p2 + 'InputMetaDataStore/StreamAOD', + ] + + TPCnvTest(infile, keys, useIOVDbSvc=True) diff --git a/Event/EventAthenaPool/test/EventTPCnv_20.1.7.2_test.py b/Event/EventAthenaPool/test/EventTPCnv_20.1.7.2_test.py new file mode 100755 index 00000000000..06d6092628f --- /dev/null +++ b/Event/EventAthenaPool/test/EventTPCnv_20.1.7.2_test.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +""" +Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +""" + +from AthenaPoolUtilities.TPCnvTestConfig import TPCnvTest + +if __name__ == "__main__": + infile = 'esd/ESD-20.1.7.2.pool.root' + + keys = [ + #EventStreamInfo_p3 + 'InputMetaDataStore/StreamESD', + + #PileUpEventInfo_p5 + 'OverlayEvent', + ] + + TPCnvTest(infile, keys, useIOVDbSvc=True) -- GitLab