From 33f21ee76ed94d43a69f0c8172497ff70c165bf4 Mon Sep 17 00:00:00 2001
From: Frank Berghaus <frank.berghaus@cern.ch>
Date: Fri, 2 Oct 2020 13:28:17 +0000
Subject: [PATCH] Enabled the unit test in xAODEventFormat.

This has just laid dormant ever since the CMT->CMake migration. :-(

At the same time introduced some tests for the implicit copy-constructor
and copy-operator of xAOD::EventFormat.
---
 .../share/AthenaPoolMultiTestEventNoSplit.ref |  15 +-
 .../share/AthenaPoolMultiTestEventSplit.ref   |  27 +-
 .../AthenaPoolMultiTestEventSplitDecision.ref |   9 +-
 .../share/AthenaPoolMultiTestPropagate.ref    |   7 +-
 .../share/SplittableData_jo.py                |   2 -
 .../AthenaKernel/AthenaKernel/IMetaDataSvc.h  |  14 +-
 .../share/AthenaOutputStream_test.ref         | 144 ++++++-----
 Control/AthenaServices/src/MetaDataSvc.cxx    |  65 ++++-
 Control/AthenaServices/src/MetaDataSvc.h      |   8 +
 .../DataModelRunTests/share/xAODTestRead.ref  | 103 +++-----
 .../share/xAODTestRead2_jo.py                 |  18 +-
 .../share/xAODTestReadFilter_jo.py            |  22 +-
 .../share/xAODTestReadThinned.ref             |  52 ++--
 .../share/xAODTestRead_jo.py                  |  25 +-
 .../share/xAODTestTypelessRead_jo.py          |  24 +-
 .../share/xAODTestWriteThinned_jo.py          |  29 +--
 .../share/xAODTestWrite_jo.py                 |  42 +--
 Control/xAODRootAccess/Root/TEvent.cxx        |   8 +-
 Control/xAODRootAccess/Root/Utils.cxx         |  17 ++
 .../xAODRootAccess/tools/Utils.h              |   4 +
 .../python/CreateOutputStreams.py             |  17 +-
 .../python/MultipleStreamManager.py           |   2 -
 .../python/OutputStreamConfig.py              |  24 +-
 .../src/IOVDbMetaDataTool.cxx                 |  39 +--
 Event/xAOD/xAODEventFormat/CMakeLists.txt     |  34 +--
 .../share/eventformat_test.ref                |   3 +
 .../ut_xaodeventformat_eventformat_test.cxx   |  67 +++--
 .../ATLAS_CHECK_THREAD_SAFETY                 |   1 +
 Event/xAOD/xAODEventFormatCnv/CMakeLists.txt  | 104 ++++++--
 .../share/EventFormatReadTestJobOptions.py    |  43 ++++
 .../share/EventFormatReadWriteJobOptions.py   |  77 ++++++
 .../share/EventFormatWriteTestJobOptions.py   |  63 +++++
 .../src/EventFormatMetaDataTool.cxx           | 194 +++++++-------
 .../src/EventFormatMetaDataTool.h             | 150 +++++------
 .../src/EventFormatStreamHelperTool.cxx       | 124 +++++++++
 .../src/EventFormatStreamHelperTool.h         |  95 +++++++
 .../xAODEventFormatCnv/src/EventFormatSvc.cxx | 242 ------------------
 .../xAODEventFormatCnv/src/EventFormatSvc.h   | 101 --------
 .../components/xAODEventFormatCnv_entries.cxx |  11 +-
 .../src/test/AAuxContainer_v1.cxx             |  44 ++++
 .../src/test/ACreatorAlg.cxx                  |  59 +++++
 .../xAODEventFormatCnv/src/test/ACreatorAlg.h |  54 ++++
 .../xAOD/xAODEventFormatCnv/src/test/A_v1.cxx |  25 ++
 .../src/test/EventFormatPrinterAlg.cxx        |  38 +++
 .../src/test/EventFormatPrinterAlg.h          |  56 ++++
 .../src/test/cnv/xAODAAuxContainerCnv.cxx     |   6 +
 .../src/test/cnv/xAODAAuxContainerCnv.h       |  19 ++
 .../src/test/cnv/xAODAAuxContainerCnv_v1.cxx  |  86 +++++++
 .../src/test/cnv/xAODAAuxContainerCnv_v1.h    |  36 +++
 .../test/cnv/xAODEventFormatCnvTestCnv.cxx    |  21 ++
 .../src/test/dict/ContainerProxies.cxx        |   6 +
 .../test/TestEventFormatContent.py            |  71 +++++
 .../xAODEventFormatCnv/IEventFormatSvc.h      |  53 ----
 .../xAODEventFormatCnv/test/A.h               |  23 ++
 .../xAODEventFormatCnv/test/AAuxContainer.h   |  23 ++
 .../xAODEventFormatCnv/test/AVec.h            |  21 ++
 .../xAODEventFormatCnv/test/selection.xml     |   8 +
 .../test/versions/AAuxContainer_v1.h          |  41 +++
 .../test/versions/AVec_v1.h                   |  18 ++
 .../xAODEventFormatCnv/test/versions/A_v1.h   |  43 ++++
 .../test/xAODEventFormatCnvTestDict.h         |  23 ++
 .../share/xAODForwardCnv_jobOptions.py        |   4 -
 .../share/xAODTrigCaloCnv_jobOptions.py       |   4 -
 .../share/xAODTrigMinBiasCnv_jobOptions.py    |   4 -
 .../share/xAODTrigMissingETCnv_jobOptions.py  |   4 -
 .../share/xAODTriggerCnv_jobOptions.py        |   4 -
 Projects/AthSimulation/package_filters.txt    |   2 +
 .../share/AnalysisCommon_topOptions.py        |  18 --
 .../share/RecExCommon_topOptions.py           |  15 --
 .../share/xAODMenuWriterTest_jobOptions.py    |   4 -
 70 files changed, 1839 insertions(+), 1020 deletions(-)
 create mode 100644 Event/xAOD/xAODEventFormat/share/eventformat_test.ref
 create mode 100644 Event/xAOD/xAODEventFormatCnv/ATLAS_CHECK_THREAD_SAFETY
 create mode 100644 Event/xAOD/xAODEventFormatCnv/share/EventFormatReadTestJobOptions.py
 create mode 100644 Event/xAOD/xAODEventFormatCnv/share/EventFormatReadWriteJobOptions.py
 create mode 100644 Event/xAOD/xAODEventFormatCnv/share/EventFormatWriteTestJobOptions.py
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.h
 delete mode 100644 Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.cxx
 delete mode 100644 Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/AAuxContainer_v1.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/A_v1.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODEventFormatCnvTestCnv.cxx
 create mode 100644 Event/xAOD/xAODEventFormatCnv/src/test/dict/ContainerProxies.cxx
 create mode 100755 Event/xAOD/xAODEventFormatCnv/test/TestEventFormatContent.py
 delete mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/IEventFormatSvc.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/A.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AAuxContainer.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AVec.h
 create mode 100755 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/selection.xml
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AAuxContainer_v1.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AVec_v1.h
 create mode 100644 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/A_v1.h
 create mode 100755 Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h

diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref
index 731751c56a69..dd7afcab0b71 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventNoSplit.ref
@@ -1,5 +1,6 @@
 Py:Athena            INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py"
 PoolSvc              INFO Setting up APR FileCatalog and Streams
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 Splitter1           DEBUG Property update for OutputLevel : new value = 2
 Splitter1            INFO in initialize()
 Splitter1           DEBUG input handles: 3
@@ -13,28 +14,27 @@ Splitter3           DEBUG output handles: 0
 Splitter3           DEBUG Data Deps for Splitter3
 Triggered            INFO in initialize()
 DecisionSvc          INFO Inserting stream: Stream2 with no Algs
-OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 Stream2.Stream2...   INFO Initializing Stream2.Stream2Tool - package version AthenaServices-00-00-00
 Stream2.Stream2...   INFO Initializing Stream2.Stream2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo'])
+Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream2_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
 Stream2              INFO Data output: AthenaPoolMultiTest_NoSplit2.root
 Stream2              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: AthenaPoolMultiTest_NoSplit1.root
 Stream1              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Stream3 with no Algs
 Stream3.Stream3...   INFO Initializing Stream3.Stream3Tool - package version AthenaServices-00-00-00
 Stream3.Stream3...   INFO Initializing Stream3.Stream3_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo'])
+Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream3_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream3'])
 Stream3              INFO Data output: AthenaPoolMultiTest_NoSplit3.root
 Stream3              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: StreamAll with no Algs
 StreamAll.Strea...   INFO Initializing StreamAll.StreamAllTool - package version AthenaServices-00-00-00
 StreamAll.Strea...   INFO Initializing StreamAll.StreamAll_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-StreamAll            INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAll_MakeEventStreamInfo'])
+StreamAll            INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAll_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/StreamAll_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_StreamAll'])
 StreamAll            INFO Data output: AthenaPoolMultiTest_StreamAll.root
 StreamAll            INFO I/O reinitialization...
 Splitter1           DEBUG in execute()
@@ -50,7 +50,7 @@ Splitter3            INFO L1 failed
 Triggered            INFO EventInfo event: 0 run: 0
 Triggered            INFO L1 passed
 Domain[ROOT_All]     INFO                           AthenaPoolMultiTest_StreamAll.root
-RootDatabase.open    INFO AthenaPoolMultiTest_StreamAll.root File version:61800
+RootDatabase.open    INFO AthenaPoolMultiTest_StreamAll.root File version:62200
 Splitter1           DEBUG in execute()
 Splitter1            INFO EventInfo event: 1 run: 0
 Splitter1           DEBUG Trigmask = 2
@@ -285,5 +285,6 @@ Splitter1            INFO in finalize()
 Splitter2            INFO in finalize()
 Splitter3            INFO in finalize()
 Triggered            INFO in finalize()
-ItemListSvc         DEBUG STREAM StreamAll has (7) items
+ItemListSvc         DEBUG STREAM StreamAll has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_StreamAll
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStreamAll
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref
index 8444568729a3..086dfc875ed3 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplit.ref
@@ -1,5 +1,6 @@
 Py:Athena            INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py"
 PoolSvc              INFO Setting up APR FileCatalog and Streams
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 Splitter1           DEBUG Property update for OutputLevel : new value = 2
 Splitter1            INFO in initialize()
 Splitter1           DEBUG input handles: 3
@@ -13,34 +14,33 @@ Splitter3           DEBUG output handles: 0
 Splitter3           DEBUG Data Deps for Splitter3
 Triggered            INFO in initialize()
 DecisionSvc          INFO Inserting stream: Stream2 with no Algs
-OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 Stream2.Stream2...   INFO Initializing Stream2.Stream2Tool - package version AthenaServices-00-00-00
 Stream2.Stream2...   INFO Initializing Stream2.Stream2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo'])
+Stream2              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream2_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream2_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream2'])
 Stream2              INFO Data output: AthenaPoolMultiTest_Split2.root
 Stream2              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: AthenaPoolMultiTest_Split1.root
 Stream1              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Stream3 with no Algs
 Stream3.Stream3...   INFO Initializing Stream3.Stream3Tool - package version AthenaServices-00-00-00
 Stream3.Stream3...   INFO Initializing Stream3.Stream3_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo'])
+Stream3              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream3_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream3_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream3'])
 Stream3              INFO Data output: AthenaPoolMultiTest_Split3.root
 Stream3              INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Others with no Algs
 Others.OthersTool    INFO Initializing Others.OthersTool - package version AthenaServices-00-00-00
 Others.Others_M...   INFO Initializing Others.Others_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Others               INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Others_MakeEventStreamInfo'])
+Others               INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Others_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Others_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Others'])
 Others               INFO Data output: AthenaPoolMultiTest_Missed.root
 Others               INFO I/O reinitialization...
 DecisionSvc          INFO Inserting stream: Bad with no Algs
 Bad.BadTool          INFO Initializing Bad.BadTool - package version AthenaServices-00-00-00
 Bad.Bad_MakeEve...   INFO Initializing Bad.Bad_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Bad                  INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Bad_MakeEventStreamInfo'])
+Bad                  INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Bad_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Bad_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Bad'])
 Bad                  INFO Data output: AthenaPoolMultiTest_Missed.root
 Bad                  INFO I/O reinitialization...
 Splitter1           DEBUG in execute()
@@ -293,25 +293,30 @@ Splitter1            INFO in finalize()
 Splitter2            INFO in finalize()
 Splitter3            INFO in finalize()
 Triggered            INFO in finalize()
-ItemListSvc         DEBUG STREAM Bad has (1) items
+ItemListSvc         DEBUG STREAM Bad has (2) items
 ItemListSvc         DEBUG    - EventStreamInfo_Bad
-ItemListSvc         DEBUG STREAM Others has (6) items
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatBad
+ItemListSvc         DEBUG STREAM Others has (7) items
 ItemListSvc         DEBUG    - EventStreamInfo_Others
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatOthers
 ItemListSvc         DEBUG  --> Overlap with Stream1 (5) items
 ItemListSvc         DEBUG  --> Overlap with Stream2 (5) items
 ItemListSvc         DEBUG  --> Overlap with Stream3 (5) items
-ItemListSvc         DEBUG STREAM Stream1 has (7) items
+ItemListSvc         DEBUG STREAM Stream1 has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_Stream1
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStream1
 ItemListSvc         DEBUG  --> Overlap with Others (5) items
 ItemListSvc         DEBUG  --> Overlap with Stream2 (6) items
 ItemListSvc         DEBUG  --> Overlap with Stream3 (6) items
-ItemListSvc         DEBUG STREAM Stream2 has (7) items
+ItemListSvc         DEBUG STREAM Stream2 has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_Stream2
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStream2
 ItemListSvc         DEBUG  --> Overlap with Others (5) items
 ItemListSvc         DEBUG  --> Overlap with Stream1 (6) items
 ItemListSvc         DEBUG  --> Overlap with Stream3 (6) items
-ItemListSvc         DEBUG STREAM Stream3 has (7) items
+ItemListSvc         DEBUG STREAM Stream3 has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_Stream3
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStream3
 ItemListSvc         DEBUG  --> Overlap with Others (5) items
 ItemListSvc         DEBUG  --> Overlap with Stream1 (6) items
 ItemListSvc         DEBUG  --> Overlap with Stream2 (6) items
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref
index 74c966d9e96f..85271ed7e576 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestEventSplitDecision.ref
@@ -1,5 +1,6 @@
 Py:Athena            INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py"
 PoolSvc              INFO Setting up APR FileCatalog and Streams
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 Splitter1           DEBUG Property update for OutputLevel : new value = 2
 Splitter1            INFO in initialize()
 Splitter1           DEBUG input handles: 3
@@ -15,10 +16,9 @@ DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 DecisionSvc          INFO Inserting stream: Stream2 with no Algs
 DecisionSvc          INFO Inserting stream: Stream3 with no Algs
 DecisionSvc          INFO Inserting stream: StreamAll2 with no Algs
-OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 StreamAll2.Stre...   INFO Initializing StreamAll2.StreamAll2Tool - package version AthenaServices-00-00-00
 StreamAll2.Stre...   INFO Initializing StreamAll2.StreamAll2_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-StreamAll2           INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAll2_MakeEventStreamInfo'])
+StreamAll2           INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAll2_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/StreamAll2_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_StreamAll2'])
 StreamAll2           INFO Data output: AthenaPoolMultiTest_StreamAll2.root
 StreamAll2           INFO I/O reinitialization...
 Splitter1           DEBUG in execute()
@@ -32,7 +32,7 @@ Splitter3            INFO EventInfo event: 0 run: 0
 Splitter3           DEBUG Trigmask = 1
 Splitter3            INFO L1 failed
 Domain[ROOT_All]     INFO                           AthenaPoolMultiTest_StreamAll2.root
-RootDatabase.open    INFO AthenaPoolMultiTest_StreamAll2.root File version:61800
+RootDatabase.open    INFO AthenaPoolMultiTest_StreamAll2.root File version:62200
 Splitter1           DEBUG in execute()
 Splitter1            INFO EventInfo event: 1 run: 0
 Splitter1           DEBUG Trigmask = 2
@@ -228,5 +228,6 @@ StreamAll2           INFO Metadata records written: 21
 Splitter1            INFO in finalize()
 Splitter2            INFO in finalize()
 Splitter3            INFO in finalize()
-ItemListSvc         DEBUG STREAM StreamAll2 has (7) items
+ItemListSvc         DEBUG STREAM StreamAll2 has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_StreamAll2
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStreamAll2
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
index 1fe945cedc3f..e27bdef3bd01 100644
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/AthenaPoolMultiTestPropagate.ref
@@ -1,13 +1,14 @@
 Py:Athena            INFO including file "AthenaPoolMultiTest/ExampleStreamConfig.py"
 PoolSvc              INFO Setting up APR FileCatalog and Streams
-DecisionSvc          INFO Inserting stream: StreamAllP with no Algs
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
+DecisionSvc          INFO Inserting stream: StreamAllP with no Algs
 StreamAllP.Stre...   INFO Initializing StreamAllP.StreamAllPTool - package version AthenaServices-00-00-00
 StreamAllP.Stre...   INFO Initializing StreamAllP.StreamAllP_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-StreamAllP           INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAllP_MakeEventStreamInfo'])
+StreamAllP           INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/StreamAllP_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/StreamAllP_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_StreamAllP'])
 StreamAllP           INFO Data output: AthenaPoolMultiTest_Propagate.root
 StreamAllP           INFO I/O reinitialization...
 StorageSvc           INFO EventStreamInfo_p3 [11DF1B8C-0DEE-4687-80D7-E74B520ACBB4]
 StreamAllP           INFO Metadata records written: 21
-ItemListSvc         DEBUG STREAM StreamAllP has (7) items
+ItemListSvc         DEBUG STREAM StreamAllP has (8) items
 ItemListSvc         DEBUG    - EventStreamInfo_StreamAllP
+ItemListSvc         DEBUG    - xAOD::EventFormat_EventFormatStreamAllP
diff --git a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/SplittableData_jo.py b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/SplittableData_jo.py
index bc1881cdfd38..f2c5c32905b9 100755
--- a/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/SplittableData_jo.py
+++ b/AtlasTest/DatabaseTest/AthenaPoolMultiTest/share/SplittableData_jo.py
@@ -72,8 +72,6 @@ topSequence        += AddTrigMap
 #topSequence        += TagEventTagWriter
 topSequence        += DummyLumirangeTool
 
-theApp.CreateSvc += ['xAODMaker::EventFormatSvc']
-
 from AthenaPoolExampleAlgorithms.AthenaPoolExampleAlgorithmsConf import AthPoolEx__WriteData
 topSequence += AthPoolEx__WriteData("WriteData")
 
diff --git a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
index bf81f6019be4..1c84d4cd5cb9 100644
--- a/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
+++ b/Control/AthenaKernel/AthenaKernel/IMetaDataSvc.h
@@ -12,9 +12,11 @@
 
 #include "GaudiKernel/INamedInterface.h"
 #include "AthenaKernel/MetaCont.h"
+#include "StoreGate/StoreGateSvc.h"
 
 #include <string>
 #include <mutex>
+#include <typeinfo>
 
 /** @class IMetaDataSvc
  *  @brief This class provides the interface for MetaDataSvc
@@ -56,6 +58,12 @@ public: // Non-static members
    /// Gaudi boilerplate
    static const InterfaceID& interfaceID();
 
+   /// Hook for implementation to react to recording an object
+   virtual void recordHook(const std::type_info&) {}
+
+   /// Hook for implementation to react to removing an object
+   virtual void removeHook(const std::type_info&) {}
+
 private: // Data
    std::mutex    m_mutex;
 };
@@ -99,7 +107,9 @@ StatusCode IMetaDataSvc::record(T* pObject, const TKEY& key)
    if( !container ) {
       auto cont_uptr = std::make_unique< MetaCont<T> >();
       if( cont_uptr->insert( currentRangeID() , pObject) ) {
-         return outputDataStore()->record( std::move(cont_uptr), key );
+         StatusCode sc = outputDataStore()->record( std::move(cont_uptr), key );
+         if (sc.isSuccess()) recordHook(typeid(T));
+         return sc;
       }
       return StatusCode::FAILURE;
    }
@@ -112,6 +122,7 @@ template <typename T, typename TKEY>
 StatusCode IMetaDataSvc::record(std::unique_ptr<T> pUnique, const TKEY& key)
 {
    if( this->record( pUnique.get(), key ).isSuccess() ) {
+      recordHook(typeid(T));
       pUnique.release();
       return StatusCode::SUCCESS;
    }
@@ -126,6 +137,7 @@ StatusCode IMetaDataSvc::remove(const TKEY& key, bool ignoreIfAbsent)
    std::lock_guard lock(m_mutex);
    // change erase to setting nullptr?
    MetaCont<T>* container = outputDataStore()->tryRetrieve< MetaCont<T> >(key);
+   removeHook(typeid(T));
    if( container and container->erase( currentRangeID() ) )  return StatusCode::SUCCESS;
    return ignoreIfAbsent? StatusCode::SUCCESS : StatusCode::FAILURE;
 }
diff --git a/Control/AthenaServices/share/AthenaOutputStream_test.ref b/Control/AthenaServices/share/AthenaOutputStream_test.ref
index 77fc1b609ceb..e244ec7ae167 100644
--- a/Control/AthenaServices/share/AthenaOutputStream_test.ref
+++ b/Control/AthenaServices/share/AthenaOutputStream_test.ref
@@ -1,8 +1,8 @@
 *** AthenaOutputStream_test starts ***
 
 
-Initializing Gaudi ApplicationMgr using job opts /atlas/scratch0/amete/athena-workspace/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
-JobOptionsSvc        INFO # =======> /atlas/scratch0/amete/athena-workspace/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
+Initializing Gaudi ApplicationMgr using job opts /home/atlas/athena/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
+JobOptionsSvc        INFO # =======> /home/atlas/athena/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
 JobOptionsSvc        INFO # (5,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (6,1): StoreGateSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (8,1): AthenaOutputStream.OutputLevel = 1
@@ -12,13 +12,13 @@ JobOptionsSvc        INFO # (21,1): AthenaOutputStream.CompressionListHigh = ["B
 JobOptionsSvc        INFO # (22,1): AthenaOutputStream.CompressionBitsLow = 16
 JobOptionsSvc        INFO # (23,1): AthenaOutputStream.CompressionListLow = ["BazAuxContainer#compAux.zzz"]
 JobOptionsSvc        INFO # (25,1): AthenaOutputStream.AcceptAlgs = ["AthenaOutputStream", "aSFQS"]
-JobOptionsSvc        INFO Job options successfully read in from /atlas/scratch0/amete/athena-workspace/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
+JobOptionsSvc        INFO Job options successfully read in from /home/atlas/athena/build/x86_64-centos7-gcc8-opt/jobOptions/AthenaServices/AthenaOutputStream_test.txt
 MessageSvc          DEBUG Service base class initialized successfully
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v33r2)
-                                          running on atpc002 on Fri Aug  7 15:13:36 2020
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on 93d7764165d7 on Fri Sep 11 10:18:05 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service AppMgrRunable
@@ -39,20 +39,20 @@ ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 ClassIDSvc          DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [ModuleLoaded] listener 'ClassIDSvc' with priority 100
-ClassIDSvc           INFO  getRegistryEntries: read 1581 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 1596 CLIDRegistry entries for module ALL
 ClassIDSvc          FATAL uncheckedSetTypePackageForID: StoreGate-00-00-00 can not set type name <B1> for CLID 8111: Known name for this ID <Baz> It was set by AthenaServices-00-00-00
 ClassIDSvc          FATAL uncheckedSetTypePackageForID: StoreGate-00-00-00 can not set type name <D1> for CLID 8112: Known name for this ID <BazAuxContainer> It was set by AthenaServices-00-00-00
-ClassIDSvc          DEBUG processCLIDDB: read 1747 entries from CLIDDB file: /atlas/scratch0/amete/athena-workspace/build/x86_64-centos7-gcc8-opt/share/clid.db
+ClassIDSvc          DEBUG processCLIDDB: read 1757 entries from CLIDDB file: /home/atlas/athena/build/x86_64-centos7-gcc8-opt/share/clid.db
 ClassIDSvc          FATAL uncheckedSetTypePackageForID: StoreGate-00-00-00 can not set type name <B1> for CLID 8111: Known name for this ID <Baz> It was set by AthenaServices-00-00-00
 ClassIDSvc          FATAL uncheckedSetTypePackageForID: StoreGate-00-00-00 can not set type name <D1> for CLID 8112: Known name for this ID <BazAuxContainer> It was set by AthenaServices-00-00-00
-ClassIDSvc          DEBUG processCLIDDB: read 1746 entries from CLIDDB file: /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-06T2137/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/clid.db
+ClassIDSvc          DEBUG processCLIDDB: read 1757 entries from CLIDDB file: /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/clid.db
 StoreGateSvc        DEBUG Service base class initialized successfully
 StoreGateSvc        DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl
 StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 ProxyProviderSvc    DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [EndEvent] listener 'StoreGateSvc' with priority 100
 IncidentSvc         DEBUG Adding [BeginEvent] listener 'StoreGateSvc' with priority 100
-ClassIDSvc           INFO  getRegistryEntries: read 2389 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2375 CLIDRegistry entries for module ALL
 AthenaOutputStream  DEBUG Property update for OutputLevel : new value = 1
 ToolSvc             DEBUG Service base class initialized successfully
 AthenaOutputStr...  DEBUG Property update for OutputLevel : new value = 1
@@ -92,21 +92,14 @@ PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.x
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
 DBReplicaSvc        DEBUG Service base class initialized successfully
-DBReplicaSvc        DEBUG HOSTNAME atpc002 has no domain - try hostname --fqdn
-DBReplicaSvc        DEBUG HOSTNAME from fqdn: atpc002.dyndns.cern.ch
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy-atlas.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-08-06T2137/Athena/22.0.17/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
-DBReplicaSvc        DEBUG Candidate server ATLF (priority -2700)
-DBReplicaSvc        DEBUG Candidate server ATLAS_COOLPROD (priority -695)
-DBReplicaSvc        DEBUG Candidate server atlas_dd (priority -690)
-DBReplicaSvc        DEBUG Candidate server ATLAS_CONFIG (priority -685)
-DBReplicaSvc        DEBUG Candidate server INT8R (priority -680)
-DBReplicaSvc        DEBUG Candidate server INTR (priority -675)
-DBReplicaSvc        DEBUG Candidate server ATONR_COOL (priority -670)
-DBReplicaSvc        DEBUG Candidate server ATONR_CONF (priority -665)
-DBReplicaSvc        DEBUG Candidate server DEVDB11 (priority -660)
-DBReplicaSvc        DEBUG Candidate server ATLF (priority -2200)
-DBReplicaSvc         INFO Total of 10 servers found for host atpc002.dyndns.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc        DEBUG HOSTNAME 93d7764165d7 has no domain - try hostname --fqdn
+DBReplicaSvc        DEBUG HOSTNAME from fqdn: 93d7764165d7
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-10T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc        DEBUG Candidate server ATLF (priority -2000)
+DBReplicaSvc        DEBUG Candidate server atlas_dd (priority 5)
+DBReplicaSvc         INFO Total of 2 servers found for host 93d7764165d7 [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 2
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -139,43 +132,43 @@ AthenaOutputStream  DEBUG Data Deps for AthenaOutputStream
   + INPUT IGNORED  ( 'AthenaAttributeList' , '' ) 
   + OUTPUT  ( 'SG::CompressionInfo' , 'StoreGateSvc+CompressionInfo_AthenaOutputStream' ) 
   + OUTPUT  ( 'SG::SelectionVetoes' , 'StoreGateSvc+SelectionVetoes_AthenaOutputStream' ) 
-StoreGateSvc        DEBUG Recorded object @0x667f4c0 with key uno of type Foo(CLID 8101)
- in DataObject @0x667f6b0
+StoreGateSvc        DEBUG Recorded object @0x5647790 with key uno of type Foo(CLID 8101)
+ in DataObject @0x5647980
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x667fc50 with key due of type Foo(CLID 8101)
- in DataObject @0x667fe00
+StoreGateSvc        DEBUG Recorded object @0x5647f50 with key due of type Foo(CLID 8101)
+ in DataObject @0x5648190
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x667fbd0 with key uno of type Bar(CLID 8107)
- in DataObject @0x66800d0
+StoreGateSvc        DEBUG Recorded object @0x5647f30 with key uno of type Bar(CLID 8107)
+ in DataObject @0x5648460
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x667fbb0 with key due of type Bar(CLID 8107)
- in DataObject @0x6680400
+StoreGateSvc        DEBUG Recorded object @0x5647f10 with key due of type Bar(CLID 8107)
+ in DataObject @0x5648760
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x6680790 with key quattro of type Bar(CLID 8107)
- in DataObject @0x6680700
+StoreGateSvc        DEBUG Recorded object @0x5648ac0 with key quattro of type Bar(CLID 8107)
+ in DataObject @0x5648a30
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x6680b80 with key cinque of type Bar(CLID 8107)
- in DataObject @0x6680ad0
+StoreGateSvc        DEBUG Recorded object @0x5648eb0 with key cinque of type Bar(CLID 8107)
+ in DataObject @0x5648e00
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x6681120 with key sei of type Baz(CLID 8111)
- in DataObject @0x6687a40
+StoreGateSvc        DEBUG Recorded object @0x56493f0 with key sei of type Baz(CLID 8111)
+ in DataObject @0x5647ce0
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x6681150 with key seiAux. of type BazAuxContainer(CLID 8112)
- in DataObject @0x667f960
+StoreGateSvc        DEBUG Recorded object @0x5649420 with key seiAux. of type BazAuxContainer(CLID 8112)
+ in DataObject @0x564ff30
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x66881a0 with key comp of type Baz(CLID 8111)
- in DataObject @0x2767290
+StoreGateSvc        DEBUG Recorded object @0x5650810 with key comp of type Baz(CLID 8111)
+ in DataObject @0x5657240
  object modifiable when retrieved
-StoreGateSvc        DEBUG Recorded object @0x6688710 with key compAux. of type BazAuxContainer(CLID 8112)
- in DataObject @0x6689530
+StoreGateSvc        DEBUG Recorded object @0x5650840 with key compAux. of type BazAuxContainer(CLID 8112)
+ in DataObject @0x56576d0
  object modifiable when retrieved
-ClassIDSvc           INFO  getRegistryEntries: read 714 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 727 CLIDRegistry entries for module ALL
 AthenaOutputStr...WARNING add: can not find clid 13 in clid db
 AthenaOutputStream  DEBUG addItemObjects(13,"*") called
 AthenaOutputStream  DEBUG            Key:*
 AthenaOutputStr...  DEBUG Property update for OutputLevel : new value = 1
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 MetaDataSvc         DEBUG Service base class initialized successfully
 InputMetaDataStore  DEBUG Service base class initialized successfully
@@ -197,19 +190,22 @@ IncidentSvc         DEBUG Adding [BeginInputFile] listener 'MetaDataSvc' with pr
 IncidentSvc         DEBUG Adding [EndInputFile] listener 'MetaDataSvc' with priority 10
 IoComponentMgr      DEBUG --> io_register(MetaDataSvc)
 IoComponentMgr      DEBUG     registering IoComponent "MetaDataSvc"
+MetaDataSvc         DEBUG Not translating metadata item ID #13
 AthenaOutputStream  DEBUG  Failed to receive proxy iterators from StoreGate for 13,"*". Skipping
 AthenaOutputStream  DEBUG addItemObjects(8101,"*") called
 AthenaOutputStream  DEBUG            Key:*
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8101
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], *, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [, ], *, *)
 AthenaOutputStream  DEBUG  Added object 8101,"due"
 AthenaOutputStream  DEBUG  Added object 8101,"uno"
 AthenaOutputStream  DEBUG addItemObjects(8107,"due") called
 AthenaOutputStream  DEBUG            Key:due
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8107
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], due, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [due], due, *)
 AthenaOutputStreamVERBOSE Calling matchKey( [due], cinque)
@@ -224,8 +220,9 @@ AthenaOutputStreamVERBOSE Couldn't match every sub-string... return: 0
 AthenaOutputStreamVERBOSE Done calling matchKey( [due], uno) with result: 0
 AthenaOutputStream  DEBUG addItemObjects(8107,"tre") called
 AthenaOutputStream  DEBUG            Key:tre
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8107
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], tre, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [tre], tre, *)
 AthenaOutputStreamVERBOSE Calling matchKey( [tre], cinque)
@@ -243,8 +240,9 @@ AthenaOutputStreamVERBOSE Done calling matchKey( [tre], uno) with result: 0
 AthenaOutputStream  DEBUG  No object matching 8107,"tre" found
 AthenaOutputStream  DEBUG addItemObjects(8107,"uno") called
 AthenaOutputStream  DEBUG            Key:uno
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8107
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], uno, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [uno], uno, *)
 AthenaOutputStreamVERBOSE Calling matchKey( [uno], cinque)
@@ -259,8 +257,9 @@ AthenaOutputStreamVERBOSE Done calling matchKey( [uno], quattro) with result: 0
 AthenaOutputStream  DEBUG  Added object 8107,"uno"
 AthenaOutputStream  DEBUG addItemObjects(8108,"cinque") called
 AthenaOutputStream  DEBUG            Key:cinque
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8108
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], cinque, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [cinque], cinque, *)
 AthenaOutputStream  DEBUG  Added object 8108,"cinque"
@@ -269,8 +268,9 @@ AthenaOutputStreamVERBOSE Couldn't match every sub-string... return: 0
 AthenaOutputStreamVERBOSE Done calling matchKey( [cinque], quattro) with result: 0
 AthenaOutputStream  DEBUG addItemObjects(8108,"quattro") called
 AthenaOutputStream  DEBUG            Key:quattro
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8108
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], quattro, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [quattro], quattro, *)
 AthenaOutputStreamVERBOSE Calling matchKey( [quattro], cinque)
@@ -279,8 +279,9 @@ AthenaOutputStreamVERBOSE Done calling matchKey( [quattro], cinque) with result:
 AthenaOutputStream  DEBUG  Added object 8108,"quattro"
 AthenaOutputStream  DEBUG addItemObjects(8111,"comp") called
 AthenaOutputStream  DEBUG            Key:comp
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8111
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], comp, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [comp], comp, *)
 AthenaOutputStream  DEBUG  Added object 8111,"comp"
@@ -289,8 +290,9 @@ AthenaOutputStreamVERBOSE Couldn't match every sub-string... return: 0
 AthenaOutputStreamVERBOSE Done calling matchKey( [comp], sei) with result: 0
 AthenaOutputStream  DEBUG addItemObjects(8111,"sei") called
 AthenaOutputStream  DEBUG            Key:sei
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8111
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], sei, *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [sei], sei, *)
 AthenaOutputStreamVERBOSE Calling matchKey( [sei], comp)
@@ -300,32 +302,32 @@ AthenaOutputStream  DEBUG  Added object 8111,"sei"
 AthenaOutputStream  DEBUG addItemObjects(8112,"compAux.") called
 AthenaOutputStream  DEBUG            Key:compAux.
 AthenaOutputStream  DEBUG       Aux Attr:foo.bar.zzz
-AthenaOutputStream  DEBUG      Comp Attr High: 2 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 2 with 10 mantissa bits.
 AthenaOutputStream  DEBUG        >> bar
 AthenaOutputStream  DEBUG        >> foo
-AthenaOutputStream  DEBUG      Comp Attr Low: 1 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 1 with 16 mantissa bits.
 AthenaOutputStream  DEBUG        >> zzz
+MetaDataSvc         DEBUG Not translating metadata item ID #8112
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], compAux., *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [compAux.], compAux., *)
 AthenaOutputStream  DEBUG  Added object 8112,"compAux."
-AthenaOutputStream  DEBUG Lossy float compression level 10 contains 1 elements for container comp
-AthenaOutputStream  DEBUG Lossy float compression level 16 contains 1 elements for container comp
+AthenaOutputStream  DEBUG Container comp has 1 variables that'll be lossy float compressed with 10 mantissa bits
+AthenaOutputStream  DEBUG Container comp has 1 variables that'll be lossy float compressed with 16 mantissa bits
 AthenaOutputStreamVERBOSE Calling matchKey( [compAux.], seiAux.)
 AthenaOutputStreamVERBOSE Couldn't match every sub-string... return: 0
 AthenaOutputStreamVERBOSE Done calling matchKey( [compAux.], seiAux.) with result: 0
 AthenaOutputStream  DEBUG addItemObjects(8112,"seiAux.") called
 AthenaOutputStream  DEBUG            Key:seiAux.
 AthenaOutputStream  DEBUG       Aux Attr:aaa.ccc
-AthenaOutputStream  DEBUG      Comp Attr High: 0 with 10 mantissa bits.
-AthenaOutputStream  DEBUG      Comp Attr Low: 0 with 16 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 10 mantissa bits.
+AthenaOutputStream  DEBUG      Comp Attr 0 with 16 mantissa bits.
+MetaDataSvc         DEBUG Not translating metadata item ID #8112
 AthenaOutputStreamVERBOSE Calling tokenizeAtStep( [], seiAux., *)
 AthenaOutputStreamVERBOSE Done calling tokenizeAtStep( [seiAux.], seiAux., *)
 AthenaOutputStreamVERBOSE Calling matchKey( [seiAux.], compAux.)
 AthenaOutputStreamVERBOSE Couldn't match every sub-string... return: 0
 AthenaOutputStreamVERBOSE Done calling matchKey( [seiAux.], compAux.) with result: 0
 AthenaOutputStream  DEBUG  Added object 8112,"seiAux."
-AthenaOutputStream  DEBUG Lossy float compression level 10 contains 0 elements for container sei
-AthenaOutputStream  DEBUG Lossy float compression level 16 contains 0 elements for container sei
 8112 compAux.
 8112 seiAux.
 8101 due
diff --git a/Control/AthenaServices/src/MetaDataSvc.cxx b/Control/AthenaServices/src/MetaDataSvc.cxx
index 2a81f9dd6bb0..965fdaf4670f 100644
--- a/Control/AthenaServices/src/MetaDataSvc.cxx
+++ b/Control/AthenaServices/src/MetaDataSvc.cxx
@@ -17,6 +17,7 @@
 #include "GaudiKernel/IIoComponentMgr.h"
 #include "GaudiKernel/IOpaqueAddress.h"
 #include "GaudiKernel/FileIncident.h"
+#include "GaudiKernel/System.h"
 
 #include "AthenaBaseComps/AthCnvSvc.h"
 #include "StoreGate/StoreGateSvc.h"
@@ -613,13 +614,67 @@ const std::string MetaDataSvc::currentRangeID() const
 }
 
 
-CLID MetaDataSvc::remapMetaContCLID( const CLID& item_id ) const
+CLID MetaDataSvc::remapMetaContCLID( const CLID& itemID ) const
 {
-   // for now just a simple dumb if
-   if( item_id == 167728019 ) {
-      return 167729019;   //  MetaCont<EventStreamInfo> CLID
+   auto it =  m_handledClasses.find(itemID);
+   if (it == m_handledClasses.end()) {
+      ATH_MSG_DEBUG("Not translating metadata item ID #" << itemID);
+      return itemID;
    }
-   return item_id;
+
+   std::string itemName;
+   CLID contID = 0;
+   if (m_classIDSvc->getTypeNameOfID(itemID, itemName).isSuccess()) {
+     const std::string contName = "MetaCont<" + itemName + ">";
+     ATH_MSG_DEBUG("Transforming " << contName << " to " << itemName
+                   << " for output");
+     if (m_classIDSvc->getIDOfTypeName(contName, contID).isSuccess())
+       return contID;
+   }
+
+   return itemID;
+}
+
+void MetaDataSvc::recordHook(const std::type_info& typeInfo) {
+  const std::string& typeName = System::typeinfoName(typeInfo);
+  ATH_MSG_VERBOSE("Handling recod event of type " << typeName);
+
+  CLID itemID = 0;
+  if (m_classIDSvc->getIDOfTypeInfoName(typeName, itemID).isSuccess()) {
+
+    ATH_MSG_DEBUG("MetaDataSvc will handle ClassID " << itemID);
+    auto it =  m_handledClasses.find(itemID);
+
+    if (it == m_handledClasses.end())
+      m_handledClasses[itemID] = 1;
+    else
+      (it->second)++;
+
+  }
+
+}
+
+void MetaDataSvc::removeHook(const std::type_info& typeInfo) {
+  const std::string& typeName = System::typeinfoName(typeInfo);
+  ATH_MSG_VERBOSE("Handling removal of event of type " << typeName);
+
+  CLID itemID = 0;
+  // use Gaudi::System to get type name
+  if (m_classIDSvc->getIDOfTypeInfoName(typeName, itemID).isSuccess()) {
+
+    ATH_MSG_DEBUG("MetaDataSvc will handle ClassID " << itemID);
+    auto it =  m_handledClasses.find(itemID);
+
+    if (it == m_handledClasses.end())
+      return;
+
+    (it->second)--;
+
+    if (it->second == 0)
+      m_handledClasses.erase(it);
+
+  }
+
 }
 
 
diff --git a/Control/AthenaServices/src/MetaDataSvc.h b/Control/AthenaServices/src/MetaDataSvc.h
index 4a6c181c12f6..7904cb0b37f5 100644
--- a/Control/AthenaServices/src/MetaDataSvc.h
+++ b/Control/AthenaServices/src/MetaDataSvc.h
@@ -16,12 +16,14 @@
 #include "GaudiKernel/IIncidentListener.h"
 #include "GaudiKernel/IIoComponent.h"
 #include "GaudiKernel/IFileMgr.h"  // for FILEMGR_CALLBACK_ARGS
+#include "GaudiKernel/IClassIDSvc.h"
 #include "AthenaKernel/IAddressProvider.h"
 #include "AthenaBaseComps/AthService.h"
 #include "AthenaKernel/IMetaDataTool.h"
 #include "AthenaKernel/IMetaDataSvc.h"
 
 #include <map>
+#include <typeinfo>
 
 // Forward declarations
 class IAddressCreator;
@@ -125,6 +127,9 @@ public: // Non-static members
 
    void lockTools() const;
    void unlockTools() const;
+   
+   void recordHook(const std::type_info&) override;
+   void removeHook(const std::type_info&) override;
 
 private:
    /// Add proxy to input metadata store - can be called directly or via BeginInputFile incident
@@ -139,6 +144,7 @@ private: // data
    ServiceHandle<IFileMgr> m_fileMgr;
    ServiceHandle<IIncidentSvc> m_incSvc;
    ServiceHandle<OutputStreamSequencerSvc>  m_outSeqSvc;
+   ServiceHandle< IClassIDSvc > m_classIDSvc{"ClassIDSvc", name()};
  
    long m_storageType;
    bool m_clearedInputDataStore;
@@ -149,6 +155,8 @@ private: // data
    std::map<CLID, std::string> m_toolForClid;
    std::map<std::string, std::string> m_streamForKey;
 
+   std::map<CLID, unsigned int> m_handledClasses;
+
 private: // properties
    /// MetaDataContainer, POOL container name for MetaData.
    StringProperty                 m_metaDataCont;
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
index 2be80a31b533..c15c711e5fe7 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead.ref
@@ -1,39 +1,41 @@
-Wed May 22 16:18:31 CEST 2019
+Wed Sep  9 14:46:24 CEST 2020
 Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [WorkDir-22.0.2] [x86_64-centos7-gcc8-dbg] [atlas-work3/a2d84b85b4c] -- built on [2019-05-22T0547]
+Py:Athena            INFO using release [WorkDir-22.0.18] [x86_64-centos7-gcc8-opt] [EventFormatMetaData/ed94d57] -- built on [2020-09-08T1647]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestRead_jo.py"
-Py:ConfigurableDb    INFO Read module info for 5470 configurables from 64 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5573 configurables from 15 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadReadDicts.py"
 Py:Athena            INFO including file "EventAthenaPool/EventAthenaPoolItemList_joboptions.py"
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v31r0)
-                                          running on lxplus729.cern.ch on Wed May 22 16:18:53 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on ed38202b3ca6 on Wed Sep  9 14:46:30 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 7341 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3362 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
-xAODMaker::Even...   INFO Initialising - Package version: xAODEventFormatCnv-00-00-00
+AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
+ClassIDSvc           INFO  getRegistryEntries: read 2023 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 6539 CLIDRegistry entries for module ALL
+PyComponentMgr       INFO Initializing PyComponentMgr...
+LoadReadDicts        INFO Initializing LoadReadDicts...
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2019-05-20T2152/Athena/22.0.2/InstallArea/x86_64-centos7-gcc8-dbg/share/dbreplica.config
-DBReplicaSvc         INFO Total of 10 servers found for host lxplus729.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-08T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
+DBReplicaSvc         INFO No specific match for domain found - use default fallback
+DBReplicaSvc         INFO Total of 2 servers found for host ed38202b3ca6 [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestRead_catalog.xml
@@ -42,26 +44,10 @@ Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All]
 MetaDataSvc          INFO Found MetaDataTools = PublicToolHandleArray(['IOVDbMetaDataTool'])
 EventSelector        INFO EventSelection with query 
 PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
-Warning in <TClass::Init>: no dictionary for class DMTest::C_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::CAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::CInfoAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::CTrigAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::G_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::GAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::CVecWithData_v1 is available
-Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::C_v1> > is available
-Warning in <TClass::Init>: no dictionary for class DMTest::H_v1 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::HAuxContainer_v1 is available
-Warning in <TClass::Init>: no dictionary for class ViewVector<DataVector<DMTest::H_v1> > is available
-Warning in <TClass::Init>: no dictionary for class DMTest::S2 is available
-Warning in <TClass::Init>: no dictionary for class DMTest::S1 is available
-Warning in <TClass::Init>: no dictionary for class ElementLink<DataVector<DMTest::C_v1> > is available
-Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::C_v1> is available
-Warning in <TClass::Init>: no dictionary for class DataVector<DMTest::H_v1> is available
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
 Domain[ROOT_All]     INFO                           xaoddata.root
-RootDatabase.open    INFO xaoddata.root File version:61600
+RootDatabase.open    INFO xaoddata.root File version:62006
 xaoddata.root        INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -70,51 +56,44 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
 Domain[ROOT_All]     INFO                           xaoddata.root
-RootDatabase.open    INFO xaoddata.root File version:61600
+RootDatabase.open    INFO xaoddata.root File version:62006
 xaoddata.root        INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 1AA9ED5E-1E4B-3A55-A718-BF5CAC995112
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 08312C01-E986-CD48-BFB5-512B5E9FED1A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] A234C939-27F1-9149-B62A-7F0E38DD8890
 Domain[ROOT_All]     INFO                           xaoddata.root
-RootDatabase.open    INFO xaoddata.root File version:61600
-ClassIDSvc           INFO  getRegistryEntries: read 1876 CLIDRegistry entries for module ALL
+RootDatabase.open    INFO xaoddata.root File version:62006
+ClassIDSvc           INFO  getRegistryEntries: read 4440 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
-AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 1458 CLIDRegistry entries for module ALL
-ClassIDSvc           INFO  getRegistryEntries: read 4601 CLIDRegistry entries for module ALL
-PyComponentMgr       INFO Initializing PyComponentMgr...
-LoadReadDicts        INFO Initializing LoadReadDicts...
-ClassIDSvc           INFO  getRegistryEntries: read 536 CLIDRegistry entries for module ALL
-DecisionSvc          INFO Inserting stream: Stream1 with no Algs
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
 OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
+DecisionSvc          INFO Inserting stream: Stream1 with no Algs
 Stream1.Stream1...   INFO Initializing Stream1.Stream1Tool - package version AthenaServices-00-00-00
 Stream1.Stream1...   INFO Initializing Stream1.Stream1_MakeEventStreamInfo - package version OutputStreamAthenaPool-00-00-00
-Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo'])
+Stream1              INFO Found HelperTools = PrivateToolHandleArray(['MakeEventStreamInfo/Stream1_MakeEventStreamInfo','xAODMaker::EventFormatStreamHelperTool/Stream1_MakeEventFormat','Athena::ThinningCacheTool/ThinningCacheTool_Stream1'])
 Stream1              INFO Data output: xaoddata2.root
 Stream1              INFO I/O reinitialization...
-HistogramPersis...WARNING Histograms saving not required.
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaoddata.root        INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 08312C01-E986-CD48-BFB5-512B5E9FED1A
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] A234C939-27F1-9149-B62A-7F0E38DD8890
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 08312C01-E986-CD48-BFB5-512B5E9FED1A
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] A234C939-27F1-9149-B62A-7F0E38DD8890
 Domain[ROOT_All]     INFO                           xaoddata.root
-RootDatabase.open    INFO xaoddata.root File version:61600
+RootDatabase.open    INFO xaoddata.root File version:62006
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 345 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 521 CLIDRegistry entries for module ALL
 AlgResourcePool      INFO TopAlg list empty. Recovering the one of Application Manager
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #0, run #0 0 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
 xAODTestReadCVec     INFO cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec     INFO Type of aux store: DMTest::CAuxContainer_v1
-RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=225 typename=f) has different type than the branch vector<int>
+RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=258 typename=f) has different type than the branch vector<int>
 xAODTestReadCVec     INFO  anInt1 101 aFloat: 200 pInt: 501 pFloat: 0.01 anInt2: 301 dInt1: 401 dVar1: 451 dpInt1: 51 cEL: cvec[9]
   pvInt: []
   pvFloat: []
@@ -193,26 +172,26 @@ xAODTestRead         INFO cvecWD 1001: 201 202 203 204 205 206 207 208 209 210
 xAODTestReadCView    INFO cview: 110 109 108 107 106 105 104 103 102 101
 xAODTestReadHVec     INFO hvec: 401.5 402.5 403.5 404.5 405.5 406.5 407.5 408.5 409.5 410.5 411.5 412.5 413.5 414.5 415.5 416.5 417.5 418.5 419.5 420.5
 xAODTestReadHVec     INFO hview: 420.5 419.5 418.5 417.5 416.5 415.5 414.5 413.5 412.5 411.5 410.5 409.5 408.5 407.5 406.5 405.5 404.5 403.5 402.5 401.5
-ClassIDSvc           INFO  getRegistryEntries: read 32 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 69 CLIDRegistry entries for module ALL
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     UPDATE    [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] C63120BB-9387-D943-ACAF-377DCAB24B30
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   CREATE    [ROOT_All] AFB33048-6EB5-2E46-A9EF-B3C0B57DB473
 Domain[ROOT_All]     INFO                           xaoddata2.root
-RootDatabase.open    INFO xaoddata2.root File version:61600
-StorageSvc           INFO Building shape according to reflection information using shape ID for:
-StorageSvc           INFO DataVector<DMTest::H_v2> [CD6C3074-425B-4C08-AF1C-43D7E8C84288]
+RootDatabase.open    INFO xaoddata2.root File version:62006
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO DMTest::HAuxContainer_v2 [2BDBFB04-C1C2-4B14-A977-3A61B8054700]
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
-StorageSvc           INFO ViewVector<DataVector<DMTest::H_v2> > [17849966-6667-4732-A1C7-096FBC778CF3]
-StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO xAOD::ShallowAuxInfo [BE505E75-8760-4F39-9331-689CB5443DB1]
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO xAOD::ShallowAuxContainer [C63C39D7-9501-49DC-B1B0-6AD98B1AEEFA]
 StorageSvc           INFO Building shape according to reflection information using shape ID for:
 StorageSvc           INFO xAOD::AuxContainerBase [C87C71B3-B03F-42FC-AF99-DF497F148397]
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO DataVector<DMTest::H_v2> [CD6C3074-425B-4C08-AF1C-43D7E8C84288]
+StorageSvc           INFO Building shape according to reflection information using shape ID for:
+StorageSvc           INFO ViewVector<DataVector<DMTest::H_v2> > [17849966-6667-4732-A1C7-096FBC778CF3]
+ClassIDSvc           INFO  getRegistryEntries: read 89 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 18 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 xAODTestReadCVec     INFO cvec aux items: aFloat anInt anInt2 cEL dInt1 dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec     INFO Type of aux store: DMTest::CAuxContainer_v1
@@ -1721,21 +1700,21 @@ xAODTestReadCView    INFO cview: 2010 2009 2008 2007 2006 2005 2004 2003 2002 20
 xAODTestReadHVec     INFO hvec: 8001.5 8002.5 8003.5 8004.5 8005.5 8006.5 8007.5 8008.5 8009.5 8010.5 8011.5 8012.5 8013.5 8014.5 8015.5 8016.5 8017.5 8018.5 8019.5 8020.5
 xAODTestReadHVec     INFO hview: 8020.5 8019.5 8018.5 8017.5 8016.5 8015.5 8014.5 8013.5 8012.5 8011.5 8010.5 8009.5 8008.5 8007.5 8006.5 8005.5 8004.5 8003.5 8002.5 8001.5
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 6 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 7 CLIDRegistry entries for module ALL
 Stream1              INFO Metadata records written: 21
 xaoddata.root        INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 08312C01-E986-CD48-BFB5-512B5E9FED1A
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] A234C939-27F1-9149-B62A-7F0E38DD8890
 xaoddata2.root       INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] C63120BB-9387-D943-ACAF-377DCAB24B30
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   CREATE    [ROOT_All] AFB33048-6EB5-2E46-A9EF-B3C0B57DB473
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     UPDATE    [ROOT_All] 
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 LoadReadDicts        INFO Finalizing LoadReadDicts...
 IncidentProcAlg2     INFO Finalize
 DecisionSvc          INFO Finalized successfully.
-PyComponentMgr       INFO Finalizing PyComponentMgr...
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 XMLCatalog           INFO File 'xAODTestRead_catalog.xml' does not exist. New file created.
+PyComponentMgr       INFO Finalizing PyComponentMgr...
 AthDictLoaderSvc     INFO in finalize...
 ToolSvc              INFO Removing all tools created by ToolSvc
 ChronoStatSvc.f...   INFO  Service finalized successfully 
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2_jo.py
index 5636b77cb790..fa57e02c166f 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead2_jo.py
@@ -42,14 +42,6 @@ include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
 fullItemList+=["DMTest::CVec#cvec"]
 fullItemList+=["xAOD::AuxContainerBase#cvecAux."]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::C_v1',
-                                     ])
-ServiceMgr += fmtsvc
-
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
@@ -102,11 +94,19 @@ topSequence += DMTest__xAODTestReadHVec ("xAODTestReadHVec_scopy",
 
 # Stream's output file
 Stream1_Augmented = MSMgr.NewPoolStream ('Stream1', 'xaoddata2x.root',asAlg=True, noTag=True)
-Stream1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
 Stream1 = Stream1_Augmented.GetEventStream()
 Stream1.WritingTool.SubLevelBranchName = '<key>'
 Stream1.ItemList   += fullItemList # List of DO's to write out
 
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Stream1.HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::C_v1',
+        ]
+        break
 
 # Avoid races when running tests in parallel.
 FILECATALOG = 'xAODTestRead2_catalog.xml'
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter_jo.py
index ecc06de1166c..952308abb3d5 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadFilter_jo.py
@@ -47,14 +47,6 @@ fullItemList+=["xAOD::AuxContainerBase!#cvecAux."]
 fullItemList+=["DMTest::C#cinfo"]
 fullItemList+=["DMTest::CInfoAuxContainer#cinfoAux."]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::C_v1',
-                                     ])
-ServiceMgr += fmtsvc
-
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
@@ -86,7 +78,19 @@ topSequence += DMTest__xAODTestDecor ('xAODTestDecor',
 
 # Stream's output file
 Stream1_Augmented = MSMgr.NewPoolStream ('Stream1', 'xaoddata_filt.root',asAlg=True,noTag=True)
-Stream1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
+
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Stream1_Augmented.GetEventStream().HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::C_v1',
+        ]
+        break
+
+
+
 Stream1 = Stream1_Augmented.GetEventStream()
 Stream1.WritingTool.SubLevelBranchName = '<key>'
 Stream1.ItemList   += fullItemList # List of DO's to write out
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
index a94946954a00..e7d30a1b356b 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestReadThinned.ref
@@ -1,41 +1,39 @@
-Thu Oct 31 10:31:58 EDT 2019
+Wed Sep  9 15:05:53 CEST 2020
+Preloading tcmalloc_minimal.so
 Py:Athena            INFO including file "AthenaCommon/Preparation.py"
-Py:Athena            INFO using release [?-21.0.0] [?] [?/?] -- built on [?]
+Py:Athena            INFO using release [WorkDir-22.0.18] [x86_64-centos7-gcc8-opt] [EventFormatMetaData/ed94d57] -- built on [2020-09-08T1647]
 Py:Athena            INFO including file "AthenaCommon/Atlas.UnixStandardJob.py"
 Py:Athena            INFO executing ROOT6Setup
 Py:Athena            INFO including file "AthenaCommon/Execution.py"
 Py:Athena            INFO including file "DataModelRunTests/xAODTestReadThinned_jo.py"
-Py:ConfigurableDb    INFO Read module info for 820 configurables from 2 genConfDb files
+Py:ConfigurableDb    INFO Read module info for 5573 configurables from 15 genConfDb files
 Py:ConfigurableDb    INFO No duplicates have been found: that's good !
 Py:Athena            INFO including file "DataModelRunTests/loadWriteDicts.py"
+Py:Athena            INFO including file "DataModelRunTests/commonTrailer.py"
 Py:Athena            INFO including file "DataModelRunTests/setCatalog.py"
 Py:Athena            INFO including file "AthenaCommon/runbatch.py"
-# setting LC_ALL to "C"
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Thu Oct 31 10:32:03 2019
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v34r0)
+                                          running on ed38202b3ca6 on Wed Sep  9 15:05:58 2020
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
-ApplicationMgr       INFO Updating Gaudi::PluginService::SetDebug(level) to level= 'PluginDebugLevel':0
-StatusCodeSvc        INFO initialize
 AthDictLoaderSvc     INFO in initialize...
 AthDictLoaderSvc     INFO acquired Dso-registry
-ClassIDSvc           INFO  getRegistryEntries: read 3753 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 3362 CLIDRegistry entries for module ALL
 CoreDumpSvc          INFO Handling signals: 11(Segmentation fault) 7(Bus error) 4(Illegal instruction) 8(Floating point exception) 
 AthenaEventLoopMgr   INFO Initializing AthenaEventLoopMgr - package version AthenaServices-00-00-00
-ClassIDSvc           INFO  getRegistryEntries: read 10214 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 2023 CLIDRegistry entries for module ALL
 PyComponentMgr       INFO Initializing PyComponentMgr...
 LoadWriteDicts       INFO Initializing LoadWriteDicts...
 MetaDataSvc          INFO Initializing MetaDataSvc - package version AthenaServices-00-00-00
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
 PoolSvc              INFO Set connectionsvc retry/timeout/IDLE timeout to  'ConnectionRetrialPeriod':300/ 'ConnectionRetrialTimeOut':3600/ 'ConnectionTimeOut':5 seconds with connection cleanup disabled
 PoolSvc              INFO Frontier compression level set to 5
-DBReplicaSvc         INFO Read replica configuration from /home/sss/atlas/dvtest/build/share/dbreplica.config
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://frontier-atlas.lcg.triumf.ca:3128/ATLAS_frontier)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://atlasbpfrontier.cern.ch:3127)(proxyurl=http://atlasbpfrontier.fnal.gov:3127) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master_Athena_x86_64-centos7-gcc8-opt/2020-09-08T2101/Athena/22.0.18/InstallArea/x86_64-centos7-gcc8-opt/share/dbreplica.config
 DBReplicaSvc         INFO No specific match for domain found - use default fallback
-DBReplicaSvc         INFO Total of 1 servers found for host karma [atlas_dd ]
+DBReplicaSvc         INFO Total of 2 servers found for host ed38202b3ca6 [ATLF atlas_dd ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc              INFO Setting up APR FileCatalog and Streams
 PoolSvc              INFO POOL WriteCatalog is file:xAODTestReadThinned_catalog.xml
@@ -47,7 +45,7 @@ PoolSvc              INFO File is not in Catalog! Attempt to open it anyway.
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BF012F5D-24ED-4D8F-2F0B-73143B82F680
 Domain[ROOT_All]     INFO                           xaodthinned1.root
-RootDatabase.open    INFO xaodthinned1.root File version:61800
+RootDatabase.open    INFO xaodthinned1.root File version:62006
 xaodthinned1.root    INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BF012F5D-24ED-4D8F-2F0B-73143B82F680
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
@@ -56,30 +54,30 @@ DbSession            INFO     Open     DbSession
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
 Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] BF012F5D-24ED-4D8F-2F0B-73143B82F680
 Domain[ROOT_All]     INFO                           xaodthinned1.root
-RootDatabase.open    INFO xaodthinned1.root File version:61800
+RootDatabase.open    INFO xaodthinned1.root File version:62006
 xaodthinned1.root    INFO Database being retired...
 Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] BF012F5D-24ED-4D8F-2F0B-73143B82F680
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 2CDDCA0D-462F-5D42-B5DB-6E2BF9556CA1
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EAB90F90-4500-D944-987B-2E9A405C4EE2
 Domain[ROOT_All]     INFO                           xaodthinned1.root
-RootDatabase.open    INFO xaodthinned1.root File version:61800
-ClassIDSvc           INFO  getRegistryEntries: read 2127 CLIDRegistry entries for module ALL
+RootDatabase.open    INFO xaodthinned1.root File version:62006
+ClassIDSvc           INFO  getRegistryEntries: read 10589 CLIDRegistry entries for module ALL
 EventPersistenc...   INFO Added successfully Conversion service:AthenaPoolCnvSvc
-HistogramPersis...WARNING Histograms saving not required.
+ClassIDSvc           INFO  getRegistryEntries: read 2 CLIDRegistry entries for module ALL
+OutputStreamSeq...   INFO Initializing OutputStreamSequencerSvc - package version AthenaServices-00-00-00
 AthenaEventLoopMgr   INFO Setup EventSelector service EventSelector
 ApplicationMgr       INFO Application Manager Initialized successfully
 xaodthinned1.root    INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 2CDDCA0D-462F-5D42-B5DB-6E2BF9556CA1
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EAB90F90-4500-D944-987B-2E9A405C4EE2
 Domain[ROOT_All]     INFO >   Deaccess DbDomain     READ      [ROOT_All] 
 DbSession            INFO     Open     DbSession    
 Domain[ROOT_All]     INFO >   Access   DbDomain     READ      [ROOT_All] 
-Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] 2CDDCA0D-462F-5D42-B5DB-6E2BF9556CA1
+Domain[ROOT_All]     INFO ->  Access   DbDatabase   READ      [ROOT_All] EAB90F90-4500-D944-987B-2E9A405C4EE2
 Domain[ROOT_All]     INFO                           xaodthinned1.root
-RootDatabase.open    INFO xaodthinned1.root File version:61800
+RootDatabase.open    INFO xaodthinned1.root File version:62006
 ApplicationMgr       INFO Application Manager Started successfully
-ClassIDSvc           INFO  getRegistryEntries: read 10 CLIDRegistry entries for module ALL
 AlgResourcePool      INFO TopAlg list empty. Recovering the one of Application Manager
 AthenaPoolConve...   INFO massageEventInfo: unable to get OverrideRunNumberFromInput property from EventSelector 
 AthenaEventLoopMgr   INFO   ===>>>  start of run 0    <<<===
@@ -99,11 +97,11 @@ xAODTestReadCLinks   INFO   (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:i
 xAODTestReadCLinks   INFO   (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) (:inv) 
 xAODTestReadCVec2    INFO cvec2 101 102 103 105 106 107 109 110 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #0, run #0 1 events processed so far  <<<===
-ClassIDSvc           INFO  getRegistryEntries: read 65 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 57 CLIDRegistry entries for module ALL
 AthenaEventLoopMgr   INFO   ===>>>  start processing event #1, run #0 1 events processed so far  <<<===
 xAODTestReadCVec     INFO cvec aux items: aFloat anInt anInt2 cEL dVar1 dpInt1 dpvFloat pFloat pInt pvFloat pvInt 
 xAODTestReadCVec     INFO Type of aux store: DMTest::CAuxContainer_v1
-RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=225 typename=f) has different type than the branch vector<int>
+RootAuxDynReader     INFO FILE:LINE (const RootAuxDynReader::BranchInfo& RootAuxDynReader::getBranchInfo(const unsigned long&, const SG::AuxStoreInternal&)): attribute dVar1 (id=258 typename=f) has different type than the branch vector<int>
 xAODTestReadCVec     INFO  anInt1 201 aFloat: 400 pInt: 1001 pFloat: 0.02 anInt2: 601 dVar1: 901 dpInt1: 101 cEL: [0]
   pvInt: []
   pvFloat: []
@@ -856,7 +854,7 @@ xAODTestReadCLinks   INFO   (cvec:5) (cvec:4) (:inv) (:inv) (cvec:3) (cvec:2) (:
 xAODTestReadCVec2    INFO cvec2 2001 2002 2003 2005 2006 2007 2009 2010 
 AthenaEventLoopMgr   INFO   ===>>>  done processing event #19, run #0 20 events processed so far  <<<===
 xaodthinned1.root    INFO Database being retired...
-Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] 2CDDCA0D-462F-5D42-B5DB-6E2BF9556CA1
+Domain[ROOT_All]     INFO ->  Deaccess DbDatabase   READ      [ROOT_All] EAB90F90-4500-D944-987B-2E9A405C4EE2
 ApplicationMgr       INFO Application Manager Stopped successfully
 IncidentProcAlg1     INFO Finalize
 LoadWriteDicts       INFO Finalizing LoadWriteDicts...
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead_jo.py
index 11f7b161da81..32f75aa484cf 100755
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestRead_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestRead_jo.py
@@ -79,16 +79,6 @@ fullItemList+=["xAOD::ShallowAuxInfo#scopy_cinfoAux."]
 fullItemList+=["DMTest::HVec#scopy_hvec"]
 fullItemList+=["xAOD::ShallowAuxContainer#scopy_hvecAux."]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::CVecWithData_v1',
-                                     'DMTest::CTrigAuxContainer_v1',
-                                     'DMTest::C_v1',
-                                     'DMTest::CInfoAuxContainer_v1'])
-ServiceMgr += fmtsvc
-
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
@@ -143,13 +133,22 @@ topSequence += DMTest__xAODTestDecor ('AuxDataTestDecor1_scopy',
 
 # Stream's output file
 Stream1_Augmented = MSMgr.NewPoolStream ('Stream1', 'xaoddata2.root',asAlg=True, noTag=True)
-Stream1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
 Stream1 = Stream1_Augmented.GetEventStream()
 Stream1.WritingTool.SubLevelBranchName = '<key>'
 Stream1.ItemList   += fullItemList # List of DO's to write out
 
-theApp.CreateSvc += ['xAODMaker::EventFormatSvc']
-
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Stream1.HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::CVecWithData_v1',
+            'DMTest::CTrigAuxContainer_v1',
+            'DMTest::C_v1',
+            'DMTest::CInfoAuxContainer_v1',
+        ]
+        break
 
 # Avoid races when running tests in parallel.
 FILECATALOG = 'xAODTestRead_catalog.xml'
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead_jo.py
index 58e431e76aed..ac94beb28e9a 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestTypelessRead_jo.py
@@ -65,16 +65,6 @@ fullItemList+=["DMTest::HVec#copy_hvec"]
 fullItemList+=["DMTest::HAuxContainer#copy_hvecAux."]
 fullItemList+=["DMTest::HView#copy_hview"]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CVecWithData_v1',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::CTrigAuxContainer_v1',
-                                     'DMTest::C_v1',
-                                     'DMTest::CInfoAuxContainer_v1'])
-ServiceMgr += fmtsvc
-
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
 #--------------------------------------------------------------
@@ -94,12 +84,24 @@ topSequence += DMTest__xAODTestTypelessRead ("xAODTestTypelessRead",
 # Stream's output file
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
 Stream1_Augmented = MSMgr.NewPoolStream ('Stream1', 'xaoddata3.root',asAlg=True,noTag=True)
-Stream1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
 Stream1 = Stream1_Augmented.GetEventStream()
 Stream1.WritingTool.SubLevelBranchName = '<key>'
 # List of DO's to write out
 Stream1.ItemList   += fullItemList
 
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Stream1.HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CVecWithData_v1',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::CTrigAuxContainer_v1',
+            'DMTest::C_v1',
+            'DMTest::CInfoAuxContainer_v1',
+        ]
+        break
+
 
 # Avoid races when running tests in parallel.
 FILECATALOG = 'xAODTestTypelessRead_catalog.xml'
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned_jo.py
index 5a75d8bcb6b7..092568973ec1 100644
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestWriteThinned_jo.py
@@ -58,8 +58,6 @@ topSequence += DMTest__xAODTestThinCVec ("xAODTestThinCVec2b", Stream = 'Thinned
 #--------------------------------------------------------------
 # Output options
 #--------------------------------------------------------------
-theApp.CreateSvc += ['xAODMaker::EventFormatSvc']
-
 # ItemList:
 include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
 fullItemList+=["DMTest::CVec#cvec"]
@@ -74,27 +72,28 @@ fullItemList+=["DMTest::CLinksContainer#clinksContainer2"]
 fullItemList+=["DMTest::CLinksAuxContainer#clinksContainer2Aux."]
 fullItemList+=["DMTest::CLinksAOD#clinksAOD"]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::C_v1',
-                                     'DMTest::CLinks_v1',
-                                     'DataVector<DMTest::CLinks_v1>',
-                                     'DMTest::CLinksAuxInfo_v1',
-                                     'DMTest::CLinksAuxContainer_v1',
-                                     ])
-ServiceMgr += fmtsvc
-
 # Stream's output file
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
 Thinned1_Augmented = MSMgr.NewPoolStream ('Thinned1', 'xaodthinned1.root', asAlg=True, noTag=True)
-Thinned1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
 Thinned1 = Thinned1_Augmented.GetEventStream()
 Thinned1.WritingTool.SubLevelBranchName = '<key>'
 # List of DO's to write out
 Thinned1.ItemList   += fullItemList
 
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Thinned1.HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::C_v1',
+            'DMTest::CLinks_v1',
+            'DataVector<DMTest::CLinks_v1>',
+            'DMTest::CLinksAuxInfo_v1',
+            'DMTest::CLinksAuxContainer_v1',
+        ]
+        break
+
 
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
diff --git a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
index ee72dfc4c5b8..14dde8f7587a 100755
--- a/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
+++ b/Control/DataModelTest/DataModelRunTests/share/xAODTestWrite_jo.py
@@ -63,7 +63,6 @@ topSequence += DMTest__MetaWriterAlg ("MetaWriterAlg")
 #--------------------------------------------------------------
 # Output options
 #--------------------------------------------------------------
-theApp.CreateSvc += ['xAODMaker::EventFormatSvc']
 
 # ItemList:
 include( "EventAthenaPool/EventAthenaPoolItemList_joboptions.py" )
@@ -83,29 +82,9 @@ fullItemList+=["DMTest::HAuxContainer#hvecAux."]
 fullItemList+=["DMTest::HView#hview"]
 fullItemList+=["DMTest::S2#S2"]
 
-from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatSvc
-fmtsvc = xAODMaker__EventFormatSvc (FormatNames = 
-                                    ['DataVector<DMTest::C_v1>',
-                                     'DMTest::CVecWithData_v1',
-                                     'DMTest::CAuxContainer_v1',
-                                     'DMTest::CTrigAuxContainer_v1',
-                                     'ViewVector<DataVector<DMTest::C_v1,DataModel_detail::NoBase> >',
-                                     'DMTest::C_v1',
-                                     'DMTest::CInfoAuxContainer_v1',
-                                     'DataVector<DMTest::G_v1>',
-                                     'DMTest::GAuxContainer_v1',
-                                     'DMTest::G_v1',
-                                     'DMTest::H_v1',
-                                     'DataVector<DMTest::H_v1>',
-                                     'ViewVector<DataVector<DMTest::H_v1,DataModel_detail::NoBase> >',
-                                     'DMTest::HAuxContainer_v1',
-                                     ])
-ServiceMgr += fmtsvc
-
 # Stream's output file
 from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
 Stream1_Augmented = MSMgr.NewPoolStream ('Stream1', 'xaoddata.root', asAlg=True, noTag=True)
-Stream1_Augmented.AddMetaDataItem ('xAOD::EventFormat#EventFormat')
 Stream1 = Stream1_Augmented.GetEventStream()
 Stream1.WritingTool.SubLevelBranchName = '<key>'
 # List of DO's to write out
@@ -115,6 +94,27 @@ Stream1.MetadataItemList += [ 'DMTest::S1#MetaS1',
                               'DMTest::CInfoAuxContainer#MetaCAux.' ]
 ServiceMgr.AthenaPoolCnvSvc.PoolAttributes += ["DEFAULT_SPLITLEVEL='1'"]
 
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+for tool in Stream1.HelperTools:
+    if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+        tool.TypeNames += [
+            'DataVector<DMTest::C_v1>',
+            'DMTest::CVecWithData_v1',
+            'DMTest::CAuxContainer_v1',
+            'DMTest::CTrigAuxContainer_v1',
+            'ViewVector<DataVector<DMTest::C_v1,DataModel_detail::NoBase> >',
+            'DMTest::C_v1',
+            'DMTest::CInfoAuxContainer_v1',
+            'DataVector<DMTest::G_v1>',
+            'DMTest::GAuxContainer_v1',
+            'DMTest::G_v1',
+            'DMTest::H_v1',
+            'DataVector<DMTest::H_v1>',
+            'ViewVector<DataVector<DMTest::H_v1,DataModel_detail::NoBase> >',
+            'DMTest::HAuxContainer_v1',
+        ]
+        break
+
 
 # Increment LBN every two events.
 from McEventSelector import McEventSelectorConf
diff --git a/Control/xAODRootAccess/Root/TEvent.cxx b/Control/xAODRootAccess/Root/TEvent.cxx
index 056528db31f0..0f3c8fdc91e1 100644
--- a/Control/xAODRootAccess/Root/TEvent.cxx
+++ b/Control/xAODRootAccess/Root/TEvent.cxx
@@ -424,8 +424,9 @@ namespace xAOD {
       }
 
       // Check if the EventFormat branch is available:
-      static const char* EVENTFORMAT_BRANCH_NAME = "EventFormat";
-      if( ! m_inMetaTree->GetBranch( EVENTFORMAT_BRANCH_NAME ) ) {
+      static const std::string eventFormatBranchName =
+         Utils::getFirstBranchMatch( m_inMetaTree, "EventFormat");
+      if( ! m_inMetaTree->GetBranch( eventFormatBranchName.c_str() ) ) {
          // This can happen when the file was produced by an Athena job that
          // didn't have any input events itself. This means that the file
          // doesn't actually have any useful metadata.
@@ -439,7 +440,7 @@ namespace xAOD {
       // Read in the event format object:
       EventFormat* format = 0; ::TBranch* br = 0;
       const Int_t status =
-         m_inMetaTree->SetBranchAddress( EVENTFORMAT_BRANCH_NAME,
+         m_inMetaTree->SetBranchAddress( eventFormatBranchName.c_str(),
                                          &format, &br );
       if( status < 0 ) {
          ::Error( "xAOD::TEvent::readFrom",
@@ -3399,4 +3400,5 @@ namespace xAOD {
       return getOutputObject( key, ti, metadata );
    }
 
+
 } // namespace xAOD
diff --git a/Control/xAODRootAccess/Root/Utils.cxx b/Control/xAODRootAccess/Root/Utils.cxx
index 56ee1090c47a..1d7d08b92fcd 100644
--- a/Control/xAODRootAccess/Root/Utils.cxx
+++ b/Control/xAODRootAccess/Root/Utils.cxx
@@ -6,6 +6,7 @@
 
 // STL include(s):
 #include <functional>
+#include <regex>
 
 // ROOT include(s):
 #include <TError.h>
@@ -313,6 +314,22 @@ namespace xAOD {
          return result;
       }
 
+      std::string getFirstBranchMatch( TTree * tree,
+                                        const std::string& pre ) {
+         const TObjArray * pBranches = tree->GetListOfBranches();
+         const std::regex pattern( ".*" + pre + ".*" );
+
+         for( int i = 0; i < pBranches->GetLast() ; ++i ) {
+            const std::string name = pBranches->At(i)->GetName();
+
+            if( std::regex_match( name, pattern ) )
+               return name;
+
+         }
+
+         return pre;
+      }
+
    } // namespace Utils
 
 } // namespace xAOD
diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/Utils.h b/Control/xAODRootAccess/xAODRootAccess/tools/Utils.h
index 2dec08cd0d73..28db3560c6f3 100644
--- a/Control/xAODRootAccess/xAODRootAccess/tools/Utils.h
+++ b/Control/xAODRootAccess/xAODRootAccess/tools/Utils.h
@@ -17,6 +17,7 @@ extern "C" {
 
 // ROOT include(s):
 #include <TDataType.h>
+#include <TTree.h>
 
 namespace xAOD {
 
@@ -37,6 +38,9 @@ namespace xAOD {
       /// Get the type name as it is known to ROOT, based on std::type_info
       std::string getTypeName( const std::type_info& ti );
 
+      /// Search for branches, returns search term on no result
+      std::string getFirstBranchMatch( TTree* tree, const std::string& pre );
+
    } // namespace Utils
 
 } // namespace xAOD
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py
index ffa782fb93c7..cb3d49ae862f 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/CreateOutputStreams.py
@@ -7,6 +7,7 @@
 
 from __future__ import print_function
 
+from AthenaCommon import CfgMgr
 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
 from AthenaServices.AthenaServicesConf import AthenaOutputStream
 from AthenaServices.AthenaServicesConf import AthenaOutputStreamTool
@@ -22,6 +23,7 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False,
    if trigNavThinningSvc is None:
       trigNavThinningSvc = _trigNavThinningSvcs.get (streamName, None)
 
+
    # define athena output stream
    writingTool = AthenaOutputStreamTool( streamName + "Tool" )
    outputStream = AthenaOutputStream(
@@ -32,7 +34,10 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False,
    outputStream.ExtraOutputs += [("DataHeader", "StoreGateSvc+" + streamName)]
    #outputStream.ItemList += [ "xAOD::EventInfo#*" ]
    outputStream.MetadataStore = svcMgr.MetaDataStore
-   outputStream.MetadataItemList = [ "EventStreamInfo#" + streamName, "IOVMetaDataContainer#*" ]
+   outputStream.MetadataItemList = [
+        "EventStreamInfo#" + streamName,
+        "IOVMetaDataContainer#*",
+   ]
 
    ## get a handle on the default top-level algorithm sequence
    from AthenaCommon.AlgSequence import AlgSequence
@@ -68,7 +73,15 @@ def createOutputStream( streamName, fileName = "", asAlg = False, noTag = False,
       streamInfoTool = MakeEventStreamInfo( streamName + "_MakeEventStreamInfo" )
       streamInfoTool.Key = streamName
       streamInfoTool.EventInfoKey = eventInfoKey
-      outputStream.HelperTools = [ streamInfoTool ]
+      # for xAOD access, add EventFormat to all POOL output streams
+      # Key to use for event format on this stream
+      event_format_key = 'EventFormat{}'.format(streamName)
+      event_format_tool = CfgMgr.xAODMaker__EventFormatStreamHelperTool(
+         "{}_MakeEventFormat".format(streamName),
+         Key=event_format_key,
+      )
+      outputStream.MetadataItemList += ["xAOD::EventFormat#{}".format(event_format_key)]
+      outputStream.HelperTools = [ streamInfoTool, event_format_tool]
 
 
    # Support for MT thinning.
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
index 6dc8f05cb06f..ea94a0686e64 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/MultipleStreamManager.py
@@ -558,8 +558,6 @@ class MultipleStreamManager:
         theStream = self.NewStream(StreamName,FileName,type='pool',asAlg=asAlg)
         from AthenaCommon.AppMgr import theApp
         svcMgr = theApp.serviceMgr()
-        theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-        theStream.AddMetaDataItem("xAOD::EventFormat#EventFormat")
 
         from AthenaCommon import CfgMgr
         streamMarkUpTool = CfgMgr.xAODMaker__FileMetaDataMarkUpTool( StreamName + "_FileMetaDataMarkUpTool" )
diff --git a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py
index 336db1fff8c3..4cf7ba9f51a0 100644
--- a/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py
+++ b/Database/AthenaPOOL/OutputStreamAthenaPool/python/OutputStreamConfig.py
@@ -48,7 +48,10 @@ def OutputStreamCfg(configFlags, streamName, ItemList=[], disableEventTag=False
    outputStream.ExtraOutputs += [("DataHeader", "StoreGateSvc+" + streamName)]
    result.addService(StoreGateSvc("MetaDataStore"))
    outputStream.MetadataStore = result.getService("MetaDataStore")
-   outputStream.MetadataItemList = [ "EventStreamInfo#Stream" + streamName, "IOVMetaDataContainer#*" ]
+   outputStream.MetadataItemList = [
+        "EventStreamInfo#Stream" + streamName,
+        "IOVMetaDataContainer#*",
+   ]
 
    # Event Tag
    if not disableEventTag:
@@ -60,13 +63,20 @@ def OutputStreamCfg(configFlags, streamName, ItemList=[], disableEventTag=False
                                        Tool=EventInfoAttListTool())
       result.addEventAlgo(tagBuilder)
 
-   # For xAOD output
-   if streamName=="xAOD":
-      xAODMaker__EventFormatSvc=CompFactory.xAODMaker.EventFormatSvc
-      # Simplifies naming 
-      result.addService(xAODMaker__EventFormatSvc())
-      outputStream.MetadataItemList.append( "xAOD::EventFormat#EventFormat" )
+   # Make EventFormat object
+   event_format_key = 'EventFormat{}'.format(streamName)
+   event_format_tool = CompFactory.xAODMaker.EventFormatStreamHelperTool(
+      '{}_MakeEventFormat'.format(event_format_key),
+      Key=event_format_key,
+   )
+   outputStream.HelperTools.append(event_format_tool)
 
+   # Simplifies naming 
+   outputStream.MetadataItemList.append(
+      "xAOD::EventFormat#{}".format(event_format_key)
+   )
+   # For xAOD output
+   if "xAOD" in streamName:
       xAODMaker__FileMetaDataMarkUpTool=CompFactory.xAODMaker.FileMetaDataMarkUpTool
       streamMarkUpTool = xAODMaker__FileMetaDataMarkUpTool( streamName + "_FileMetaDataMarkUpTool" )
       streamMarkUpTool.Key = streamName
diff --git a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
index fd43710ca9f6..c08d767dc144 100755
--- a/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
+++ b/Database/IOVDbMetaDataTools/src/IOVDbMetaDataTool.cxx
@@ -21,7 +21,6 @@
 #include "StoreGate/StoreGate.h"
 #include "IOVDbDataModel/IOVMetaDataContainer.h"
 
-#include "AthenaKernel/MetaCont.h"
 #include "CxxUtils/checker_macros.h"
 
 IOVDbMetaDataTool::IOVDbMetaDataTool(const std::string& type, 
@@ -127,8 +126,7 @@ StatusCode IOVDbMetaDataTool::endInputFile(const SG::SourceID&)
 
 StatusCode IOVDbMetaDataTool::metaDataStop()
 {
-  StatusCode sc = dumpMetaConts();
-  return sc;
+  return StatusCode::SUCCESS;
 }
 
 //--------------------------------------------------------------------------
@@ -459,11 +457,6 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
     IOVMetaDataContainer* contMaster = getMetaDataContainer(cont->folderName()
 							    , cont->folderDescription());
 
-    // At the same time we want to create a new instance of IOVMetaDataContainer for new SID
-    // and store it into MetaCont<IOVMetaDataContainer>
-    IOVMetaDataContainer* newCont4Sid = new IOVMetaDataContainer(cont->folderName()
-								 , cont->folderDescription()); 
-
     // We assume that the folder is the same for all versions, and
     // now we loop over versions for the payloads
     std::list<SG::ObjectWithVersion<IOVMetaDataContainer> > allVersions;
@@ -537,20 +530,6 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
           }
         }
 
-	// Do the same with newCont4Sid
-        {
-          // Should be ok.
-          StatusCode sc ATLAS_THREAD_SAFE =
-            modifyPayload (newCont4Sid->folderName(), coll);
-          if (!sc.isSuccess()) {
-            ATH_MSG_ERROR("processInputFileMetaData: Could not modify the payload for folder " << newCont4Sid->folderName());
-            return StatusCode::FAILURE;
-          }
-        }
-
-	// Before starting merging, make a copy for newCont4Sid
-	CondAttrListCollection* collCopy = new CondAttrListCollection(*coll);
-
 	ATH_MSG_VERBOSE("processInputFileMetaData: merge minRange: " << coll->minRange());
 	if (!contMaster->merge(coll)) {
 	  // Did not merge it in - was a duplicate, so we need to delete it 
@@ -563,16 +542,6 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 	  ATH_MSG_VERBOSE(" => merged ");
 	}
 
-	ATH_MSG_VERBOSE("processInputFileMetaData:  merge for MetaCont minRange: " << collCopy->minRange());
-	if (!newCont4Sid->merge(collCopy)) {
-	  // Did not merge it in - was a duplicate, so we need to delete it 
-	  delete collCopy;
-	  ATH_MSG_VERBOSE(" => not merged ");
-	}
-	else {
-	  ATH_MSG_VERBOSE(" => merged ");
-	}
-
       }
       ATH_MSG_DEBUG("processInputFileMetaData: Merged together containers for folder " << cont->folderName() << " ncoll/ndup " 
 		    << ncolls << " " << ndupColls);
@@ -604,12 +573,6 @@ StatusCode IOVDbMetaDataTool::processInputFileMetaData(const std::string& fileNa
 	}
       }
 
-      // Insert the merged container into MetaCont
-      if(fillMetaCont(fileName,newCont4Sid).isFailure()) {
-	ATH_MSG_ERROR("processInputFileMetaData: Failed to insert the merged IOVMetaDataContainer into MetaCont");
-	return StatusCode::FAILURE;
-      }
-
       // detailed printout after merge
       if (msgLvl(MSG::VERBOSE)) {
 	const IOVPayloadContainer*  payloadMaster = contMaster->payloadContainer();
diff --git a/Event/xAOD/xAODEventFormat/CMakeLists.txt b/Event/xAOD/xAODEventFormat/CMakeLists.txt
index c5ebb7ade257..fe247a485ef2 100644
--- a/Event/xAOD/xAODEventFormat/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormat/CMakeLists.txt
@@ -1,28 +1,20 @@
-################################################################################
-# Package: xAODEventFormat
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# Declare the package name:
+# Declare the package name.
 atlas_subdir( xAODEventFormat )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODCore )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
-# Component(s) in the package:
+# Component(s) in the package.
 atlas_add_library( xAODEventFormat
-                   Root/*.cxx
-                   PUBLIC_HEADERS xAODEventFormat
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES xAODCore
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+   xAODEventFormat/*.h xAODEventFormat/versions/*.h Root/*.cxx
+   PUBLIC_HEADERS xAODEventFormat
+   LINK_LIBRARIES xAODCore )
 
 atlas_add_dictionary( xAODEventFormatDict
-                      xAODEventFormat/xAODEventFormatDict.h
-                      xAODEventFormat/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCore xAODEventFormat )
+   xAODEventFormat/xAODEventFormatDict.h
+   xAODEventFormat/selection.xml
+   LINK_LIBRARIES xAODCore xAODEventFormat )
 
+# Test(s) in the package.
+atlas_add_test( eventformat_test
+   SOURCES test/ut_xaodeventformat_eventformat_test.cxx
+   LINK_LIBRARIES xAODEventFormat )
diff --git a/Event/xAOD/xAODEventFormat/share/eventformat_test.ref b/Event/xAOD/xAODEventFormat/share/eventformat_test.ref
new file mode 100644
index 000000000000..e0f9b2861ad0
--- /dev/null
+++ b/Event/xAOD/xAODEventFormat/share/eventformat_test.ref
@@ -0,0 +1,3 @@
+xAOD::EventFormat:
+1. element: Branch name:                         SGKey1, Class name:                    xAOD::Type1, Hash: 0x00000101
+2. element: Branch name:                         SGKey2, Class name:                    xAOD::Type2, Hash: 0x00000102
diff --git a/Event/xAOD/xAODEventFormat/test/ut_xaodeventformat_eventformat_test.cxx b/Event/xAOD/xAODEventFormat/test/ut_xaodeventformat_eventformat_test.cxx
index 559b64a4d98a..855fac6ede18 100644
--- a/Event/xAOD/xAODEventFormat/test/ut_xaodeventformat_eventformat_test.cxx
+++ b/Event/xAOD/xAODEventFormat/test/ut_xaodeventformat_eventformat_test.cxx
@@ -1,31 +1,29 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 
-// $Id: ut_xaodeventformat_eventformat_test.cxx 629218 2014-11-18 17:38:06Z krasznaa $
+// Local include(s).
+#include "xAODEventFormat/EventFormat.h"
 
-// System include(s):
+// System include(s).
+#undef NDEBUG
+#include <cassert>
 #include <iostream>
 
-// Local include(s):
-#include "xAODEventFormat/EventFormat.h"
+void test1( const xAOD::EventFormat& ef ) {
 
-/// The name of the application
-static const char* APP_NAME = "ut_xaodeventformat_eventformat_test";
-
-/// Simple macro for checking boolean expressions
-#define SIMPLE_ASSERT( EXP )                                \
-   do {                                                     \
-      const bool ret = EXP;                                 \
-      if( ! ret ) {                                         \
-         std::cerr << APP_NAME << " " __FILE__ << ":"       \
-                   << __LINE__ << " ("                      \
-                   << __PRETTY_FUNCTION__ << ") Failed to " \
-                   << "evaluate: \"" << #EXP << "\""        \
-                   << std::endl;                            \
-         return 1;                                          \
-      }                                                     \
-   } while( 0 )
+   // Some simple checks:
+   assert( ef.exists( "SGKey1" ) == true );
+   assert( ef.exists( 0x102 ) == true );
+   assert( ef.exists( "SGKey3" ) == false );
+   assert( ef.exists( 0x123 ) == false );
+   assert( ef.get( 0x101 ) );
+   assert( ef.get( "SGKey2" ) );
+   assert( ef.get( 0x101 )->branchName() == "SGKey1" );
+   assert( ef.get( "SGKey1" )->className() == "xAOD::Type1" );
+   assert( ef.get( "SGKey2" )->hash() == 0x102 );
+   assert( ef.get( 0x102 )->parentName() == "Bla" );
+}
 
 int main() {
 
@@ -36,19 +34,20 @@ int main() {
    ef.add( xAOD::EventFormatElement( "SGKey1", "xAOD::Type1", "Bla", 0x101 ) );
    ef.add( xAOD::EventFormatElement( "SGKey2", "xAOD::Type2", "Bla", 0x102 ) );
 
-   // Some simple checks:
-   SIMPLE_ASSERT( ef.exists( "SGKey1" ) == true );
-   SIMPLE_ASSERT( ef.exists( 0x102 ) == true );
-   SIMPLE_ASSERT( ef.exists( "SGKey3" ) == false );
-   SIMPLE_ASSERT( ef.exists( 0x123 ) == false );
-   SIMPLE_ASSERT( ef.get( 0x101 ) );
-   SIMPLE_ASSERT( ef.get( "SGKey2" ) );
-   SIMPLE_ASSERT( ef.get( 0x101 )->branchName() == "SGKey1" );
-   SIMPLE_ASSERT( ef.get( "SGKey1" )->className() == "xAOD::Type1" );
-   SIMPLE_ASSERT( ef.get( "SGKey2" )->hash() == 0x102 );
-   SIMPLE_ASSERT( ef.get( 0x102 )->parentName() == "Bla" );
-
-   // And finally print it:
+   // Execute simple tests on it.
+   test1( ef );
+
+   // Test that the object can be copied correctly using the automatically
+   // generated constructors/copy operators.
+   xAOD::EventFormat copy1( ef );
+   xAOD::EventFormat copy2;
+   copy2 = ef;
+
+   // Test the two copies.
+   test1( copy1 );
+   test1( copy2 );
+
+   // And finally print the object.
    std::cout << ef << std::endl;
 
    // Return gracefully:
diff --git a/Event/xAOD/xAODEventFormatCnv/ATLAS_CHECK_THREAD_SAFETY b/Event/xAOD/xAODEventFormatCnv/ATLAS_CHECK_THREAD_SAFETY
new file mode 100644
index 000000000000..17d5abf4053f
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/ATLAS_CHECK_THREAD_SAFETY
@@ -0,0 +1 @@
+Event/xAOD/xAODEventFormatCnv
diff --git a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
index e7587ed6183d..b488fbda41a5 100644
--- a/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
+++ b/Event/xAOD/xAODEventFormatCnv/CMakeLists.txt
@@ -1,26 +1,90 @@
-################################################################################
-# Package: xAODEventFormatCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-# Declare the package name:
+# Declare the package name.
 atlas_subdir( xAODEventFormatCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Event/xAOD/xAODEventFormat
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthContainers
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate )
-
-# Component(s) in the package:
+find_package( xAODUtilities )
+
 atlas_add_component( xAODEventFormatCnv
-                     src/*.cxx
-                     src/components/*.cxx
-                     LINK_LIBRARIES xAODEventFormat GaudiKernel AthContainers AthenaBaseComps AthenaKernel StoreGateLib SGtests )
+  src/*.h src/*.cxx src/components/*.cxx
+  LINK_LIBRARIES
+    GaudiKernel AthenaKernel AthenaBaseComps StoreGateLib xAODEventFormat )
+
+atlas_add_component( xAODEventFormatCnvTest
+  src/test/*.h src/test/*.cxx
+  LINK_LIBRARIES
+    GaudiKernel
+    AthenaBaseComps
+    AthContainers
+    AthContainersInterfaces
+    StoreGateLib
+    xAODCore
+    xAODEventFormat )
+
+atlas_add_library( xAODEventFormatCnvTestLib
+  src/test/*.h src/test/*.cxx
+  PUBLIC_HEADERS xAODEventFormatCnv
+  PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES
+    GaudiKernel
+    AthenaKernel
+    AthContainers
+    AthContainersInterfaces
+    xAODCore
+    xAODEventFormat
+  PRIVATE_LINK_LIBRARIES AthenaBaseComps StoreGateLib )
+
+
+atlas_add_poolcnv_library( xAODEventFormatCnvTestAthenaPoolCnv
+  src/test/cnv/*.h src/test/cnv/*.cxx
+  FILES
+    xAODEventFormatCnv/test/A.h
+    xAODEventFormatCnv/test/AVec.h
+    xAODEventFormatCnv/test/AAuxContainer.h
+  TYPES_WITH_NAMESPACE
+    xAODMakerTest::A
+    xAODMakerTest::AVec
+    xAODMakerTest::AAuxContainer
+  CNV_PFX xAODMakerTest
+  LINK_LIBRARIES
+    AthenaPoolCnvSvcLib
+    AthenaPoolUtilities
+    AthContainers
+    xAODEventFormatCnvTestLib )
+
+atlas_add_dictionary( xAODEventFormatCnvTestDict
+  xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h
+  xAODEventFormatCnv/test/selection.xml
+  ${_selectionFile}
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES xAODCore xAODEventFormatCnvTestLib
+  EXTRA_FILES src/test/dict/*.cxx )
+
+atlas_add_xaod_smart_pointer_dicts(
+  INPUT xAODEventFormatCnv/test/selection.xml
+  OUTPUT _selectionFile
+  CONTAINERS "xAODMakerTest::AVec_v1" )
+
+
+# Install files from the package.
+atlas_install_joboptions( share/*.py )
+
+atlas_depends_on_subdirs(
+  PUBLIC
+  PRIVATE AtlasTest/TestTools )
+
+# Test(s) in the package.
+atlas_add_test( Write
+  SCRIPT athena.py --threads=8 xAODEventFormatCnv/EventFormatWriteTestJobOptions.py )
+
+atlas_add_test( Read
+  SCRIPT athena.py --threads=8 xAODEventFormatCnv/EventFormatReadTestJobOptions.py
+  PROPERTIES DEPENDS "xAODEventFormatCnv_Write_ctest" )
 
-# Install files from the package:
-atlas_install_headers( xAODEventFormatCnv )
+atlas_add_test( ReadWrite
+  SCRIPT athena.py --threads=8 xAODEventFormatCnv/EventFormatReadWriteJobOptions.py
+  PROPERTIES DEPENDS "xAODEventFormatCnv_Write_ctest" )
 
+atlas_add_test( Content
+  SCRIPT test/TestEventFormatContent.py readWriteTestStream0.pool.root EventFormat
+  PROPERTIES DEPENDS "xAODEventFormatCnv_ReadWrite_ctest" )
diff --git a/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadTestJobOptions.py b/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadTestJobOptions.py
new file mode 100644
index 000000000000..00c39c8f1483
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadTestJobOptions.py
@@ -0,0 +1,43 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""Test reading xAOD::EventFormat
+
+Read in POOL files created by the write test job options. Uses the metadata
+tool to transcribe the EventFormat metadata to the MetaDataStore. Then an
+algorithm reads the EventFormat from the MetaDataStore and prints the content.
+
+    Typical usage example
+        1. run: athena xAODEventFormatCnv/EventFormatWriteTestJobOptions.py
+        2. run: athena xAODEventFormatCnv/EventFormatReadTestJobOptions.py
+"""
+from AthenaCommon import CfgMgr
+from AthenaCommon.AlgSequence import AlgSequence
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+from AthenaCommon.AppMgr import theApp
+from AthenaCommon.AppMgr import ToolSvc
+import AthenaPoolCnvSvc.ReadAthenaPool
+
+
+# grab input files
+svcMgr.EventSelector.InputCollections = [
+    "testStream0.pool.root",
+    "testStream1.pool.root",
+    "testStream2.pool.root",
+    "testStream3.pool.root",
+    "testStream4.pool.root",
+]
+
+# propogate xAOD::EventFormat from InputMetaDataStore to MetaDataStore
+ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool(
+    "EventFormatMetaDataTool",
+    OutputLevel=1,
+)
+svcMgr.MetaDataSvc.MetaDataTools += [ToolSvc.EventFormatMetaDataTool]
+
+
+# Add the xAOD::EventFormat printer algorithm to main algorithm sequence
+algSeq = AlgSequence()
+algSeq += CfgMgr.xAODMakerTest__EventFormatPrinterAlg()
+
+# read the last event of the first file and the first event of the second file
+# to test metadata access across file boundary
+theApp.EvtMax = -1
diff --git a/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadWriteJobOptions.py b/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadWriteJobOptions.py
new file mode 100644
index 000000000000..3764709cce5d
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/share/EventFormatReadWriteJobOptions.py
@@ -0,0 +1,77 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""Test writing xAOD::EventFormat in job reading from input
+
+Read in POOL files created by the write test job options. Uses the metadata
+tool to transcribe the EventFormat metadata to the MetaDataStore. Then an
+algorithm reads the EventFormat from the MetaDataStore and prints the content.
+
+    Typical usage example
+        1. run: athena xAODEventFormatCnv/EventFormatWriteTestJobOptions.py
+        2. run: athena xAODEventFormatCnv/EventFormatReadWriteTestJobOptions.py
+"""
+from AthenaCommon import CfgMgr
+from AthenaCommon.AlgSequence import AlgSequence
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+from AthenaCommon.AppMgr import theApp
+from AthenaCommon.AppMgr import ToolSvc
+import AthenaPoolCnvSvc.ReadAthenaPool
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+
+VERBOSE = 1
+DEBUG = 2
+INFO = 3
+NUMBER_OF_STREAMS = 1
+
+
+def makeStream(name='TestStream'):
+    """create and return an output stream"""
+    test_stream = MSMgr.NewStream(
+        StreamName=name,
+        FileName="{}.pool.root".format(name),
+        noTag=True,
+    )
+    # Add dummy items for testing
+    test_stream.AddItem("xAOD::ElectronContainer#TestElectrons")
+    test_stream.AddItem("xAOD::ElectronAuxContainer#TestElectronsAux.")
+    return test_stream
+
+
+# grab input files
+svcMgr.EventSelector.InputCollections = [
+    "testStream0.pool.root",
+    "testStream1.pool.root",
+]
+
+# propogate xAOD::EventFormat from InputMetaDataStore to MetaDataStore
+ToolSvc += CfgMgr.xAODMaker__EventFormatMetaDataTool(
+    "EventFormatMetaDataTool",
+    OutputLevel=VERBOSE,
+)
+svcMgr.MetaDataSvc.MetaDataTools += [ToolSvc.EventFormatMetaDataTool]
+
+
+# Add the xAOD::EventFormat printer algorithm to main algorithm sequence
+algSeq = AlgSequence()
+algSeq += CfgMgr.xAODMakerTest__EventFormatPrinterAlg()
+
+
+# Add (an) xAOD creator algorithm(s) to the job.
+algSeq += CfgMgr.xAODMakerTest__ACreatorAlg(
+    "ACreator", OutputKey="TestObjects2"
+)
+
+# Write some output streams to file with this container.
+streams = [
+    makeStream('readWriteTestStream{}'.format(i)) for i in range(NUMBER_OF_STREAMS)
+]
+
+# Make sure event info is available
+algSeq += xAODMaker__EventInfoCnvAlg()
+
+svcMgr.MessageSvc.OutputLevel = INFO
+svcMgr.MetaDataSvc.OutputLevel = DEBUG
+
+# read the last event of the first file and the first event of the second file
+# to test metadata access across file boundary
+theApp.EvtMax = -1
diff --git a/Event/xAOD/xAODEventFormatCnv/share/EventFormatWriteTestJobOptions.py b/Event/xAOD/xAODEventFormatCnv/share/EventFormatWriteTestJobOptions.py
new file mode 100644
index 000000000000..20cd4fba85ff
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/share/EventFormatWriteTestJobOptions.py
@@ -0,0 +1,63 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+"""Test writing event format information
+
+Open an arbitrary number of streams to write to. An algorithm creates dummy
+electrons. The EventFormatStreamHelperTool creates the corresponding
+EventFormat metadata in the output stream.
+
+    Typical usage example:
+
+        athena xAODEventFormatCnv/EventFormatWriteTestJobOptions.py
+"""
+from AthenaCommon import CfgMgr
+from AthenaCommon.AlgSequence import AlgSequence
+from AthenaCommon.AppMgr import theApp
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
+from OutputStreamAthenaPool.MultipleStreamManager import MSMgr
+from xAODEventFormatCnv.xAODEventFormatCnvConf import xAODMaker__EventFormatStreamHelperTool
+
+
+DEBUG = 2
+INFO = 3
+EVENTS_PER_FILE = 5
+NUMBER_OF_STREAMS = 5
+
+
+def makeStream(name='TestStream'):
+    """create and return an output stream"""
+    test_stream = MSMgr.NewStream(
+        StreamName=name,
+        FileName="{}.pool.root".format(name),
+        noTag=True,
+    )
+    # Add dummy items for testing
+    test_stream.AddItem("xAODMakerTest::AVec#TestAVec")
+    test_stream.AddItem("xAODMakerTest::AAuxContainer#TestAAuxContainer.")
+    for tool in test_stream.GetEventStream().HelperTools:
+        if isinstance(tool, xAODMaker__EventFormatStreamHelperTool):
+            tool.TypeNames += ['.*xAODMakerTest::.*']
+            break
+    return test_stream
+
+
+algSeq = AlgSequence()
+
+# Add (an) xAOD creator algorithm(s) to the job.
+algSeq += CfgMgr.xAODMakerTest__ACreatorAlg(
+    "ACreator", OutputKey="TestObject"
+)
+
+# Write some output streams to file with this container.
+streams = [
+    makeStream('testStream{}'.format(i)) for i in range(NUMBER_OF_STREAMS)
+]
+
+# Make sure event info is available
+algSeq += xAODMaker__EventInfoCnvAlg()
+
+# Some extra job parameters.
+theApp.EvtMax = EVENTS_PER_FILE
+
+svcMgr.MessageSvc.OutputLevel = INFO
+svcMgr.MetaDataSvc.OutputLevel = DEBUG
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx
index c3092d2ac630..00de2a04b643 100644
--- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx
+++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.cxx
@@ -1,13 +1,13 @@
 // Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
 
 // $Id: EventFormatMetaDataTool.cxx 651874 2015-03-05 14:16:19Z krasznaa $
 
 // System include(s):
+#include <algorithm>
 #include <stdexcept>
+#include <utility>
+#include <vector>
 
 // Gaudi/Athena include(s):
 #include "AthenaKernel/errorcheck.h"
@@ -17,126 +17,132 @@
 
 namespace xAODMaker {
 
-   /// Name of the incident sent around for metadata writing
-   //static const char* METADATASTOP = "MetaDataStop";
-
-   EventFormatMetaDataTool::EventFormatMetaDataTool( const std::string& type,
-                                                     const std::string& name,
-                                                     const IInterface* parent )
-      : AthAlgTool( type, name, parent ),
-        m_inputMetaStore( "StoreGateSvc/InputMetaDataStore", name ),
-        m_outputMetaStore( "StoreGateSvc/MetaDataStore", name ),
-        m_format() {
-
-      declareProperty( "InputMetaStore", m_inputMetaStore );
-      declareProperty( "OutputMetaStore", m_outputMetaStore );
 
-      declareProperty( "InputKey", m_inputKey = "EventFormat" );
-      declareProperty( "OutputKey", m_outputKey = "EventFormat" );
-
-      declareInterface< ::IMetaDataTool >( this );
-   }
-
-   StatusCode EventFormatMetaDataTool::initialize() {
+EventFormatMetaDataTool::EventFormatMetaDataTool(const std::string& type,
+                                                 const std::string& name,
+                                                 const IInterface* parent):
+    AthAlgTool(type, name, parent) {
+      declareInterface< ::IMetaDataTool >(this);
+    }
 
+StatusCode
+    EventFormatMetaDataTool::initialize() {
       // Greet the user:
-      ATH_MSG_DEBUG( "Initialising - Package version: " << PACKAGE_VERSION );
-      ATH_MSG_DEBUG( "  InputMetaStore  = " << m_inputMetaStore );
-      ATH_MSG_DEBUG( "  OutputMetaStore = " << m_outputMetaStore );
-      ATH_MSG_DEBUG( "  InputKey  = " << m_inputKey );
-      ATH_MSG_DEBUG( "  OutputKey = " << m_outputKey );
+      ATH_MSG_DEBUG("Initialising - Package version: " << PACKAGE_VERSION);
+      ATH_MSG_DEBUG("  " << m_inputMetaStore);
+      ATH_MSG_DEBUG("  " << m_outputMetaStore);
+      ATH_MSG_DEBUG("  " << m_outputKey);
+      if (!m_inputKey.empty()) ATH_MSG_DEBUG("  " << m_inputKey);
 
       // Connect to the metadata stores:
-      ATH_CHECK( m_inputMetaStore.retrieve() );
-      ATH_CHECK( m_outputMetaStore.retrieve() );
-
-      // Reset the internal object if it exists:
-      m_format.reset();
+      ATH_CHECK(m_inputMetaStore.retrieve());
+      ATH_CHECK(m_outputMetaStore.retrieve());
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
-
-
-   StatusCode EventFormatMetaDataTool::beginInputFile()
-   {
-      StatusCode sc = collectMetaData();
-      if( sc.isFailure() ) {
-         REPORT_ERROR( sc )
-            << "Failed to collect metadata from the input file";
-         throw std::runtime_error( "Failed to collect trigger configuration "
-                                   "metadata from the input" );
-      } 
-      return StatusCode::SUCCESS;
-   }
-
+    }
 
-   StatusCode EventFormatMetaDataTool::endInputFile()
-   {
-      return StatusCode::SUCCESS;
-   }
+StatusCode
+    EventFormatMetaDataTool::beginInputFile() {
+      // lock the tool, so metaDataStop will wait for write to finish
+      std::lock_guard< std::mutex > guard(m_outputMutex);
 
+      // Create object to hold information from the new file
+      auto format = std::make_unique< xAOD::EventFormat >();
 
-   StatusCode EventFormatMetaDataTool::metaDataStop()
-   {
-      StatusCode sc = writeMetaData();
-      if( sc.isFailure() ) {
-         REPORT_ERROR( sc )
-            << "Failed to write metadata to the output store";
-         throw std::runtime_error( "Failed write xAOD::EventFormat "
-                                   "to the output" );
+      StatusCode sc = collectMetaData(format);
+      if (sc.isFailure()) {
+        REPORT_ERROR(sc) << "Failed to collect metadata from the input file";
+        throw std::runtime_error("Failed to collect event format "
+                                 "metadata from the input");
       }
+
+      ATH_CHECK(writeMetaData(format));
+
       return StatusCode::SUCCESS;
-   }
+    }
+
+StatusCode
+    EventFormatMetaDataTool::metaDataStop() {
+      // wait for threads currenly writing to finish
+      std::lock_guard< std::mutex > guard(m_outputMutex);
 
-   StatusCode EventFormatMetaDataTool::collectMetaData() {
+      return StatusCode::SUCCESS;
+    }
+
+StatusCode
+    EventFormatMetaDataTool::collectMetaData(
+        std::unique_ptr< xAOD::EventFormat >& format) {
+
+      std::vector< std::string > keys;
+      m_inputMetaStore->keys< xAOD::EventFormat >(keys);
+      if (!m_inputKey.empty()) keys.push_back(m_inputKey);
+
+      // remove duplicates
+      std::sort(keys.begin(), keys.end());
+      keys.erase(std::unique(keys.begin(), keys.end()), keys.end());
+
+      bool found = false;
+      for (auto itr = keys.begin(); itr != keys.end();) {
+        if (m_inputMetaStore->contains< xAOD::EventFormat >(*itr)) {
+          found = true;
+          ATH_MSG_DEBUG("Found xAOD::EventFormat with key " << *itr);
+          ++itr;
+        } else {
+          itr = keys.erase(itr);
+        }
+      }
 
       // If the input file doesn't have any event format metadata,
       // then finish right away:
-      if( ! m_inputMetaStore->contains< xAOD::EventFormat >( m_inputKey ) ) {
-         return StatusCode::SUCCESS;
-      }
+      if (!found) return StatusCode::SUCCESS;
 
       // Retrieve the input container:
-      const xAOD::EventFormat* input = 0;
-      ATH_CHECK( m_inputMetaStore->retrieve( input, m_inputKey ) );
-
-      // Create an output container if it doesn't exist yet:
-      if( ! m_format.get() ) {
-         ATH_MSG_DEBUG( "Creating output container" );
-         m_format.reset( new xAOD::EventFormat() );
-      }
-
-      // Merge the new object into the output one:
-      for( auto itr = input->begin(); itr != input->end(); ++itr ) {
-         if( ! m_format->exists( itr->second.hash() ) ) {
-            m_format->add( itr->second );
-         }
+      const xAOD::EventFormat* input = nullptr;
+      for (const std::string& key : keys) {
+        ATH_CHECK(m_inputMetaStore->retrieve(input, key));
+
+        // Merge the new object into the output one:
+        for (auto itr = input->begin(); itr != input->end(); ++itr) {
+          if (!format->exists(itr->second.hash())) {
+            format->add(itr->second);
+          }
+        }
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-   StatusCode EventFormatMetaDataTool::writeMetaData() {
+StatusCode
+    EventFormatMetaDataTool::writeMetaData(
+        std::unique_ptr< xAOD::EventFormat >& format) {
 
       // The output may already have such an object, coming from some
       // other source. Like the event format service.
-      if( m_outputMetaStore->contains< xAOD::EventFormat >( m_outputKey ) ) {
-         ATH_MSG_DEBUG( "xAOD::EventFormat object already in the output" );
-         return StatusCode::SUCCESS;
-      }
 
-      // Record the event format metadata, if any was found in the
-      // processed input files.
-      if( m_format.get() ) {
-         ATH_MSG_DEBUG( "Recording event format metadata" );
-         ATH_CHECK( m_outputMetaStore->record( std::move( m_format ),
-                                               m_outputKey ) );
+      xAOD::EventFormat * output =
+          m_outputMetaStore->tryRetrieve< xAOD::EventFormat >(m_outputKey);
+
+      if (output == nullptr) {
+
+        // Record the event format metadata, if any was found in the
+        // processed input files.
+        ATH_MSG_DEBUG("Recording event format metadata");
+        ATH_CHECK(m_outputMetaStore->record(std::move(format), m_outputKey));
+
+      } else {
+
+        ATH_MSG_DEBUG("updating existing xAOD::EventFormat object");
+        // Update the object in the MetaDataStore with new content
+        for (auto itr = format->begin(); itr != format->end(); ++itr)
+          if (!output->exists(itr->second.hash()))
+            output->add(itr->second);
+
       }
 
       // Return gracefully:
       return StatusCode::SUCCESS;
-   }
+    }
 
-} // namespace xAODMaker
+}  // namespace xAODMaker
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h
index b9337d63e0cb..4010ffa67531 100644
--- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h
+++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatMetaDataTool.h
@@ -1,19 +1,19 @@
 // Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
 
 // $Id: EventFormatMetaDataTool.h 651874 2015-03-05 14:16:19Z krasznaa $
-#ifndef XAODTRIGGERCNV_TRIGGERMENUMETADATATOOL_H
-#define XAODTRIGGERCNV_TRIGGERMENUMETADATATOOL_H
+#ifndef XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
+#define XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
 
 // System include(s):
 #include <string>
 #include <memory>
+#include <mutex>
 
 // Gaudi/Athena include(s):
+#include "Gaudi/Property.h"
 #include "GaudiKernel/ServiceHandle.h"
+#include "AthenaKernel/IMetaDataSvc.h"
 #include "AthenaKernel/IMetaDataTool.h"
 #include "AthenaBaseComps/AthAlgTool.h"
 #include "StoreGate/StoreGateSvc.h"
@@ -23,69 +23,75 @@
 
 namespace xAODMaker {
 
-   /// Tool taking care of copying the event format object from file to file
-   ///
-   /// This tool does the heavy lifting when fast-merging DxAOD files to
-   /// make sure that the xAOD::EventFormat metadata object is propagated
-   /// correctly from the input files to the output.
-   ///
-   /// @author Jack Cranshaw <cranshaw@anl.gov>
-   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-   ///
-   /// $Revision: 651874 $
-   /// $Date: 2015-03-05 15:16:19 +0100 (Thu, 05 Mar 2015) $
-   ///
-   class EventFormatMetaDataTool : public virtual ::IMetaDataTool,
-                                   public ::AthAlgTool {
-
-   public:
-      /// Regular AlgTool constructor
-      EventFormatMetaDataTool( const std::string& type, const std::string& name,
-                               const IInterface* parent );
-
-      /// Function initialising the tool
-      virtual StatusCode initialize();
-
-   /// Function collecting the metadata from a new input file
-   virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();}
-
-   /// Function collecting the metadata from a new input file
-   virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
-
-   /// Function writing the collected metadata to the output
-   virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
-
-      /// Function called when a new input file is opened
-      virtual StatusCode beginInputFile();
-  
-      /// Function called when the currently open input file got completely
-      /// processed
-      virtual StatusCode endInputFile();
-  
-      /// Function called when the tool should write out its metadata
-      virtual StatusCode metaDataStop();
-  
-   private:
-      /// Function collecting the event format metadata from the input file
-      StatusCode collectMetaData();
-      /// Function writing out the collected metadata
-      StatusCode writeMetaData();
-
-      /// Connection to the input metadata store
-      ServiceHandle< ::StoreGateSvc > m_inputMetaStore;
-      /// Connection to the output metadata store
-      ServiceHandle< ::StoreGateSvc > m_outputMetaStore;
-
-      /// The key of the trigger menu in the input file
-      std::string m_inputKey;
-      /// The key of the trigger menu for the output file
-      std::string m_outputKey;
-
-      /// The merged event format object
-      std::unique_ptr< xAOD::EventFormat > m_format;
-
-   }; // class EventFormatMetaDataTool
-
-} // namespace xAODMaker
-
-#endif // XAODTRIGGERCNV_TRIGGERMENUMETADATATOOL_H
+/// Tool taking care of copying the event format object from file to file
+///
+/// This tool does the heavy lifting when fast-merging DxAOD files to
+/// make sure that the xAOD::EventFormat metadata object is propagated
+/// correctly from the input files to the output.
+///
+/// @author Jack Cranshaw <cranshaw@anl.gov>
+/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+/// @author Frank Berghaus <fberghaus@anl.gov>
+///
+/// $Revision: 651874 $
+/// $Date: 2015-03-05 15:16:19 +0100 (Thu, 05 Mar 2015) $
+///
+class EventFormatMetaDataTool : public virtual ::IMetaDataTool, public ::AthAlgTool {
+ public:
+  /// Regular AlgTool constructor
+  EventFormatMetaDataTool(const std::string& type,
+                          const std::string& name,
+                          const IInterface* parent);
+
+  /// Function initialising the tool
+  virtual StatusCode initialize();
+
+  /// Function collecting the metadata from a new input file
+  virtual StatusCode beginInputFile(const SG::SourceID&) {return beginInputFile();}
+
+  /// Function collecting the metadata from a new input file
+  virtual StatusCode endInputFile(const SG::SourceID&) {return endInputFile();}
+
+  /// Wait for metadata write operations to finish, then returns SUCCESS
+  virtual StatusCode metaDataStop(const SG::SourceID&) {return metaDataStop();}
+
+  /// Function called when a new input file is opened
+  virtual StatusCode beginInputFile();
+
+  /// Function called when the currently open input file got completely
+  /// processed
+  virtual StatusCode endInputFile() {return StatusCode::SUCCESS;}
+
+  /// Wait for metadata write operations to finish, then return SUCCESS
+  virtual StatusCode metaDataStop();
+
+ private:
+  /// Function collecting the event format metadata from the input file
+  StatusCode collectMetaData(std::unique_ptr< xAOD::EventFormat >&);
+
+  /// Function writing out the collected metadata
+  StatusCode writeMetaData(std::unique_ptr< xAOD::EventFormat >&);
+
+  /// Connection to the input metadata store
+  ServiceHandle< ::StoreGateSvc > m_inputMetaStore{this, "InputMetaStore",
+    "StoreGateSvc/InputMetaDataStore", name()};
+
+  /// Connection to the output metadata store
+  ServiceHandle< IMetaDataSvc > m_outputMetaStore{this, "MetaDataSvc",
+    "MetaDataSvc", name()};
+
+  /// The key of the trigger menu in the input file
+  Gaudi::Property< std::string > m_inputKey{this, "InputKey", "",
+    "optionally specify the key of the xAOD::EventFormat in the input."};
+
+  /// The key of the trigger menu for the output file
+  Gaudi::Property< std::string > m_outputKey{this, "OutputKey",
+    "EventFormat", "Specifies the key of the xAOD::EventFormat object in "
+        "the MetaDataStore, default: EventFormat"};
+
+  /// MetaDataStop need to wait for ongoing writes
+  std::mutex m_outputMutex;
+};  // class EventFormatMetaDataTool
+}  // namespace xAODMaker
+
+#endif  // XAODEVENTFORMATCNV_EVENTFORMATMETADATATOOL
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.cxx b/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.cxx
new file mode 100644
index 000000000000..d74ee3ec5e7f
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.cxx
@@ -0,0 +1,124 @@
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+
+// Local include(s).
+#include "EventFormatStreamHelperTool.h"
+
+// system includes
+#include <memory>
+#include <regex>
+#include <utility>
+
+// EDM include(s).
+#include "xAODEventFormat/EventFormat.h"
+
+namespace xAODMaker {
+
+StatusCode
+    EventFormatStreamHelperTool::initialize() {
+      // Retrieve all needed components.
+      ATH_CHECK(m_metadataStore.retrieve());
+
+      // Return gracefully
+      return StatusCode::SUCCESS;
+    }
+
+StatusCode
+    EventFormatStreamHelperTool::postExecute() {
+      // Notify the event format service that it should collect the metadata
+      // that it needs.
+      ATH_CHECK(collectFormatMetadata());
+      ATH_MSG_VERBOSE("Triggered metadata collection on: " << m_key.value());
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+    }
+
+StatusCode
+    EventFormatStreamHelperTool::collectFormatMetadata() {
+      // Get the EventFormat object
+      xAOD::EventFormat * event_format =
+          m_metadataStore->tryRetrieve< xAOD::EventFormat >(m_key.value());
+
+      if (!event_format) {
+        auto p_event_format = std::make_unique< xAOD::EventFormat >();
+        event_format = p_event_format.get();
+        ATH_CHECK(m_metadataStore->record(std::move(p_event_format), m_key));
+        ATH_MSG_VERBOSE("Created new xAOD::EventFormat: " << m_key.value());
+      } else {
+        ATH_MSG_VERBOSE("Use existing xAOD::EventFormat: " << m_key.value());
+      }
+
+      // Ask StoreGate for all the objects that it's holding on to.
+      const std::vector< const SG::DataProxy* > proxies = evtStore()->proxies();
+
+      // Loop over the proxies.
+      for (const SG::DataProxy* proxy : proxies) {
+        // Construct the branch name that Athena I/O is going to give to
+        // this object.
+        const std::string branchName = proxy->name();
+
+        // Skip objects that were set up to be ignored.
+        {
+          bool ignoreObject = false;
+          for (const std::string& ignorePattern : m_ignoreKeys.value()) {
+            if (std::regex_match(branchName, std::regex(ignorePattern))) {
+              ignoreObject = true;
+              break;
+            }
+          }
+          if (ignoreObject == true) continue;
+        }
+
+        // Get the type name of this object.
+        std::string typeName;
+        if (m_clidSvc->getTypeInfoNameOfID(proxy->clID(), typeName).isFailure()) {
+          // Make sure that nobody else is using @c m_warnedCLIDs right now.
+          std::lock_guard< std::mutex > lock(m_warnedCLIDsMutex);
+
+          // Print a warning if this CLID didn't produce a warning yet:
+          if (m_warnedCLIDs.insert(proxy->clID()).second)
+            ATH_MSG_WARNING("Couldn't get type name for CLID = " << proxy->clID() );
+
+          continue;
+        }
+
+        // Now that we have the type name, check whether metadata for this type
+        // should be stored.
+        {
+          bool ignoreObject = true;
+          for (const std::string& typePattern : m_typeNames.value()) {
+            if (std::regex_match(typeName, std::regex(typePattern))) {
+              ignoreObject = false;
+              break;
+            }
+          }
+          if (ignoreObject) continue;
+        }
+
+        // Update the metadata object.
+        uint32_t hash = 0;
+        {
+          // Make sure that nobody else is modifying @c m_ef or @c m_spool
+          // right now.
+          std::lock_guard< std::mutex > lock(m_efMutex);
+          // If we already know about this object, then don't bother.
+          if (event_format->exists(branchName)) continue;
+
+          // Get the hash for this name.
+          hash = evtStore()->stringToKey(branchName, proxy->clID());
+          // Add the info.
+          event_format->add(xAOD::EventFormatElement(branchName, typeName, "", hash));
+        }
+
+        // Tell the user what happened.
+        ATH_MSG_VERBOSE("Adding info: branchName = \"" << branchName
+                        << ", typeName = \"" << typeName << "\""
+                        << ", hash = 0x" << std::hex << std::setw(8)
+                        << std::setfill('0') << hash);
+      }
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+    }
+
+}  // namespace xAODMaker
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.h b/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.h
new file mode 100644
index 000000000000..e8599cea961a
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/EventFormatStreamHelperTool.h
@@ -0,0 +1,95 @@
+// Dear emacs, this is -*- c++ -*-
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+#ifndef XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
+#define XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
+
+#include <mutex>
+#include <set>
+#include <string>
+#include <vector>
+
+// Gaudi/Athena include(s).
+#include "Gaudi/Property.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+#include "AthenaKernel/IAthenaOutputTool.h"
+#include "AthenaKernel/IMetaDataSvc.h"
+
+namespace xAODMaker {
+/// Tool creating and maintaining @c xAOD::EventFormat at the end-of-events
+///
+/// This tool is meant to be added to every xAOD output stream, so that it
+/// would maintain @c xAOD::EventFormat object every time a new event is
+/// written out.
+///
+/// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+/// @author Frank Berghaus <fberghaus@anl.gov>
+///
+class EventFormatStreamHelperTool : public extends< AthAlgTool, IAthenaOutputTool > {
+ public:
+  // Inherit the base class's constructor(s).
+  using extends::extends;
+
+  /// @name Interface inherited from @c AthAlgTool
+  /// @{
+
+  /// Initialise the tool
+  StatusCode initialize() override;
+
+  /// @}
+
+  /// @name Interface inherited from @c IAthenaOutputTool
+  /// @{
+
+  /// Called at the end of initialize
+  StatusCode postInitialize() override {return StatusCode::SUCCESS;}
+
+  /// Called at the beginning of execute
+  StatusCode preExecute() override {return StatusCode::SUCCESS;}
+
+  /// Called at the end of execute
+  StatusCode postExecute() override;
+
+  /// Called at the beginning of finalize
+  StatusCode preFinalize() override {return StatusCode::SUCCESS;}
+
+  /// Called at the 
+  StatusCode preStream() override {return StatusCode::SUCCESS;}
+
+  /// @}
+
+ private:
+  /// Use the metadata tool interface to store the EventFormat object
+  ServiceHandle< IMetaDataSvc > m_metadataStore{ this, "MetaDataSvc",
+    "MetaDataSvc", "The metadata service use to record the xAOD::EventFormat" };
+
+  /// Connection to the CLID service
+  ServiceHandle< IClassIDSvc > m_clidSvc{ this, "ClassIDSvc", "ClassIDSvc",
+    "The ClassID service instance to use" };
+
+  Gaudi::Property< std::string > m_key{ this, "Key", "EventInfo",
+    "Key for EventFormat object in metadata store" };
+
+  /// Type names for which a metadata entry should be added
+  Gaudi::Property< std::vector< std::string > > m_typeNames{ this,
+    "TypeNames", { ".*xAOD::.*" },
+    "Type names for which metadata entries are added" };
+
+  /// StoreGate keys that should be ignored during the metadata collection
+  Gaudi::Property< std::vector< std::string > > m_ignoreKeys{ this,
+    "IgnoreKeys", { "HLTAutoKey_.*" },
+    "SG keys that should be ignored during the metadata collection" };
+
+  StatusCode collectFormatMetadata();
+
+  /// CLIDs about which warnings have already been printed
+  std::set< CLID > m_warnedCLIDs;
+  /// Mutex for the @c m_warnedCLIDs variable
+  std::mutex m_warnedCLIDsMutex;
+
+  /// Mutex for the @c m_ef variable
+  mutable std::mutex m_efMutex;
+};  // class EventFormatStreamHelperTool
+}  // namespace xAODMaker
+
+#endif  // XAODEVENTFORMATCNV_EVENTFORMATSTREAMHELPERTOOL
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.cxx b/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.cxx
deleted file mode 100644
index 940f1ada2542..000000000000
--- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.cxx
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: EventFormatSvc.cxx 777715 2016-10-11 16:35:49Z ssnyder $
-
-// System include(s):
-#include <fstream>
-#include <ctime>
-#include <locale>
-
-// Athena/Gaudi include(s):
-#include "GaudiKernel/Incident.h"
-#include "GaudiKernel/System.h"
-#include "AthenaKernel/errorcheck.h"
-
-// EDM include(s):
-#include "AthContainers/AuxTypeRegistry.h"
-
-// Local include(s):
-#include "EventFormatSvc.h"
-
-namespace xAODMaker {
-
-   EventFormatSvc::EventFormatSvc( const std::string& name,
-                                   ISvcLocator* svcLoc )
-      : AthService( name, svcLoc ),
-        m_clidSvc( "ClassIDSvc", name ),
-        m_eventStore( "StoreGateSvc", name ),
-        m_metaStore( "MetaDataStore", name ),
-        m_incidentSvc( "IncidentSvc", name ),
-        m_warnedCLIDs(),
-        m_ef( 0 ), m_firstEvent( true ) {
-
-      declareProperty( "ObjectName", m_objectName = "EventFormat" );
-
-      declareProperty( "ClassIDSvc", m_clidSvc );
-      declareProperty( "EventStore", m_eventStore );
-      declareProperty( "MetaDataStore", m_metaStore );
-      declareProperty( "IncidentSvc", m_incidentSvc );
-      declareProperty( "FormatNames", m_formatNames );
-   }
-
-   StatusCode EventFormatSvc::initialize() {
-
-      // Greet the user:
-      ATH_MSG_INFO( "Initialising - Package version: " << PACKAGE_VERSION );
-      ATH_MSG_DEBUG( " Output object key: " << m_objectName );
-
-      // Retrieve the needed service(s):
-      CHECK( m_clidSvc.retrieve() );
-      CHECK( m_eventStore.retrieve() );
-      CHECK( m_metaStore.retrieve() );
-      CHECK( m_incidentSvc.retrieve() );
-
-      // Set up the service to listen to end-of-event incidents:
-      m_incidentSvc->addListener( this, IncidentType::EndEvent );
-
-      // Clean up:
-      m_warnedCLIDs.clear();
-
-      // Return gracefully:
-      return StatusCode::SUCCESS;
-   }
-
-   /**
-    * This function can be used by some client code to access the EventFormat
-    * object describing the contents of the event store.
-    *
-    * It's debatable how much use case there is for accessing this info in
-    * Athena, we'll have to see. The code could also be extended later on
-    * to allow access to the EventFormat object read from an input xAOD
-    * file. To be seen...
-    *
-    * @returns The EventFormat object describing the current contents of the
-    *          event store
-    */
-   const xAOD::EventFormat* EventFormatSvc::eventFormat() {
-
-      // Check if we already have an object:
-      if( ! m_ef ) {
-         // Request one then:
-         const Incident inc( "xAODMaker::EventFormatSvc",
-                             IncidentType::EndEvent );
-         handle( inc );
-         // Reset the first event flag, as we obviously didn't get to the
-         // end of the first event yet.
-         m_firstEvent = true;
-      }
-
-      // Return the object:
-      return m_ef;
-   }
-
-   void EventFormatSvc::handle( const Incident& inc ) {
-
-      // Tell the user what we're doing:
-      ATH_MSG_DEBUG( "Callback received with incident: "
-                     << inc.type() );
-
-      // Check that we received the correct incident:
-      if( inc.type() != IncidentType::EndEvent ) {
-         ATH_MSG_WARNING( "Unknown incident type received: "
-                          << inc.type() );
-         return;
-      }
-
-      // Create the object if it doesn't exist yet:
-      if( ! m_ef ) {
-         m_ef = new xAOD::EventFormat();
-         if (!m_metaStore->contains(ClassID_traits<xAOD::EventFormat>::ID(),m_objectName ) ) {
-            if( m_metaStore->record( m_ef, m_objectName ).isFailure() ) {
-               REPORT_MESSAGE( MSG::ERROR )
-                  << "Couldn't record xAOD::EventFormat object into the "
-                  << "metadata store with key: " << m_objectName;
-               delete m_ef; m_ef = 0;
-               return;
-            }
-         } else {
-            StatusCode sc = m_metaStore->retrieve(m_ef,m_objectName);
-            if (sc.isFailure()) {
-               REPORT_MESSAGE( MSG::ERROR ) 
-                   << "Couldn't retrieve xAOD::EventFormat object wit key: " << m_objectName;
-            }
-         }
-      }
-
-      // Collect information into the object:
-      const int newObjects = collectMetadata( *m_ef );
-      if( ( ! m_firstEvent ) && newObjects ) {
-         ATH_MSG_DEBUG( newObjects << " new objects encountered during "
-                        << "event processing (not the first event!)" );
-      }
-
-      // Now we're past the first event:
-      m_firstEvent = false;
-
-      return;
-   }
-
-   StatusCode EventFormatSvc::queryInterface( const InterfaceID& riid,
-                                              void** ppvIf ) {
-
-      // Check if the user asked for the IEventFormatSvc interface:
-      if( riid == IEventFormatSvc::interfaceID() ) {
-         *ppvIf = static_cast< IEventFormatSvc* >( this );
-         addRef();
-         return StatusCode::SUCCESS;
-      }
-      // Check if the user asked for the IIncidentListener interface:
-      else if( riid == IIncidentListener::interfaceID() ) {
-         *ppvIf = static_cast< IIncidentListener* >( this );
-         addRef();
-         return StatusCode::SUCCESS;
-      }
-
-      // If not, let the base class handle the request:
-      return AthService::queryInterface( riid, ppvIf );
-   }
-
-   /**
-    * This function is used internally to collect the necessary metadata
-    * from the event store (StoreGate) and fill the EventFormat object
-    * of the service.
-    *
-    * The function returns the number of "new" objects encountered, which
-    * should only be !=0 on the first event in principle. But by now we have
-    * a few use cases where this is not true...
-    *
-    * @param ef The EventFormat object to fill with the metadata
-    * @returns The number of "new" objects found in the event
-    */
-   int EventFormatSvc::collectMetadata( xAOD::EventFormat& ef ) {
-
-      // Ask StoreGate for all the object that it's holding on to:
-      const std::vector< const SG::DataProxy* > proxies =
-         m_eventStore->proxies();
-
-      // Number of new objects encountered:
-      int newObjects = 0;
-
-      // Loop over them:
-      std::vector< const SG::DataProxy* >::const_iterator itr = proxies.begin();
-      std::vector< const SG::DataProxy* >::const_iterator end = proxies.end();
-      for( ; itr != end; ++itr ) {
-
-         // Construct the branch name that Athena I/O is going to give to
-         // this object:
-         const std::string branchName = ( *itr )->name();
-
-         // Ignore the temporary containers created by the HLT, as those change
-         // event by event:
-         if( branchName.find( "HLTAutoKey_" ) == 0 ) continue;
-
-         // Get the type name of this object:
-         std::string typeName;
-         if( m_clidSvc->getTypeInfoNameOfID( ( *itr )->clID(),
-                                             typeName ).isFailure() ) {
-            // Print a warning if this CLID didn't produce a warning yet:
-            if( m_warnedCLIDs.insert( ( *itr )->clID() ).second ) {
-               ATH_MSG_WARNING( "Couldn't get type name for CLID = "
-                                << ( *itr )->clID() );
-            }
-            continue;
-         }
-
-         // Only consider xAOD objects. Note that the type name will not
-         // necessarily start with xAOD, but it should have it somewhere.
-         // Alternatively, the type name could be listed in FormatNames.
-         if( typeName.find( "xAOD" ) == std::string::npos &&
-             std::find (m_formatNames.begin(), m_formatNames.end(), typeName) ==
-             m_formatNames.end())
-         {
-           continue;
-         }
-
-         // Check if we already know about this object:
-         if( ef.exists( branchName ) ) continue;
-
-         // This will be a new object:
-         ++newObjects;
-
-         // Retrieve the hash of this name:
-         const uint32_t hash = m_eventStore->stringToKey( branchName,
-                                                          ( *itr )->clID() );
-
-         // Add the info:
-         ef.add( xAOD::EventFormatElement( branchName, typeName, "",
-                                           hash ) );
-
-         // Tell the user what happened:
-         ATH_MSG_VERBOSE( "Adding info: branchName = \"" << branchName
-                          << ", typeName = \"" << typeName << "\""
-                          << ", hash = 0x" << std::hex << std::setw( 8 )
-                          << std::setfill( '0' ) << hash );
-      }
-
-      // Return how many new objects were encountered:
-      return newObjects;
-   }
-
-} // namespace xAODMaker
diff --git a/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.h b/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.h
deleted file mode 100644
index b953d173076c..000000000000
--- a/Event/xAOD/xAODEventFormatCnv/src/EventFormatSvc.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: EventFormatSvc.h 721421 2016-02-02 15:17:05Z krasznaa $
-#ifndef XAODEVENTFORMATCNV_EVENTFORMATSVC_H
-#define XAODEVENTFORMATCNV_EVENTFORMATSVC_H
-
-// System include(s):
-#include <string>
-#include <set>
-
-// Gaudi/Athena include(s):
-#include "AthenaBaseComps/AthService.h"
-#include "GaudiKernel/ServiceHandle.h"
-#include "GaudiKernel/IIncidentListener.h"
-#include "GaudiKernel/IIncidentSvc.h"
-#include "AthenaKernel/IClassIDSvc.h"
-#include "StoreGate/StoreGateSvc.h"
-
-// xAOD include(s):
-#include "xAODEventFormat/EventFormat.h"
-
-// Local include(s):
-#include "xAODEventFormatCnv/IEventFormatSvc.h"
-
-namespace xAODMaker {
-
-   /**
-    *  @short Implementation of the IEventFormatSvc service interface
-    *
-    *         This class takes care of managing the xAOD::EventFormat
-    *         objects of the xAOD files.
-    *
-    * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-    *
-    * $Revision: 721421 $
-    * $Date: 2016-02-02 16:17:05 +0100 (Tue, 02 Feb 2016) $
-    */
-   class EventFormatSvc : public AthService,
-                          public virtual IEventFormatSvc,
-                          public virtual IIncidentListener {
-
-   public:
-      /// Regular Service constructor
-      EventFormatSvc( const std::string& name, ISvcLocator* svcLoc );
-
-      /// Function initialising the service
-      virtual StatusCode initialize();
-
-      /// @name Implementation of the IEventFormatSvc interface
-      /// @{
-
-      /// Get the object describing the current input/output file's format
-      const xAOD::EventFormat* eventFormat();
-
-      /// @}
-
-      /// Function handling the incoming incidents
-      virtual void handle( const Incident& inc );
-
-      /// Function communicating the implemented interfaces to Gaudi
-      virtual StatusCode queryInterface( const InterfaceID& riid,
-                                         void** ppvIf );
-
-   private:
-      /// Fill the internal object with metadata from the event
-      int collectMetadata( xAOD::EventFormat& ef );
-
-      /// StoreGate key of the EventFormat object
-      std::string m_objectName;
-
-      /// Connection to the CLID service
-      ServiceHandle< IClassIDSvc > m_clidSvc;
-      /// Connection to the event store
-      ServiceHandle< StoreGateSvc > m_eventStore;
-      /// Connection to the metadata store
-      ServiceHandle< StoreGateSvc > m_metaStore;
-      /// Connection to the incident service
-      ServiceHandle< IIncidentSvc > m_incidentSvc;
-      /// We automatically generate event format information for type names
-      /// that contain the string `xAOD'.  This property gives a list of
-      /// additional type names that should have format information.
-      std::vector< std::string > m_formatNames;
-
-      /// CLIDs about which warnings have already been printed
-      std::set< CLID > m_warnedCLIDs;
-
-      /// The object that we write out in the end
-      xAOD::EventFormat* m_ef;
-
-      /// Helper variable detecting the first event in the processing
-      bool m_firstEvent;
-
-   }; // class EventFormatSvc
-
-} // namespace xAODMaker
-
-#endif // XAODEVENTFORMATCNV_EVENTFORMATSVC_H
diff --git a/Event/xAOD/xAODEventFormatCnv/src/components/xAODEventFormatCnv_entries.cxx b/Event/xAOD/xAODEventFormatCnv/src/components/xAODEventFormatCnv_entries.cxx
index 448d539f5039..e27074b0650b 100644
--- a/Event/xAOD/xAODEventFormatCnv/src/components/xAODEventFormatCnv_entries.cxx
+++ b/Event/xAOD/xAODEventFormatCnv/src/components/xAODEventFormatCnv_entries.cxx
@@ -1,6 +1,11 @@
-#include "../EventFormatSvc.h"
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+
+// Local include(s).
 #include "../EventFormatMetaDataTool.h"
+#include "../EventFormatStreamHelperTool.h"
 
-DECLARE_COMPONENT( xAODMaker::EventFormatSvc )
+// Declare the components to Gaudi.
 DECLARE_COMPONENT( xAODMaker::EventFormatMetaDataTool )
-
+DECLARE_COMPONENT( xAODMaker::EventFormatStreamHelperTool )
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/AAuxContainer_v1.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/AAuxContainer_v1.cxx
new file mode 100644
index 000000000000..7345d3f1835a
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/AAuxContainer_v1.cxx
@@ -0,0 +1,44 @@
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/src/test/AAuxContainer_v1.xcx
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date Sep, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+
+
+#include "xAODEventFormatCnv/test/versions/AAuxContainer_v1.h"
+#include "AthContainersInterfaces/AuxDataOption.h"
+#include <stdexcept>
+
+
+#define CHECK_OPTION(ret)                       \
+  do {                                          \
+    if (!ret) {                                 \
+      ATH_MSG_ERROR("setOption failed");        \
+      return StatusCode::FAILURE;               \
+    }                                           \
+  } while(0)
+
+
+namespace xAODMakerTest {
+
+
+AAuxContainer_v1::AAuxContainer_v1()
+  : xAOD::AuxContainerBase()
+{
+  AUX_VARIABLE (anInt);
+  AUX_VARIABLE (aFloat);
+  AUX_VARIABLE (pVInt);
+  AUX_VARIABLE (pVFloat);
+
+  if (!pVInt.setOption(SG::AuxDataOption("nbits", 13)) ||
+      !pVFloat.setOption(SG::AuxDataOption("nbits", 13)) ||
+      !pVFloat.setOption(SG::AuxDataOption("nmantissa", 12)) )
+  {
+    throw std::runtime_error("Can't set packing options in AAuxContainer_v1");
+  }
+}
+
+
+} // namespace DMTest
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.cxx
new file mode 100644
index 000000000000..4a206cf430f0
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.cxx
@@ -0,0 +1,59 @@
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+
+// Local include(s).
+#include "ACreatorAlg.h"
+
+// EDM include(s).
+#include "xAODEventFormatCnv/test/A.h"
+#include "xAODEventFormatCnv/test/AVec.h"
+#include "xAODEventFormatCnv/test/AAuxContainer.h"
+
+// Framework include(s).
+#include "StoreGate/WriteHandle.h"
+
+// System include(s).
+#include <cmath>
+#include <memory>
+
+// Declare the type to Gaudi.
+DECLARE_COMPONENT( xAODMakerTest::ACreatorAlg )
+
+namespace xAODMakerTest {
+
+   StatusCode ACreatorAlg::initialize() {
+
+      // Initialise the data handle(s).
+      ATH_CHECK( m_outputKey.initialize() );
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+   }
+
+   StatusCode ACreatorAlg::execute( const EventContext& ctx ) const {
+
+      // Create a dummy electron container.
+      auto vec = std::make_unique< AVec >();
+      auto aux = std::make_unique< AAuxContainer >();
+      vec->setStore(aux.get());
+
+      // Fill it with some nonsensical content.
+      for( int i = 0; i < 10; ++i ) {
+         vec->push_back( std::make_unique< A >() );
+         auto a = vec->back();
+         a->aFloat( 1.0f );
+         a->anInt( 1 );
+         a->pVInt( std::vector< int >(10, 1) );
+         a->pVFloat( std::vector< float >(10, 1.0f) );
+      }
+
+      // Record it into the event store.
+      SG::WriteHandle< AVec > wh( m_outputKey, ctx );
+      ATH_CHECK( wh.record( std::move( vec ), std::move( aux ) ) );
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+   }
+
+} // namespace xAODMakerTest
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.h b/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.h
new file mode 100644
index 000000000000..827ca6013be2
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/ACreatorAlg.h
@@ -0,0 +1,54 @@
+// Dear emacs, this is -*- c++ -*-
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+#ifndef XAODEVENTFORMATCNV_TEST_ELECTRONCREATORALG_H
+#define XAODEVENTFORMATCNV_TEST_ELECTRONCREATORALG_H
+
+// Framework include(s).
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "StoreGate/WriteHandleKey.h"
+
+// EDM include(s).
+#include "xAODEventFormatCnv/test/AVec.h"
+
+/// Namespace holding test code for the xAOD maker components
+namespace xAODMakerTest {
+
+   /// Algorithm creating a dummy @c xAODMakerTest::AVec
+   ///
+   /// This algorithm can be used to test the functionality of the
+   /// xAODEventFormatCnv code. It just creates a dummy
+   /// @c xAODMkerTest::AVec container that can then be used to create
+   /// a test file.
+   ///
+   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+   /// @author Frank Berghaus <fberghaus@anl.gov>
+   ///
+   class ACreatorAlg : public AthReentrantAlgorithm {
+
+   public:
+      // Use the base class's constructor
+      using AthReentrantAlgorithm::AthReentrantAlgorithm;
+
+      /// @name Interface inherited from @c AthReentrantAlgorithm
+      /// @{
+
+      /// Initialise the algorithm
+      virtual StatusCode initialize() override;
+      /// Execute the algorithm for one event
+      virtual StatusCode execute( const EventContext& ctx ) const override;
+
+      /// @}
+
+   private:
+      /// Key for the electron container created by the algorithm
+      SG::WriteHandleKey< AVec > m_outputKey { this,
+         "OutputKey", "TestObject",
+         "Key for the object container created by the algorithm" };
+
+   };  // class ElectronCreatorAlg
+
+}  // namespace xAODMakerTest
+
+#endif  // XAODEVENTFORMATCNV_TEST_ELECTRONCREATORALG_H
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/A_v1.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/A_v1.cxx
new file mode 100644
index 000000000000..9bb6d69d43a6
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/A_v1.cxx
@@ -0,0 +1,25 @@
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/src/test/A_v1.cxx
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date May, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+#include "xAODEventFormatCnv/test/versions/A_v1.h"
+#include "xAODCore/AuxStoreAccessorMacros.h"
+
+
+namespace xAODMakerTest {
+
+
+AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (A_v1, float,        aFloat, aFloat)
+AUXSTORE_PRIMITIVE_SETTER_AND_GETTER (A_v1, int,          anInt,  anInt)
+
+AUXSTORE_OBJECT_SETTER_AND_GETTER (A_v1, std::vector<int>, pVInt, pVInt)
+AUXSTORE_OBJECT_MOVE (A_v1, std::vector<int>, pVInt, pVInt)
+
+AUXSTORE_OBJECT_SETTER_AND_GETTER (A_v1, std::vector<float>, pVFloat, pVFloat)
+AUXSTORE_OBJECT_MOVE (A_v1, std::vector<float>, pVFloat, pVFloat)
+
+
+}  // namespace xAODMakerTest
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.cxx
new file mode 100644
index 000000000000..90de45bcfcd5
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.cxx
@@ -0,0 +1,38 @@
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+
+// Local include(s).
+#include "EventFormatPrinterAlg.h"
+
+// EDM include(s).
+#include "xAODEventFormat/EventFormat.h"
+
+#include "StoreGate/ReadHandle.h"
+
+// Declare the type to Gaudi.
+DECLARE_COMPONENT( xAODMakerTest::EventFormatPrinterAlg )
+
+namespace xAODMakerTest {
+
+   StatusCode EventFormatPrinterAlg::initialize() {
+
+      // Initialise the data handle(s).
+      ATH_CHECK( m_metaDataStore.retrieve() );
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+   }
+
+   StatusCode EventFormatPrinterAlg::execute() {
+      // Read and print the event format object.
+      const xAOD::EventFormat * ef =
+          m_metaDataStore->tryConstRetrieve< xAOD::EventFormat >(m_eventFormatKey);
+      if (ef) ATH_MSG_INFO( "Event format:\n" << *ef );
+      else return StatusCode::FAILURE;
+
+      // Return gracefully.
+      return StatusCode::SUCCESS;
+   }
+
+} // namespace xAODMakerTest
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.h b/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.h
new file mode 100644
index 000000000000..1c2ccb0f4691
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/EventFormatPrinterAlg.h
@@ -0,0 +1,56 @@
+// Dear emacs, this is -*- c++ -*-
+//
+// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//
+#ifndef XAODEVENTFORMATCNV_TEST_EVENTFORMATPRINTERALG_H
+#define XAODEVENTFORMATCNV_TEST_EVENTFORMATPRINTERALG_H
+
+// Framework include(s).
+#include "Gaudi/Property.h"
+#include "GaudiKernel/ServiceHandle.h"
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "AthenaKernel/IMetaDataSvc.h"
+#include "xAODEventFormat/EventFormat.h"
+
+// System include(s).
+#include <string>
+
+namespace xAODMakerTest {
+
+   /// Algorithm printing an @c xAOD::EventFormat object's payload
+   ///
+   /// This is used to debug/test the functionality of the @c xAOD::EventFormat
+   /// creator components of the package.
+   ///
+   /// @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
+   ///
+   class EventFormatPrinterAlg : public AthAlgorithm {
+
+   public:
+      /// Inherit the base class's constructor
+      using AthAlgorithm::AthAlgorithm;
+
+      /// @name Interface inherited from @c AthAlgorithm
+      /// @{
+
+      /// Initialise the algorithm
+      virtual StatusCode initialize() override;
+      /// Execute the algorithm for one event
+      virtual StatusCode execute() override;
+
+      /// @}
+
+   private:
+      /// Key for the @c xAOD::EventFormat object to read
+      Gaudi::Property< std::string > m_eventFormatKey{this, "EventFormatKey",
+        "EventFormat", "Key to retrieve xAOD::EventFormat, default: EventFormat"
+      };
+
+      ServiceHandle< IMetaDataSvc > m_metaDataStore{this, "MetaDataSvc",
+        "MetaDataSvc", name()
+      };
+   };  // class EventFormatPrinterAlg
+
+} // namespace xAODMakerTest
+
+#endif // XAODEVENTFORMATCNV_TEST_EVENTFORMATPRINTERALG_H
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.cxx
new file mode 100644
index 000000000000..10e67cf89bd4
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.cxx
@@ -0,0 +1,6 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+// Event/xAOD/xAODEgammaAthenaPool/src/xAODElectronAuxContainerCnv.cxx
+// Dummy file so that the build system knows that this is a custom converter.
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.h b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.h
new file mode 100644
index 000000000000..ae46e41e44c1
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv.h
@@ -0,0 +1,19 @@
+// Dear emacs, this is -*- c++ -*-
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+#ifndef XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_H
+#define XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_H
+
+// Gaudi/Athena include(s):
+#include "AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.h"
+
+// EDM include(s):
+#include "xAODEventFormatCnv/test/AAuxContainer.h"
+#include "xAODAAuxContainerCnv_v1.h"
+
+/// Base class for the converter
+typedef T_AthenaPoolAuxContainerCnv< xAODMakerTest::AAuxContainer,
+                                     xAODAAuxContainerCnv_v1 >
+   xAODAAuxContainerCnv;
+
+
+#endif  // XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_H
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.cxx
new file mode 100644
index 000000000000..25fb9f729d6c
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.cxx
@@ -0,0 +1,86 @@
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+#include "xAODAAuxContainerCnv_v1.h"
+
+// System include(s):
+#include <memory>
+#include <stdexcept>
+
+// Gaudi/Athena include(s):
+#include "GaudiKernel/MsgStream.h"
+
+// Core EDM include(s):
+#include "AthContainers/tools/copyAuxStoreThinned.h"
+
+// Local include(s):
+#include "xAODEventFormatCnv/test/A.h"
+#include "xAODEventFormatCnv/test/versions/A_v1.h"
+#include "xAODEventFormatCnv/test/AVec.h"
+#include "xAODEventFormatCnv/test/versions/AVec_v1.h"
+
+/// Convenience macro for setting the level of output messages
+#define MSGLVL MSG::DEBUG
+
+/// Another convenience macro for printing messages in the converter
+#define ATH_MSG( MSG )                          \
+   do {                                         \
+      if( log.level() <= MSGLVL ) {             \
+         log << MSGLVL << MSG << endmsg;        \
+      }                                         \
+   } while( 0 )
+
+xAODAAuxContainerCnv_v1::xAODAAuxContainerCnv_v1()
+{
+}
+
+void xAODAAuxContainerCnv_v1::
+persToTrans( const xAODMakerTest::AAuxContainer_v1* oldObj,
+             xAODMakerTest::AAuxContainer* newObj,
+             MsgStream& log ) const {
+
+   // Greet the user:
+   ATH_MSG( "Converting xAODMaker::AAuxContainer_v1 to current version..." );
+
+   // Clear the transient object:
+   newObj->resize( 0 );
+
+   // Copy the payload of the v1 object into the latest one by misusing
+   // the thinning code a bit...
+   SG::copyAuxStoreThinned( *oldObj, *newObj, 0 );
+
+   // Set up interface containers on top of them:
+
+   //The old uses v_1
+   xAODMakerTest::AVec_v1 oldInt;
+   for( size_t i = 0; i < oldObj->size(); ++i ) { 
+     oldInt.push_back( std::make_unique< xAODMakerTest::A_v1 >() ); 
+   }
+   oldInt.setStore( oldObj );
+   
+   xAODMakerTest::AVec newInt;
+   for( size_t i = 0; i < newObj->size(); ++i ) { 
+     newInt.push_back( std::make_unique< xAODMakerTest::A >() );
+   }
+   newInt.setStore( newObj );
+
+   // Print what happened:
+   ATH_MSG( "Converting xAODMakerTest::AAuxContainer_v1 to current version "
+            "[OK]" );
+
+   return;
+}
+
+/// This function should never be called, as we are not supposed to convert
+/// object before writing.
+void xAODAAuxContainerCnv_v1::
+transToPers( const xAODMakerTest::AAuxContainer*,
+             xAODMakerTest::AAuxContainer_v1*,
+             MsgStream& log ) const {
+
+   log << MSG::ERROR
+       << "Somebody called xAODAAuxContainerCnv_v1::transToPers"
+       << endmsg;
+   throw std::runtime_error( "Somebody called xAODAAuxContainerCnv_v1::"
+                             "transToPers" );
+
+   return;
+}
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.h b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.h
new file mode 100644
index 000000000000..8b9c4b71633f
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODAAuxContainerCnv_v1.h
@@ -0,0 +1,36 @@
+// Dear emacs, this is -*- c++ -*-
+/*  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+#ifndef XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_V1_H
+#define XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_V1_H
+
+// Gaudi/Athena include(s):
+#include "AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h"
+
+// EDM include(s):
+#include "xAODEventFormatCnv/test/versions/AAuxContainer_v1.h"
+#include "xAODEventFormatCnv/test/AAuxContainer.h"
+
+class xAODAAuxContainerCnv_v1 :
+   public T_AthenaPoolTPCnvConstBase< xAODMakerTest::AAuxContainer,
+                                      xAODMakerTest::AAuxContainer_v1 > {
+
+public:
+  using base_class::transToPers;
+  using base_class::persToTrans;
+
+
+   /// Default constructor
+   xAODAAuxContainerCnv_v1();
+
+   /// Function converting from the old type to the current one
+   virtual void persToTrans( const xAODMakerTest::AAuxContainer_v1* oldObj,
+                             xAODMakerTest::AAuxContainer* newObj,
+                             MsgStream& log ) const override;
+   /// Dummy function inherited from the base class
+   virtual void transToPers( const xAODMakerTest::AAuxContainer*,
+                             xAODMakerTest::AAuxContainer_v1*,
+                             MsgStream& log ) const override;
+
+};
+
+#endif  // XAODEVENTFORMATCNV_TEST_XAODAAUXCONTAINERCNV_V1_H
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODEventFormatCnvTestCnv.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODEventFormatCnvTestCnv.cxx
new file mode 100644
index 000000000000..4c686489e9d3
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/cnv/xAODEventFormatCnvTestCnv.cxx
@@ -0,0 +1,21 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+
+// $Id: xAODEventFormatCnv/testAthenaPoolTPCnv.cxx 619884 2014-10-03 15:00:40Z christos $
+
+// Gaudi/Athena include(s):
+#include "AthenaKernel/TPCnvFactory.h"
+
+// EDM include(s):
+#include "xAODEventFormatCnv/test/AAuxContainer.h"
+#include "xAODEventFormatCnv/test/versions/AAuxContainer_v1.h"
+
+// Local include(s):
+#include "xAODAAuxContainerCnv_v1.h"
+
+// Declare the T/P converter(s):
+DECLARE_TPCNV_FACTORY( xAODAAuxContainerCnv_v1,
+                       xAODMakerTest::AAuxContainer,
+                       xAODMakerTest::AAuxContainer_v1,
+                       Athena::TPCnvVers::Old )
diff --git a/Event/xAOD/xAODEventFormatCnv/src/test/dict/ContainerProxies.cxx b/Event/xAOD/xAODEventFormatCnv/src/test/dict/ContainerProxies.cxx
new file mode 100644
index 000000000000..1d1a19ec1240
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/src/test/dict/ContainerProxies.cxx
@@ -0,0 +1,6 @@
+/* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */
+
+#include "xAODCore/AddDVProxy.h"
+#include "xAODEventFormatCnv/test/AVec.h"
+
+ADD_NS_DV_PROXY (xAODMakerTest, AVec);
diff --git a/Event/xAOD/xAODEventFormatCnv/test/TestEventFormatContent.py b/Event/xAOD/xAODEventFormatCnv/test/TestEventFormatContent.py
new file mode 100755
index 000000000000..a7c1810c013e
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/test/TestEventFormatContent.py
@@ -0,0 +1,71 @@
+#!/usr/bin/env python
+# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+"""Read in a given file and return how often given metadata item appears
+
+Use MetaReader to look up metadata items in a given file. Search for the given
+key in each key found in the list of metadata items. If the number of matches
+is 1 return success else return failure.
+
+    Common usgage example:
+
+        In a shell:
+            if TestEventFormatContent.py file.pool.root metadata_key; then
+                echo "found one"
+            else
+                echo "found none or many"
+            fi
+"""
+import argparse
+from functools import reduce
+import logging
+import sys
+import PyUtils.MetaReader
+
+
+def main():
+    """parse aruments and return number of matches"""
+    parser = argparse.ArgumentParser(
+        description=""""
+        Read in a given file and return the number of times metadata items with
+        a name matching the given term appear.
+        """
+    )
+
+    parser.add_argument(
+        "file", metavar="FILE", help="the file to read"
+    )
+
+    parser.add_argument(
+        "key", metavar="KEY", help="the key to search for"
+    )
+
+    args = parser.parse_args()
+
+    # silence meta reader
+    reader_msg = logging.getLogger("MetaReader")
+    reader_msg.setLevel(logging.WARNING)
+
+    # get the list of metadata items of the file
+    try:
+        metadata = next(
+            iter(
+                PyUtils.MetaReader.read_metadata([args.file]).items()
+            )
+        )[1]['metadata_items']
+    except (OSError,):
+        print("cannot read metadata from ", args.file)
+        sys.exit(1)
+
+    matches = reduce(
+        lambda n, key: n + 1 if args.key in key else n,
+        [0] + list(metadata)
+    )
+
+    if matches == 1:
+        return 0
+
+    return 1
+
+
+if __name__ == "__main__":
+    main()
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/IEventFormatSvc.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/IEventFormatSvc.h
deleted file mode 100644
index cb665d2b5ec2..000000000000
--- a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/IEventFormatSvc.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Dear emacs, this is -*- c++ -*-
-
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-// $Id: IEventFormatSvc.h 603941 2014-06-27 11:51:35Z krasznaa $
-#ifndef XAODEVENTFORMATCNV_IEVENTFORMATSVC_H
-#define XAODEVENTFORMATCNV_IEVENTFORMATSVC_H
-
-// System include(s):
-#include <iosfwd>
-
-// Gaudi/Athena include(s):
-#include "GaudiKernel/IService.h"
-
-// xAOD include(s):
-#include "xAODEventFormat/EventFormat.h"
-
-/// Namespace for all the xAOD making code
-namespace xAODMaker {
-
-   /// The interface provided by IEventFormatSvc
-   static const InterfaceID
-   IID_IEventFormatSvc( "xAODMaker::IEventFormatSvc", 1, 0 );
-
-   /**
-    *  @short Interface for the service creating the xAOD event format object
-    *
-    *         Client code can use this interface within Athena to interact with
-    *         the event format description of the xAOD files.
-    *
-    * @author Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
-    *
-    * $Revision: 603941 $
-    * $Date: 2014-06-27 13:51:35 +0200 (Fri, 27 Jun 2014) $
-    */
-   class IEventFormatSvc : public virtual IService {
-
-   public:
-      /// Get the object describing the current input/output file's format
-      virtual const xAOD::EventFormat* eventFormat() = 0;
-
-      /// Gaudi interface definition
-      static const InterfaceID& interfaceID() {
-         return IID_IEventFormatSvc;
-      }
-
-   }; // class IEventFormatSvc
-
-} // namespace xAODMaker
-
-#endif // XAODEVENTFORMATCNV_IEVENTFORMATSVC_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/A.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/A.h
new file mode 100644
index 000000000000..5fee7ce3eeb9
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/A.h
@@ -0,0 +1,23 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/test/A.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date Sep, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+
+#ifndef XAODEVENTFORMATCNV_TEST_A_H
+#define XAODEVENTFORMATCNV_TEST_A_H
+
+#include "xAODEventFormatCnv/test/versions/A_v1.h"
+
+
+namespace xAODMakerTest { typedef A_v1 A; }
+
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF (xAODMakerTest::A, 169367265, 1)
+
+
+#endif  // XAODEVENTFORMATCNV_TEST_A_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AAuxContainer.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AAuxContainer.h
new file mode 100644
index 000000000000..5d0becd41842
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AAuxContainer.h
@@ -0,0 +1,23 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/test/AAuxContainer.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date Sep, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+#ifndef XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_H
+#define XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_H
+
+
+#include "xAODEventFormatCnv/test/versions/AAuxContainer_v1.h"
+
+
+namespace xAODMakerTest { typedef AAuxContainer_v1 AAuxContainer; }
+
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF (xAODMakerTest::AAuxContainer, 1189570278, 1)
+
+
+#endif  // XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AVec.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AVec.h
new file mode 100644
index 000000000000..38c7d3c3f099
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/AVec.h
@@ -0,0 +1,21 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/test/AVec.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date Sep, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+#ifndef XAODEVENTFORMATCNV_TEST_AVEC_H
+#define XAODEVENTFORMATCNV_TEST_AVEC_H
+
+#include "xAODEventFormatCnv/test/versions/AVec_v1.h"
+
+
+namespace xAODMakerTest{ typedef AVec_v1 AVec;}
+
+
+#include "xAODCore/CLASS_DEF.h"
+CLASS_DEF( xAODMakerTest::AVec , 48660174 , 1 )
+
+#endif  // XAODEVENTFORMATCNV_TEST_AVEC_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/selection.xml b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/selection.xml
new file mode 100755
index 000000000000..eeabbbc22faa
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/selection.xml
@@ -0,0 +1,8 @@
+<lcgdict>
+
+        <class name="xAODMakerTest::A_v1" />
+        <class name="xAODMakerTest::AVec_v1" />
+        <class name="xAODMakerTest::AAuxContainer_v1" />
+        <class name="SG::AuxElement::ConstAccessor<ElementLink<xAODMakerTest::AVec_v1> >" />
+
+</lcgdict>
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AAuxContainer_v1.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AAuxContainer_v1.h
new file mode 100644
index 000000000000..b1833d1da732
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AAuxContainer_v1.h
@@ -0,0 +1,41 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/test/versions/AAuxContainer_v1.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date May, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+#ifndef XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_V1_H
+#define XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_V1_H
+
+
+#include "xAODCore/AuxContainerBase.h"
+#include "AthContainers/PackedContainer.h"
+#include "AthenaKernel/BaseInfo.h"
+#include <vector>
+
+
+namespace xAODMakerTest {
+
+class AAuxContainer_v1
+  : public xAOD::AuxContainerBase
+{
+public:
+  AAuxContainer_v1();
+
+private:
+  std::vector<int> anInt;
+  std::vector<float> aFloat;
+  SG::PackedContainer<std::vector<int> >  pVInt;
+  SG::PackedContainer<std::vector<float> >  pVFloat;
+};
+
+
+}  // namespace xAODMakerTest
+
+
+SG_BASE (xAODMakerTest::AAuxContainer_v1, xAOD::AuxContainerBase);
+
+
+#endif  // XAODEVENTFORMATCNV_TEST_AAUXCONTAINER_V1_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AVec_v1.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AVec_v1.h
new file mode 100644
index 000000000000..06efb6c4d106
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/AVec_v1.h
@@ -0,0 +1,18 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration */
+
+/**
+ * @file xAODEventFormat/test/versions/AVec_v1.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date May, 2020
+ * @brief Class used for testing xAOD::EventFormat data reading/writing.
+ */
+#ifndef XAODEVENTFORMATCNV_TEST_AVEC_V1_H
+#define XAODEVENTFORMATCNV_TEST_AVEC_V1_H
+
+#include "xAODEventFormatCnv/test/versions/A_v1.h"
+#include "AthContainers/DataVector.h"
+
+namespace xAODMakerTest { typedef DataVector<A_v1> AVec_v1; } 
+
+#endif  // XAODEVENTFORMATCNV_TEST_AVEC_V1_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/A_v1.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/A_v1.h
new file mode 100644
index 000000000000..5d39f522f7b3
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/versions/A_v1.h
@@ -0,0 +1,43 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration */
+
+/**
+ * @file xAODEventFormatCnv/test/versions/A_v1.h
+ * @author Frank Berghaus <fberghaus@anl.gov>
+ * @date Sep, 2020
+ * @brief Class used for testing xAOD::EventFormat reading/writing.
+ */
+#ifndef XAODEVENTFORMATCNV_TEST_A_V1_H
+#define XAODEVENTFORMATCNV_TEST_A_V1_H
+
+#include "AthContainers/AuxElement.h"
+#include "AthenaKernel/BaseInfo.h"
+
+
+namespace xAODMakerTest {
+
+class A_v1
+  : public SG::AuxElement
+{
+public:
+  float aFloat() const;
+  void aFloat(float f);
+
+  int anInt() const;
+  void anInt(int i);
+
+  const std::vector<int>& pVInt() const;
+  void pVInt (const std::vector<int>&);
+  void pVInt (std::vector<int>&&);
+
+  const std::vector<float>& pVFloat() const;
+  void pVFloat (const std::vector<float>&);
+  void pVFloat (std::vector<float>&&);
+};
+
+} // namespace xAODMakerTest
+
+
+SG_BASE(xAODMakerTest::A_v1, SG::AuxElement);
+
+#endif  // XAODEVENTFORMATCNV_TEST_A_V1_H
diff --git a/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h
new file mode 100755
index 000000000000..bd7c6f9b42b3
--- /dev/null
+++ b/Event/xAOD/xAODEventFormatCnv/xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h
@@ -0,0 +1,23 @@
+// This file's extension implies that it's C, but it's really -*- C++ -*-.
+/* Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */
+/**
+ * @file xAODEventFormatCnv/test/xAODEventFormatCnvTestDict.h
+ * @author frank berghaus <fberghaus@anl.gov>
+ * @date Nov 2020
+ * @brief Dictionary generation header
+ */
+
+#ifndef XAODEVENTFORMATCNVTESTDICT_H
+#define XAODEVENTFORMATCNVTESTDICT_H
+
+
+#include "xAODEventFormatCnv/test/A.h"
+#include "xAODEventFormatCnv/test/AVec.h"
+#include "xAODEventFormatCnv/test/AAuxContainer.h"
+#include "AthContainers/AuxElement.h"
+#include "AthLinks/ElementLink.h"
+
+
+template class SG::AuxElement::ConstAccessor<ElementLink<xAODMakerTest::AVec> >;
+
+#endif  // XAODEVENTFORMATCNVTESTDICT_H
diff --git a/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py b/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py
index 2423eff07bb2..07a22ffb9341 100644
--- a/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py
+++ b/Event/xAOD/xAODForwardCnv/share/xAODForwardCnv_jobOptions.py
@@ -25,10 +25,6 @@ xAODMBTSModuleCreator()
 from xAODForwardCnv.xAODForwardEventInfoCreator import xAODForwardEventInfoCreator
 xAODForwardEventInfoCreator()
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Check what happened to the stream:
 xaodStream.Print()
 
diff --git a/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py b/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py
index d37037004bb2..d4fc97fe4579 100644
--- a/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py
+++ b/Event/xAOD/xAODTrigCaloCnv/share/xAODTrigCaloCnv_jobOptions.py
@@ -38,10 +38,6 @@ xaodStream.AddItem( "xAOD::TrigCaloClusterAuxContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TrigEMClusterContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TrigEMClusterAuxContainer_v1#*" )
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Check what happened to the stream:
 xaodStream.Print()
 
diff --git a/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py b/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py
index 9d3bee49d409..3dd9a4911257 100755
--- a/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py
+++ b/Event/xAOD/xAODTrigMinBiasCnv/share/xAODTrigMinBiasCnv_jobOptions.py
@@ -33,10 +33,6 @@ xAODTrigT2MbtsBitsCreator()
 from xAODTrigMinBiasCnv.xAODTrigSpacePointCountsCreator import  xAODTrigSpacePointCountsCreator
 xAODTrigSpacePointCountsCreator()
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Check what happened to the stream:
 xaodStream.Print()
 
diff --git a/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py b/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py
index 3c8fd8f36c00..e4f342a42513 100644
--- a/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py
+++ b/Event/xAOD/xAODTrigMissingETCnv/share/xAODTrigMissingETCnv_jobOptions.py
@@ -25,10 +25,6 @@ from xAODTrigMissingETCnv.xAODTrigMissingETCreator import \
     xAODTrigMissingETCreator
 xAODTrigMissingETCreator()
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Check what happened to the stream:
 xaodStream.Print()
 
diff --git a/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py b/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py
index 04a14fc35424..fa025d4c6460 100644
--- a/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py
+++ b/Event/xAOD/xAODTriggerCnv/share/xAODTriggerCnv_jobOptions.py
@@ -46,10 +46,6 @@ xaodStream.AddItem( "xAOD::VertexAuxContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TauJetContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TauJetAuxContainer_v1#*" )
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Check what happened to the stream:
 xaodStream.Print()
 
diff --git a/Projects/AthSimulation/package_filters.txt b/Projects/AthSimulation/package_filters.txt
index 9e7ac7acb89a..717087ee4843 100644
--- a/Projects/AthSimulation/package_filters.txt
+++ b/Projects/AthSimulation/package_filters.txt
@@ -144,6 +144,8 @@
 + Event/xAOD/xAODCoreAthenaPool
 + Event/xAOD/xAODCoreCnv
 + Event/xAOD/xAODEventFormat
++ Event/xAOD/xAODEventFormatAthenaPool
++ Event/xAOD/xAODEventFormatCnv
 + Event/xAOD/xAODEventInfo
 + Event/xAOD/xAODEventInfoAthenaPool
 + Event/xAOD/xAODEventInfoCnv
diff --git a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
index 016939583cb5..7c8d575f4ace 100644
--- a/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/AnalysisCommon_topOptions.py
@@ -333,24 +333,6 @@ if rec.doFileMetaData():
 
 #pdr.flag_domain('aod')
 
-if rec.doWriteAOD() or rec.doWriteESD(): #For xAOD writing:
-    try:
-        if rec.doFileMetaData(): #needed to have xAOD readable outside athena
-            theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-            if rec.doWriteAOD():
-                StreamAOD_Augmented.AddMetaDataItem("xAOD::EventFormat#EventFormat")
-                pass
-            if rec.doWriteESD():
-                StreamESD_Augmented.AddMetaDataItem("xAOD::EventFormat#EventFormat")
-                pass
-            pass
-        pass
-    except Exception:
-        treatException("Problem with extra attributes for xAOD output")
-        pass
-    pass
-
-
 #########
 ## DPD ##
 #########
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 2fd95abd9dc0..0fe51f4a9100 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -1407,21 +1407,6 @@ if rec.doAOD() or rec.doWriteAOD():
         protectedInclude ("HIRecExample/heavyion_postOptionsAOD.py")
 
 
-if rec.doWriteAOD() or rec.doWriteESD(): #For xAOD writing:
-    try:
-        if rec.doFileMetaData(): #needed to have xAOD readable outside athena
-            theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-            if rec.doWriteAOD():
-                StreamAOD_Augmented.AddMetaDataItem("xAOD::EventFormat#EventFormat")
-                pass
-            if rec.doWriteESD():
-                StreamESD_Augmented.AddMetaDataItem("xAOD::EventFormat#EventFormat")
-                pass
-            pass
-        pass
-    except Exception:
-     treatException("Problem with extra attributes for xAOD output")
-
 try:
   # event dumper at the very end
   if rec.doPyDump():
diff --git a/Trigger/TrigConfiguration/TrigConfxAOD/share/xAODMenuWriterTest_jobOptions.py b/Trigger/TrigConfiguration/TrigConfxAOD/share/xAODMenuWriterTest_jobOptions.py
index 0be1059d608f..50c1ce8b58a2 100644
--- a/Trigger/TrigConfiguration/TrigConfxAOD/share/xAODMenuWriterTest_jobOptions.py
+++ b/Trigger/TrigConfiguration/TrigConfxAOD/share/xAODMenuWriterTest_jobOptions.py
@@ -55,10 +55,6 @@ xaodStream.AddItem( "xAOD::TruthVertexAuxContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TruthEventContainer_v1#*" )
 xaodStream.AddItem( "xAOD::TruthEventAuxContainer_v1#*" )
 
-# Make sure that the event format object is added to the output:
-theApp.CreateSvc += [ "xAODMaker::EventFormatSvc" ]
-xaodStream.AddMetaDataItem( "xAOD::EventFormat_v1#EventFormat" )
-
 # Convert the LVL1 information:
 from xAODTriggerCnv.xAODRoICreator import xAODRoICreator
 xAODRoICreator()
-- 
GitLab