From 0ddcc8724bbd57169b2cc2ab8c135ba1c3a6d965 Mon Sep 17 00:00:00 2001
From: Marcin Nowak <Marcin.Nowak@cern.ch>
Date: Wed, 26 Apr 2017 13:26:14 +0200
Subject: [PATCH] Replacing #defines for T/P Converters with typedefs

Replaced #defines for T/P Converters that were needed after the conveter
move to the new package TPTools and name changes, with typdefs. That was
always intended but did not work with GCCXML so a #define hack was used.
Also cleaned up the associated #includes.
Conveter names on the user side were not renamed this time.
---
 .../AthenaPoolCnvTPExtension.h                |  4 +-
 .../AthenaPoolTopLevelExtTPConverter.h        |  8 +-
 .../AthenaPoolTopLevelTPCnvBase.h             |  7 +-
 .../AthenaPoolTopLevelTPConverter.h           | 22 -----
 .../AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h  |  8 +-
 .../T_AthenaPoolCustomCnv.icc                 |  2 +-
 .../T_AthenaPoolExtendingCnv.h                |  2 +-
 .../T_AthenaPoolExtendingCnv.icc              |  2 +-
 .../AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h   |  1 -
 .../T_AthenaPoolTPConverter.h                 | 34 +------
 .../src/AthenaPoolTopLevelTPCnvBase.cxx       | 93 -------------------
 .../TgcCoinDataContainer_tlp1.h               |  2 +-
 .../TgcCoinDataContainer_tlp2.h               |  2 +-
 .../TgcCoinDataContainer_tlp3.h               |  2 +-
 .../AthenaROOTAccess/TBranchTPConvert.h       |  2 +-
 .../AthenaROOTAccess/src/TBranchTPConvert.cxx |  2 +-
 .../Jet/JetEvent/JetEvent/JetKeyDescriptor.h  |  4 +-
 17 files changed, 22 insertions(+), 175 deletions(-)
 delete mode 100644 Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolTopLevelTPCnvBase.cxx

diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h
index 02796bde1d7..eeaafa436b9 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolCnvTPExtension.h
@@ -6,8 +6,8 @@
 #define ATHENAPOOLCNVSVC_ATHENAPOOLCNV_TP_EXT_H
 
 #include "TPTools/AthenaConverterTLPExtension.h"
+#include "TPTools/TopLevelTPCnvBase.h"
 #include "GaudiKernel/IConverter.h"
-class AthenaPoolTopLevelTPCnvBase;
 
 #include <stdexcept>
 
@@ -28,7 +28,7 @@ public:
      return AthenaConverterTLPExtension::registerExtendingCnv( extending_converter );
   }
 
-  void usingTPCnvForReading( AthenaPoolTopLevelTPCnvBase &baseTLPcnv ) {
+  void usingTPCnvForReading( TopLevelTPCnvBase &baseTLPcnv ) {
      AthenaConverterTLPExtension::usingTPCnvForReading( (void*)&baseTLPcnv );
   }
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelExtTPConverter.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelExtTPConverter.h
index 981cdeee5f9..3b580274046 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelExtTPConverter.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelExtTPConverter.h
@@ -5,13 +5,9 @@
 #ifndef AthenaPoolTopLevelEXTTPCnvBase_H
 #define AthenaPoolTopLevelEXTTPCnvBase_H
 
-#define TopLevelTPCnvBaseP AthenaPoolTopLevelExtTPConverter
-
-#include "AthenaPoolTopLevelTPCnvBase.h"
 #include "TPTools/TopLevelTPCnvBaseP.h"
 
-//template< class TL_PERS >
-//using AthenaPoolTopLevelExtTPConverter = TopLevelTPCnvBaseP<TL_PERS>;
-
+template< class TL_PERS >
+using AthenaPoolTopLevelExtTPConverter = TopLevelTPCnvBaseP<TL_PERS>;
 
 #endif
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h
index 63e03429242..3eeca340315 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h
@@ -5,12 +5,7 @@
 #ifndef AthenaPoolTopLevelTPCnvBase_H
 #define AthenaPoolTopLevelTPCnvBase_H
 
-#define TopLevelTPCnvBase AthenaPoolTopLevelTPCnvBase
-// for ARA:
-#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
-
 #include "TPTools/TopLevelTPCnvBase.h"
-
-//typedef TopLevelTPCnvBase AthenaPoolTopLevelTPCnvBase;
+typedef TopLevelTPCnvBase AthenaPoolTopLevelTPCnvBase;
 
 #endif
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h
index 384c4df9fed..c68e5b81179 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/AthenaPoolTopLevelTPConverter.h
@@ -5,31 +5,9 @@
 #ifndef AthenaPoolTopLevelTPConverter_H
 #define AthenaPoolTopLevelTPConverter_H
 
-//============  #define part
-#define TopLevelTPConverter  AthenaPoolTopLevelTPConverter
-
-// include "T_AthenaPoolTPConverter.h" to get #defines only, they need to come first
-#include "T_AthenaPoolTPConverter.h"
-
-//===========================================
-
-#include "AthenaPoolTopLevelExtTPConverter.h"
 #include "TPTools/TopLevelTPConverter.h"
 
-
-//============== typedef part
-#if 0
-#ifndef __GCCXML__
-
 template< class MAIN_CNV, class TL_PERS >
 using AthenaPoolTopLevelTPConverter = TopLevelTPConverter<MAIN_CNV, TL_PERS>;
 
-#else   // __GCCXML__
-
-#define AthenaPoolTopLevelTPConverter  TopLevelTPConverter
-
-#endif // __GCCXML__
-#endif
-//=========================================
-
 #endif
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h
index b53031926fe..9587a9d9b16 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h
@@ -12,10 +12,14 @@
 #include "T_AthenaPoolCustCnv.h"
 #include <vector>
 
+// class TopLevelTPCnvBase;
+// need the TopLevelTPCnvBase typedef still
 #include "AthenaPoolTopLevelTPCnvBase.h"
-//class TopLevelTPCnvBase;
+
+// forward declarations:
 template <class T, class P> class T_AthenaPoolExtendingCnv;
 
+
 /** @class T_AthenaPoolCustomCnv
  *  @brief This templated class extends T_AthenaPoolCustCnv to provide management of the persistent objects
  *  created by the converter and to correctly delete retrieved persistent objects.
@@ -73,7 +77,7 @@ protected:
       @param tlp_converter [IN] top-level TP converter to be used when reading
    */
    template <class P>
-   void poolReadObject(AthenaPoolTopLevelTPCnvBase& tlp_converter);
+   void poolReadObject(TopLevelTPCnvBase& tlp_converter);
 
    /// Remember the POOL object to be written out (will be deleted after commit)
    /// @param obj [IN] persistent object
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc
index 513df695b3d..7a10c60fa1c 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.icc
@@ -152,7 +152,7 @@ inline P* T_AthenaPoolCustomCnv<TRANS, PERS>::poolReadObject() {
 // using the indicated top-level TP converter
 template <class TRANS, class PERS>
 template <class P>
-inline void T_AthenaPoolCustomCnv<TRANS, PERS>::poolReadObject(AthenaPoolTopLevelTPCnvBase& tlp_converter) {
+inline void T_AthenaPoolCustomCnv<TRANS, PERS>::poolReadObject(TopLevelTPCnvBase& tlp_converter) {
    AthenaPoolCnvTPExtension *extCnv = dynamic_cast<AthenaPoolCnvTPExtension*>(this);
    // set which Top level TP concerter will by used for reading
    // only matters for extended converters
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.h
index 3ef3effcd51..0009eb0e7a2 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.h
@@ -71,7 +71,7 @@ protected:
   template <class P>
   P* 	poolReadObject();
   
-  /// @copydoc T_AthenaPoolCustomCnv::poolReadObject(AthenaPoolTopLevelTPCnvBase&)
+  /// @copydoc T_AthenaPoolCustomCnv::poolReadObject(TopLevelTPCnvBase&)
   template <class P>
   void 	poolReadObject( TopLevelTPCnvBase& tlp_converter );
 
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.icc
index 4f7695d349e..b3cb0a7bcfc 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.icc
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolExtendingCnv.icc
@@ -75,7 +75,7 @@ template <class TRANS, class PERS>
 template <class P>
 void
 T_AthenaPoolExtendingCnv< TRANS, PERS >::
-poolReadObject( AthenaPoolTopLevelTPCnvBase& tlp_converter )
+poolReadObject( TopLevelTPCnvBase& tlp_converter )
 {
    // set which Top level TP concerter will by used for reading
    usingTPCnvForReading( tlp_converter );
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h
index e6dbe97fef8..9e6478fd300 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.h
@@ -21,7 +21,6 @@
 #include "AthenaPoolCnvSvc/T_AthenaPoolCustomCnv.h"
 #include "AthenaPoolCnvSvc/exceptions.h"
 #include "SGTools/ClassName.h"
-#include <memory>
 
 
 /**
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
index 58d2849ba67..3987ea7470c 100644
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
+++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPConverter.h
@@ -5,24 +5,9 @@
 #ifndef ATHENAPOOLCNVSVC_T_ATHENAPOOLTPCONVERTER_H
 #define ATHENAPOOLCNVSVC_T_ATHENAPOOLTPCONVERTER_H 1
 
-
-#define TPAbstractPolyCnvBase   T_AthenaPoolTPAbstractPolyCnvBase
-#define TPPolyCnvBase           T_AthenaPoolTPPolyCnvBase
-#define TPConverterBase         T_AthenaPoolTPCnvBase
-
-#define TPCnvVector             T_AthenaPoolTPCnvVector
-#define TPCnvStdVector          T_AthenaPoolTPCnvStdVector
-#define TPPtrVectorCnv          T_AthenaPoolTPPtrVectorCnv
-#define TPPolyVectorCnv         T_AthenaPoolTPPolyVectorCnv
-
-#define TPCnvIDCont             T_AthenaPoolTPCnvIDCont
-#define TPCnvIDContFromIdentifier       T_AthenaPoolTPCnvIDContFromIdentifier
-
-
-// include "AthenaPoolTopLevelTPCnvBase.h" to get #defines only, they need to come first
+// provide AthenaPoolTopLevelTPCnvBase definition to T/P converters
 #include "AthenaPoolTopLevelTPCnvBase.h"
 
-
 #include "TPTools/TPConverter.h"
 
 
@@ -41,11 +26,7 @@ class T_TPCnv
 };
 
 
-#if 0
-// does not work because ARA selection files have TP converter names in them
-
 // define old TP classes as typedef to the new classes
-#ifndef __GCCXML__
 
 template<class TRANS_BASE, class TRANS, class PERS>
 using T_AthenaPoolTPAbstractPolyCnvBase = TPAbstractPolyCnvBase<TRANS_BASE, TRANS, PERS>;
@@ -75,17 +56,4 @@ using T_AthenaPoolTPCnvIDCont = TPCnvIDCont<TRANS, PERS, CONV>;
 template<class TRANS, class PERS, class CONV>
 using T_AthenaPoolTPCnvIDContFromIdentifier = TPCnvIDContFromIdentifier<TRANS, PERS, CONV>;
 
-#else   // __GCCXML__
-
-#define T_AthenaPoolTPAbstractPolyCnvBase TPAbstractPolyCnvBase
-#define T_AthenaPoolTPPolyCnvBase TPPolyCnvBase
-#define T_AthenaPoolTPCnvBase TPConverterBase
-#define T_AthenaPoolTPCnvStdVector TPCnvStdVector
-#define T_AthenaPoolTPPtrVectorCnv TPPtrVectorCnv
-
-#endif // __GCCXML__
-
-#endif // 0/1
-
 #endif
-
diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolTopLevelTPCnvBase.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolTopLevelTPCnvBase.cxx
deleted file mode 100644
index 735bfb2e568..00000000000
--- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AthenaPoolTopLevelTPCnvBase.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-
-#include "AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h"
-
-#include <stdexcept>
-
-   
-void AthenaPoolTopLevelTPCnvBase::addTPConverter( ITPConverter *converter )
-{
-   addTPConverterForWriting( converter );
-   addTPConverterForReading( converter );
-}
-
-
-   
-void AthenaPoolTopLevelTPCnvBase::addTPConverterForReading( ITPConverter *converter )
-{
-   // for reading, converters are selected based on their typeID value
-   // which comes from the Ref
-   // Ref contains top level converter ID + local type ID
-   TPObjRef::typeID_t	full_typeID( getConverterID(), ++m_typeIDCount );
-   m_convIdMap[ full_typeID.value() ] = converter;
-
-//   std::cout << " **addTPConverter - adding converter for " << converter->transientTInfo().name() << " CnvID=" << full_typeID.value() << std::endl;
-   converter->setTopConverter( this, full_typeID );
-}
-
-
-
-void AthenaPoolTopLevelTPCnvBase::addTPConverterForWriting( ITPConverter *converter )
-{
-   // add converter to the map keyed by type_info
-   // this map is used to find a converter when writing
-   const  std::type_info &info( converter->transientTInfo() );
-   if( m_converters.findConverter( info ) ) {
-      // adding a second converter for the same type will mess up things
-      const std::string	error("Duplicate TP converter for class ");
-      throw std::runtime_error( error +  info.name() );
-   }
-   m_converters.addConverter( converter, info );
-}
-
-  
-void AthenaPoolTopLevelTPCnvBase::addExtTPConverterForReading( ITPConverter *converter )
-{
-   // for reading, converters are selected based on our own typeID value
-   // which comes from the Ref
-   // Ref contains top level converter ID + local type ID
-   m_convIdMap[ converter->typeID().value() ] = converter;
-
-//   std::cout << " **addExtTPConverterForReading - adding converter for " << converter->transientTInfo().name() << " CnvID=" << converter->typeID().value() << std::endl;
-   converter->setRuntimeTopConverter( this );
-}
-
-
-/// copy all TP converters to another topLevel conveter 
-void	AthenaPoolTopLevelTPCnvBase::addTPConvertersTo( AthenaPoolTopLevelTPCnvBase *cnv )
-{
-   // loop over all registered converters 
-   for( convIdMap_t::const_iterator itr = m_convIdMap.begin();
-	itr != m_convIdMap.end(); itr++ ) {
-      // check if the converter is in the list of R/W converters
-      if( m_converters.findConverter( itr->second->transientTInfo() ) == itr->second ) {
-         // this is a R/W converter, add it for writing too
-         cnv->addTPConverterForWriting( itr->second );
-      }
-      // add the convterter for reading
-      cnv->addExtTPConverterForReading( itr->second );
-   }
-   // prevent attempts to add the same converters again
-   cnv->rememberConverter( this );
-}
-
-
-void	AthenaPoolTopLevelTPCnvBase::addTPConvertersForReadingTo( AthenaPoolTopLevelTPCnvBase *cnv )
-{
-   // check if we have done this already, and if so then exit
-   if( cnv->hasConvertersFrom( this ) ) {
-      return;
-   }
-   // copy all TP converters to another topLevel conveter 
-   for( convIdMap_t::const_iterator itr = m_convIdMap.begin();
-	itr != m_convIdMap.end(); itr++ ) {
-      cnv->addExtTPConverterForReading( itr->second );
-   }
-   // prevent attempts to add the same converters again
-   cnv->rememberConverter( this );
-}
-
-   
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp1.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp1.h
index c664d7b298f..b2b33fb8f62 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp1.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp1.h
@@ -16,7 +16,7 @@
 
 
 // Token
-//#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
+#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
 
 namespace Muon
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp2.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp2.h
index d8d961c2bda..b5b9dbb6231 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp2.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp2.h
@@ -16,7 +16,7 @@
 
 
 // Token
-//#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
+#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
 
 namespace Muon
 {
diff --git a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp3.h b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp3.h
index b15a6eb041d..b45e7237187 100755
--- a/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp3.h
+++ b/MuonSpectrometer/MuonCnv/MuonEventTPCnv/MuonEventTPCnv/TgcCoinDataContainer_tlp3.h
@@ -15,7 +15,7 @@
 
 
 // Token
-//#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
+#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
 
 namespace Muon
 {
diff --git a/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/TBranchTPConvert.h b/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/TBranchTPConvert.h
index dc152f1af4d..2e57c84bbd7 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/TBranchTPConvert.h
+++ b/PhysicsAnalysis/AthenaROOTAccess/AthenaROOTAccess/TBranchTPConvert.h
@@ -16,6 +16,7 @@
 #ifndef ATHENAROOTACCESS_TBRANCHTPCONVERT_H
 #define ATHENAROOTACCESS_TBRANCHTPCONVERT_H
 
+#include "AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h"
 #include "AthenaROOTAccess/ISetSGKey.h"
 #include "GaudiKernel/ClassID.h"
 #include "GaudiKernel/MsgStream.h"
@@ -25,7 +26,6 @@
 #include <string>
 
 class ITPCnvBase;
-class AthenaPoolTopLevelTPCnvBase;
 namespace SG {
 class DataProxy;
 class Arena;
diff --git a/PhysicsAnalysis/AthenaROOTAccess/src/TBranchTPConvert.cxx b/PhysicsAnalysis/AthenaROOTAccess/src/TBranchTPConvert.cxx
index da8875fee90..2f5b9e683f2 100755
--- a/PhysicsAnalysis/AthenaROOTAccess/src/TBranchTPConvert.cxx
+++ b/PhysicsAnalysis/AthenaROOTAccess/src/TBranchTPConvert.cxx
@@ -10,6 +10,7 @@
  * @brief Branch to run T/P conversions.
  */
 
+#include "AthenaPoolUtilities/TPCnvTokenList_p1.h"
 #include "AthenaROOTAccess/TBranchTPConvert.h"
 #include "AthenaROOTAccess/TTreeBranchMap.h"
 #include "AthenaROOTAccess/ProxyMap.h"
@@ -19,7 +20,6 @@
 #include "AthenaROOTAccess/tpcnvLoad.h"
 #include "AuxStoreARA.h"
 #include "AthenaKernel/ITPCnvBase.h"
-#include "AthenaPoolCnvSvc/AthenaPoolTopLevelTPCnvBase.h"
 #include "AthContainersInterfaces/IAuxStoreHolder.h"
 #include "AthAllocators/Arena.h"
 #include "SGTools/DataProxy.h"
diff --git a/Reconstruction/Jet/JetEvent/JetEvent/JetKeyDescriptor.h b/Reconstruction/Jet/JetEvent/JetEvent/JetKeyDescriptor.h
index 2c18e5a5031..d1df2c8e506 100644
--- a/Reconstruction/Jet/JetEvent/JetEvent/JetKeyDescriptor.h
+++ b/Reconstruction/Jet/JetEvent/JetEvent/JetKeyDescriptor.h
@@ -36,7 +36,7 @@ class MsgStream;
 
 // forward declare some conversion class
 template <class T1, class T2, class T3>
-  class T_AthenaPoolTPPolyCnvBase;
+  class TPPolyCnvBase;
 class JetKeyDescriptor_p1;
 
 // payload for the JetKeyDescriptor framework.
@@ -46,7 +46,7 @@ class JetKeyDescriptor
   friend class JetKeyDescriptorCnv_p1;
   friend class JetKeyDescriptorCnv;
   friend class JetKeyDescriptorInstance;
-  friend class T_AthenaPoolTPPolyCnvBase<JetKeyDescriptor,JetKeyDescriptor, JetKeyDescriptor_p1>;  
+  friend class TPPolyCnvBase<JetKeyDescriptor,JetKeyDescriptor, JetKeyDescriptor_p1>;  
  public:
   
   typedef std::string      category_t;
-- 
GitLab