From 792f3caaabc9515a7e338b702b5e39e6ede5424d Mon Sep 17 00:00:00 2001
From: John Chapman <jchapman@cern.ch>
Date: Wed, 12 Aug 2020 15:35:46 +0200
Subject: [PATCH] Migrate Event/xAOD/xAODMuonAthenaPool TPCnv unit tests to
 ComponentAccumulator xAODMuonAthenaPool_20.1.7.2_test - passes
 xAODMuonAthenaPool_20.7.2.2_test - passes xAODMuonAthenaPool_20.7.9.9_test -
 passes xAODMuonAthenaPool_21.0.79_test - passes (reference file updated)
 xAODMuonAthenaPool_master-20190911_test - passes (reference file updated)

---
 Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt  | 11 +++----
 .../share/xAODMuonAthenaPool_21.0.79.ref      |  2 --
 .../xAODMuonAthenaPool_master-20190911.ref    |  2 --
 .../test/xAODMuonAthenaPool_20.1.7.2_test.py  | 27 +++++++++++++++++
 .../test/xAODMuonAthenaPool_20.7.2.2_test.py  | 28 +++++++++++++++++
 .../test/xAODMuonAthenaPool_20.7.9.9_test.py  | 30 +++++++++++++++++++
 .../test/xAODMuonAthenaPool_21.0.79_test.py   | 26 ++++++++++++++++
 ...xAODMuonAthenaPool_master-20190911_test.py | 29 ++++++++++++++++++
 8 files changed, 146 insertions(+), 9 deletions(-)
 create mode 100755 Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
 create mode 100755 Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
 create mode 100755 Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
 create mode 100755 Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
 create mode 100755 Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py

diff --git a/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt b/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
index 87ed5a797fe3..353c84b01d8f 100644
--- a/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
+++ b/Event/xAOD/xAODMuonAthenaPool/CMakeLists.txt
@@ -23,6 +23,7 @@ atlas_add_poolcnv_library( xAODMuonAthenaPoolPoolCnv
 
 # 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 )
@@ -30,19 +31,19 @@ find_package( AthenaPoolUtilitiesTest )
 if( ATHENAPOOLUTILITIESTEST_FOUND )
   set( XAODMUONATHENAPOOL_REFERENCE_TAG
        xAODMuonAthenaPoolReference-01-01-00 )
-  run_tpcnv_legacy_test( xAODMuonAthenaPool_master-20190911   AOD-master-20190911-full
+  run_tpcnv_test( xAODMuonAthenaPool_master-20190911   AOD-master-20190911-full
                    REQUIRED_LIBRARIES xAODMuonAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODMUONATHENAPOOL_REFERENCE_TAG} )
-  run_tpcnv_legacy_test( xAODMuonAthenaPool_20.1.7.2   AOD-20.1.7.2-full
+  run_tpcnv_test( xAODMuonAthenaPool_20.1.7.2   AOD-20.1.7.2-full
                    REQUIRED_LIBRARIES xAODMuonAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODMUONATHENAPOOL_REFERENCE_TAG} )
-  run_tpcnv_legacy_test( xAODMuonAthenaPool_20.7.2.2   AOD-20.7.2.2-full
+  run_tpcnv_test( xAODMuonAthenaPool_20.7.2.2   AOD-20.7.2.2-full
                    REQUIRED_LIBRARIES xAODMuonAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODMUONATHENAPOOL_REFERENCE_TAG} )
-  run_tpcnv_legacy_test( xAODMuonAthenaPool_20.7.9.9   AOD-20.7.9.9-full
+  run_tpcnv_test( xAODMuonAthenaPool_20.7.9.9   AOD-20.7.9.9-full
                    REQUIRED_LIBRARIES xAODMuonAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODMUONATHENAPOOL_REFERENCE_TAG} )
-  run_tpcnv_legacy_test( xAODMuonAthenaPool_21.0.79   AOD-21.0.79-full
+  run_tpcnv_test( xAODMuonAthenaPool_21.0.79   AOD-21.0.79-full
                    REQUIRED_LIBRARIES xAODMuonAthenaPoolPoolCnv
                    REFERENCE_TAG ${XAODMUONATHENAPOOL_REFERENCE_TAG} )
 else()
diff --git a/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_21.0.79.ref b/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_21.0.79.ref
index 49d37791d985..8680a7c89ea2 100644
--- a/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_21.0.79.ref
+++ b/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_21.0.79.ref
@@ -510,8 +510,6 @@ IOVDbSvc             INFO Disconnecting from COOLOFL_TRT/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] C634B46D-ECB2-A045-91CC-00A82369D887
 Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000070.gen.COND/cond12_data.000029.gen.COND._0001.pool.root
 RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000070.gen.COND/cond12_data.000029.gen.COND._0001.pool.root File version:53005
-PixelDetectorMa...WARNING Cannot set AlignableTransform for identifier  [2.1.0.0.0.-4.256.0] at level 2
-PixelDetectorMa...WARNING Subsequent WARNINGS will be printed at DEBUG level.
 PixelDetectorMa...   INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158
 Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root
diff --git a/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_master-20190911.ref b/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_master-20190911.ref
index 5eacb0d9c981..a8d8befc087d 100644
--- a/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_master-20190911.ref
+++ b/Event/xAOD/xAODMuonAthenaPool/share/xAODMuonAthenaPool_master-20190911.ref
@@ -510,8 +510,6 @@ IOVDbSvc             INFO Disconnecting from COOLOFL_TRT/OFLP200
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] C634B46D-ECB2-A045-91CC-00A82369D887
 Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000070.gen.COND/cond12_data.000029.gen.COND._0001.pool.root
 RootDatabase.open    INFO /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000070.gen.COND/cond12_data.000029.gen.COND._0001.pool.root File version:53005
-PixelDetectorMa...WARNING Cannot set AlignableTransform for identifier  [2.1.0.0.0.-4.256.0] at level 2
-PixelDetectorMa...WARNING Subsequent WARNINGS will be printed at DEBUG level.
 PixelDetectorMa...   INFO Processing IBLDist alignment container with key (/Indet/IBLDist) and alignment folder pointing to /Indet/Align
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] D67CA215-C5CB-DF11-954C-000423DC2158
 Domain[ROOT_All]     INFO                           /home/sss/atlas/DBRelease/current/poolcond/cond09_mc.000019.gen.COND/cond09_mc.000019.gen.COND._0010.pool.root
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
new file mode 100755
index 000000000000..0b989d4954b6
--- /dev/null
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.1.7.2_test.py
@@ -0,0 +1,27 @@
+#!/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-20.1.7.2/AOD-20.1.7.2-full.pool.root'
+    keys = [
+        #Muons...
+        'Muons',
+        'Staus',
+        'HLT_xAOD__MuonContainer_MuonEFInfo',
+        'HLT_xAOD__MuonContainer_MuTagIMO_EF',
+        'HLT_xAOD__MuonContainer_eMuonEFInfo',
+
+        #xAOD::MuonSegmentAuxContainer_v1
+        'MuonSegments',
+        'MuonTruthSegments',
+
+        #xAOD::SlowMuonAuxContainer_v1
+        'SlowMuons',
+             ]
+
+    TPCnvTest(infile, keys)
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
new file mode 100755
index 000000000000..cc7882cc2a83
--- /dev/null
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.2.2_test.py
@@ -0,0 +1,28 @@
+#!/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-20.7.2.2/AOD-20.7.2.2-full.pool.root'
+    keys = [
+        #xAOD::MuonAuxContainer_v2
+        'Muons',
+        'Staus',
+        'HLT_xAOD__MuonContainer_MuonEFInfo',
+        'HLT_xAOD__MuonContainer_MuTagIMO_EF',
+        'HLT_xAOD__MuonContainer_eMuonEFInfo',
+
+        #xAOD::MuonSegmentAuxContainer_v1
+        'MuonSegments',
+        'MuonTruthSegments',
+        'NCB_MuonSegments',
+
+        #xAOD::SlowMuonAuxContainer_v1
+        'SlowMuons',
+             ]
+
+    TPCnvTest(infile, keys)
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
new file mode 100755
index 000000000000..35210998e699
--- /dev/null
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_20.7.9.9_test.py
@@ -0,0 +1,30 @@
+#!/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-20.7.9.9/AOD-20.7.9.9-full.pool.root'
+    keys = [
+        #xAOD::MuonAuxContainer_v4
+        'Muons',
+        'Staus',
+        'HLT_xAOD__MuonContainer_MuonEFInfo',
+        'HLT_xAOD__MuonContainer_MuTagIMO_EF',
+        'HLT_xAOD__MuonContainer_MuonEFInfo_FullScan',
+        'HLT_xAOD__MuonContainer_MuonEFInfo_MSonlyTrackParticles_FullScan',
+        'HLT_xAOD__MuonContainer_eMuonEFInfo',
+
+        #xAOD::MuonSegmentAuxContainer_v1
+        'MuonSegments',
+        'MuonTruthSegments',
+        'NCB_MuonSegments',
+
+        #xAOD::SlowMuonAuxContainer_v1
+        'SlowMuons',
+             ]
+
+    TPCnvTest(infile, keys)
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
new file mode 100755
index 000000000000..742918ebc9be
--- /dev/null
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_21.0.79_test.py
@@ -0,0 +1,26 @@
+#!/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-21.0.79/AOD-21.0.79-full.pool.root'
+    keys = [
+        #xAOD::MuonAuxContainer_v4
+        'Muons',
+        'Staus',
+        'HLT_xAOD__MuonContainer_MuonEFInfo',
+
+        #xAOD::MuonSegmentAuxContainer_v1
+        'MuonSegments',
+        'MuonTruthSegments',
+        'NCB_MuonSegments',
+
+        #xAOD::SlowMuonAuxContainer_v1
+        'SlowMuons',
+             ]
+
+    TPCnvTest(infile, keys)
diff --git a/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py
new file mode 100755
index 000000000000..70a4d1ae5123
--- /dev/null
+++ b/Event/xAOD/xAODMuonAthenaPool/test/xAODMuonAthenaPool_master-20190911_test.py
@@ -0,0 +1,29 @@
+#!/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-master-20190911/AOD-master-20190911-full.pool.root'
+    keys = [
+        #xAOD::MuonAuxContainer_v5
+        'Muons',
+        'Staus',
+        'HLT_xAOD__MuonContainer_MuonEFInfo',
+        'HLT_xAOD__MuonContainer_MuonEFInfo_FullScan',
+        'HLT_xAOD__MuonContainer_MuonEFInfo_MSonlyTrackParticles_FullScan',
+
+        #xAOD::MuonSegmentAuxContainer_v1
+        'MuGirlMuonSegments',
+        'MuonSegments',
+        'MuonTruthSegments',
+        'NCB_MuonSegments',
+
+        #xAOD::SlowMuonAuxContainer_v1
+        'SlowMuons',
+             ]
+
+    TPCnvTest(infile, keys)
-- 
GitLab