From 3ca2dcc4977d4e6d23ad7eedc1f93cbc1636f6ad Mon Sep 17 00:00:00 2001 From: John Chapman <jchapman@cern.ch> Date: Tue, 14 Jan 2020 14:06:42 +0100 Subject: [PATCH] Migrate MuonEventAthenaPool TPCnv unit tests to ComponentAccumulator MuonEventTPCnv_17.0.0_test - passes MuonEventTPCnv_20.1.7.2_test - passes --- .../MuonEventAthenaPool/CMakeLists.txt | 11 ++--- .../test/MuonEventTPCnv_17.0.0_test.py | 42 ++++++++++++++++++ .../test/MuonEventTPCnv_20.1.7.2_test.py | 44 +++++++++++++++++++ 3 files changed, 92 insertions(+), 5 deletions(-) create mode 100755 MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_17.0.0_test.py create mode 100755 MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_20.1.7.2_test.py diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt index d8673e39402..d05766c1aa3 100644 --- a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/CMakeLists.txt @@ -67,6 +67,7 @@ atlas_add_dictionary( MuonRDOCnvDict # 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 ) @@ -74,14 +75,14 @@ find_package( AthenaPoolUtilitiesTest ) if( ATHENAPOOLUTILITIESTEST_FOUND ) set( MUONEVENTATHENAPOOL_REFERENCE_TAG MuonEventAthenaPoolReference-03-01-00 ) - run_tpcnv_legacy_test( MuonEventTPCnv_17.0.0 ESD-17.0.0 - REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) - run_tpcnv_legacy_test( MuonEventTPCnv_20.1.7.2 ESD-20.1.7.2 - REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( MuonEventTPCnv_17.0.0 ESD-17.0.0 + REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) + run_tpcnv_test( MuonEventTPCnv_20.1.7.2 ESD-20.1.7.2 + REFERENCE_TAG ${MUONEVENTATHENAPOOL_REFERENCE_TAG} ) else() message( WARNING "Couldn't find AthenaPoolUtilitiesTest. No test(s) set up." ) -endif() +endif() # Helper variable for running the tests: set( _jobOPath "${CMAKE_CURRENT_SOURCE_DIR}/share" ) diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_17.0.0_test.py b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_17.0.0_test.py new file mode 100755 index 00000000000..590b74b34a3 --- /dev/null +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_17.0.0_test.py @@ -0,0 +1,42 @@ +#!/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-17.0.0.pool.root' + + keys = [ + #Muon::CscPrepDataContainer_tlp1 + 'CSC_Clusters', + + #Muon::CscStripPrepDataContainer_tlp1 + 'CSC_Measurements', + + #Muon::MuonPRD_Container_p2<Muon::RpcCoinData_p1> + 'RPC_triggerHits', + + #Muon::MuonPRD_Container_p2<Muon::MdtPrepData_p2> + 'MDT_DriftCircles', + + #Muon::RpcPrepDataContainer_tlp1 + 'RPC_Measurements', + + #Muon::TgcPrepDataContainer_tlp1 + 'TGC_MeasurementsNextBC', + 'TGC_MeasurementsPriorBC', + 'TGC_Measurements', + + #Muon::TgcCoinDataContainer_tlp2 + 'TrigT1CoinDataCollectionNextBC', + 'TrigT1CoinDataCollectionPriorBC', + 'TrigT1CoinDataCollection', + + #Muon::ChamberT0s_p1 + 'MboyMuonChamberT0s', + 'MooreMuonChamberT0s', + ] + + TPCnvTest(infile, keys, useGeoModelSvc=True, doMuon=True) diff --git a/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_20.1.7.2_test.py b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_20.1.7.2_test.py new file mode 100755 index 00000000000..de7eff30a50 --- /dev/null +++ b/MuonSpectrometer/MuonCnv/MuonEventAthenaPool/test/MuonEventTPCnv_20.1.7.2_test.py @@ -0,0 +1,44 @@ +#!/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 = [ + #Muon::CscPrepDataContainer_tlp1 + 'CSC_Clusters', + + #Muon::CscStripPrepDataContainer_tlp1 + 'CSC_Measurements', + + #Muon::CscSimDataCollection_p1 + 'CSC_SDO', + + #Muon::MuonPRD_Container_p2<Muon::RpcCoinData_p1> + 'RPC_triggerHits', + + #Muon::MuonPRD_Container_p2<Muon::TgcPrepData_p1> + 'TGC_MeasurementsAllBCs', + + #Muon::MuonPRD_Container_p2<Muon::RpcPrepData_p3> + 'RPC_Measurements', + + #Muon::MuonPRD_Container_p2<Muon::MdtPrepData_p2> + 'MDT_DriftCircles', + + #Muon::TgcCoinDataContainer_tlp3 + 'TrigT1CoinDataCollectionNextBC', + 'TrigT1CoinDataCollectionPriorBC', + 'TrigT1CoinDataCollection', + + #Muon::MuonSimDataCollection_p1 + 'TGC_SDO', + 'RPC_SDO', + 'MDT_SDO', + ] + + TPCnvTest(infile, keys, useGeoModelSvc=True, doMuon=True) -- GitLab