From c24a877b75d8fe9d27323d9db59bd3568b42824f Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Fri, 27 Jul 2018 11:53:11 +0000
Subject: [PATCH] StoreGate,AthenaKernel,IOVSvc,SGComps: Remove addedNew*Object
 functionality.

---
 .../AthenaKernel/AthenaKernel/IHiveStoreMgr.h | 17 +----
 Control/IOVSvc/src/CondInputLoader.cxx        |  4 --
 Control/IOVSvc/src/MetaInputLoader.cxx        |  5 --
 Control/SGComps/src/SGInputLoader.cxx         | 14 ----
 Control/StoreGate/StoreGate/StoreGateSvc.h    | 22 +------
 Control/StoreGate/StoreGate/WriteCondHandle.h | 13 ----
 Control/StoreGate/StoreGate/WriteMetaHandle.h | 12 ----
 Control/StoreGate/StoreGate/tools/SGImplSvc.h | 31 +--------
 .../StoreGate/StoreGate/tools/SGImplSvc.icc   |  8 ---
 Control/StoreGate/share/SGHive_test.ref       | 41 +++++-------
 Control/StoreGate/src/SGHiveMgrSvc.cxx        |  1 -
 Control/StoreGate/src/SGImplSvc.cxx           | 65 +------------------
 Control/StoreGate/src/StoreGateSvc.cxx        | 22 -------
 Control/StoreGate/test/SGHive_test.cxx        | 20 ------
 14 files changed, 20 insertions(+), 255 deletions(-)

diff --git a/Control/AthenaKernel/AthenaKernel/IHiveStoreMgr.h b/Control/AthenaKernel/AthenaKernel/IHiveStoreMgr.h
index 1a643f7db28..1fc5b48863c 100644
--- a/Control/AthenaKernel/AthenaKernel/IHiveStoreMgr.h
+++ b/Control/AthenaKernel/AthenaKernel/IHiveStoreMgr.h
@@ -28,22 +28,7 @@ public:
   /// clear the store
   virtual StatusCode clearStore(bool forceRemove=false) =0;
 
-  /** Get data objects registred in store since last getNewDataObjects call (or since init for 1st call)
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Status code indicating failure or success.
-   */
-  virtual StatusCode getNewDataObjects(DataObjIDColl& products)=0;
-
-  /** Check if something has been added to the store since last getNewDataObjects call
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Boolean indicating the presence of new products
-   */
-  virtual bool newDataObjectsPresent()=0; 
-
-  /** make newly recorded DataObjects know to the WhiteBoard, by copying
-   *    from thread local storag
+  /** Reset handles added since the last call to commit.
    */
   virtual void commitNewDataObjects() = 0;
   
diff --git a/Control/IOVSvc/src/CondInputLoader.cxx b/Control/IOVSvc/src/CondInputLoader.cxx
index a87ebb17dae..6e648f56dfa 100644
--- a/Control/IOVSvc/src/CondInputLoader.cxx
+++ b/Control/IOVSvc/src/CondInputLoader.cxx
@@ -358,7 +358,6 @@ CondInputLoader::execute()
    
     if (ccb->valid(now)) {
       ATH_MSG_INFO( "  CondObj " << vhk.fullKey() << " is still valid at " << now_event );
-      evtStore()->addedNewTransObject(vhk.fullKey().clid(), vhk.key());
       continue;
     }
 
@@ -368,10 +367,7 @@ CondInputLoader::execute()
                     << dbKey);
       sc = StatusCode::FAILURE;
       continue;
-    } else {
-      evtStore()->addedNewTransObject(vhk.fullKey().clid(), vhk.key());
     }
-
   }
 
   if (m_dumpEvt) {
diff --git a/Control/IOVSvc/src/MetaInputLoader.cxx b/Control/IOVSvc/src/MetaInputLoader.cxx
index 360bd918c87..9fe9c6c5cee 100644
--- a/Control/IOVSvc/src/MetaInputLoader.cxx
+++ b/Control/IOVSvc/src/MetaInputLoader.cxx
@@ -175,7 +175,6 @@ MetaInputLoader::execute()
    
     if (mcb->valid(sid)) {
       ATH_MSG_INFO( "  MetaObj " << obj << " is still valid for " << sid );
-      //evtStore()->addedNewTransObject(obj.clid(), obj.key());
       continue;
     }
 
@@ -184,10 +183,6 @@ MetaInputLoader::execute()
                     << sid);
       return StatusCode::FAILURE;
     } 
-    else {
-      m_metaStore->addedNewTransObject(obj.clid(), obj.key());
-    }
-
   }
 
   if (m_dump) {
diff --git a/Control/SGComps/src/SGInputLoader.cxx b/Control/SGComps/src/SGInputLoader.cxx
index 3e5c44744b3..3fae76ab043 100644
--- a/Control/SGComps/src/SGInputLoader.cxx
+++ b/Control/SGComps/src/SGInputLoader.cxx
@@ -161,20 +161,6 @@ SGInputLoader::loadObjs(const DataObjIDColl& objs) const {
       if (dp->provider() == 0) {
 	ATH_MSG_DEBUG("   obj " << obj << " has no provider, and is only Transient" );
       }
-
-      // Tell hive about the object.
-      evtStore()->addedNewTransObject(obj.clid(), vhk.key());
-
-      // Also add all aliases...
-      for (const std::string& alias : dp->alias()) {
-        evtStore()->addedNewTransObject(obj.clid(), alias);
-      }
-
-      // ... and linked classes.
-      for (CLID clid2 : dp->transientID()) {
-        if (clid2 != obj.clid())
-          evtStore()->addedNewTransObject(clid2, vhk.key());
-      }
     } else {
       ok = false;
       if (m_failEvt.value()) {
diff --git a/Control/StoreGate/StoreGate/StoreGateSvc.h b/Control/StoreGate/StoreGate/StoreGateSvc.h
index 38572506876..75dac936c56 100644
--- a/Control/StoreGate/StoreGate/StoreGateSvc.h
+++ b/Control/StoreGate/StoreGate/StoreGateSvc.h
@@ -538,31 +538,11 @@ public:
   /// @param forceRemove: if true remove proxies ignoring their resetOnly flag
   virtual StatusCode clearStore(bool forceRemove=false) override final;
 
-  /** Get data objects registered in store since last getNewDataObjects call (or since init for 1st call)
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Status code indicating failure or success.
-   */
-  virtual StatusCode getNewDataObjects(DataObjIDColl& products) override final;
-
-  /** Check if something has been added to the store since last getNewDataObjects call
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Boolean indicating the presence of new products
-   */
-  virtual bool newDataObjectsPresent() override final; 
-
-  /** make newly recorded DataObjects know to the WhiteBoard, by copying
-   *    from thread local storage to m_newDataObjects
+  /** Reset handles added since the last call to commit.
    */
   virtual void commitNewDataObjects() override final;
   //@}
 
-  ///a new transient object has been recorded
-  void addedNewTransObject(CLID clid, const std::string& key);
-
-  void addedNewPersObject(CLID clid, SG::DataProxy* dp);
-
   ///set the hive event slot pointer: used by the event loop mgrs
   static void setSlot(SG::HiveEventSlot* pSlot);
 
diff --git a/Control/StoreGate/StoreGate/WriteCondHandle.h b/Control/StoreGate/StoreGate/WriteCondHandle.h
index c9f1db0a614..79c5498d8c0 100644
--- a/Control/StoreGate/StoreGate/WriteCondHandle.h
+++ b/Control/StoreGate/StoreGate/WriteCondHandle.h
@@ -44,7 +44,6 @@ namespace SG {
 
     StatusCode record(const EventIDRange& range, T* t);
     StatusCode record(const EventIDRange& range, std::unique_ptr<T> t);
-    void updateStore();
     
     const std::string& dbKey() const { return m_hkey.dbKey(); }
     
@@ -112,8 +111,6 @@ namespace SG {
       return StatusCode::FAILURE;
     }
  
-    updateStore();
- 
     return sc;
   }
 
@@ -125,16 +122,6 @@ namespace SG {
     return record (r, std::unique_ptr<T> (t));
   }
 
-  //---------------------------------------------------------------------------
-
-  template <typename T>
-  void
-  WriteCondHandle<T>::updateStore() {
-    StoreGateSvc* cs = m_hkey.getCS();
-    cs->addedNewTransObject( m_hkey.fullKey().clid(), m_hkey.fullKey().key() );
-  }
-
-
   //---------------------------------------------------------------------------
 
   template <typename T>
diff --git a/Control/StoreGate/StoreGate/WriteMetaHandle.h b/Control/StoreGate/StoreGate/WriteMetaHandle.h
index c75d7555301..05645cfe9a8 100644
--- a/Control/StoreGate/StoreGate/WriteMetaHandle.h
+++ b/Control/StoreGate/StoreGate/WriteMetaHandle.h
@@ -40,7 +40,6 @@ namespace SG {
     bool isValid(const MetaContBase::SourceID& t) const;
 
     StatusCode record(const MetaContBase::SourceID& range, T* t);
-    void updateStore();
     
     const std::string& dbKey() const { return m_hkey.dbKey(); }
     
@@ -111,20 +110,9 @@ namespace SG {
         << "WriteMetaHandle::record() : obj at: " << t << "  range: " << r 
         << endmsg;
 
-    updateStore();
- 
     return StatusCode::SUCCESS;
   }
 
-  //------------------------------------------------------------------------
-
-  template <typename T>
-  void
-  WriteMetaHandle<T>::updateStore() {
-    m_cs->addedNewTransObject( fullKey().clid(), fullKey().key() );
-  }
-
-
   //------------------------------------------------------------------------
 
   template <typename T>
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.h b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
index 7be9630ac74..032e6eb7d04 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.h
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.h
@@ -36,10 +36,6 @@
 #include <vector>                       
 #include <thread>
 
-#ifndef __CLING__
-#include <tbb/spin_rw_mutex.h>
-#endif
-
 #include "AthenaKernel/StoreID.h"
 #include "AthenaKernel/IProxyDict.h"
 #include "AthenaKernel/IProxyProviderSvc.h"
@@ -834,29 +830,10 @@ public:
   /// @param forceRemove: if true remove proxies ignoring their resetOnly flag
   virtual StatusCode clearStore(bool forceRemove=false) override final;
 
-  /** Get data objects registered in store since last getNewDataObjects call (or since init for 1st call)
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Status code indicating failure or success.
-   */
-  virtual StatusCode getNewDataObjects(DataObjIDColl& products) override final;
-
-  /** Check if something has been added to the store since last getNewDataObjects call
-   *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Boolean indicating the presence of new products
-   */
-  virtual bool newDataObjectsPresent() override final; 
-
-  /** make newly recorded DataObjects know to the WhiteBoard, by copying
-   *    from thread local storage to m_newDataObjects
+  /** Reset handles added since the last call to commit.
    */
   virtual void commitNewDataObjects() override final;
   //@}
-  /// a new data object has been retrieved from persistency
-  void addedNewPersObject(CLID clid, SG::DataProxy* dp) const;
-  ///a new object transient object has been recorded
-  void addedNewTransObject(CLID clid, const std::string& key) const;
 
 
   /**
@@ -1090,12 +1067,6 @@ private:
   /// Allocation arena to associate with this store.
   SG::Arena m_arena;
 
-  ///list of recently added data objects, needed to implement getNewDataObjects
-  DataObjIDColl m_newDataObjects;
-#ifndef __CLING__
-  tbb::spin_rw_mutex m_newDataLock;
-#endif
-
   /// The Hive slot number for this store, or -1 if this isn't a Hive store.
   int m_slotNumber;
 
diff --git a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
index 7fc97eae4ed..2b3ccec5f05 100644
--- a/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
+++ b/Control/StoreGate/StoreGate/tools/SGImplSvc.icc
@@ -477,7 +477,6 @@ StatusCode SGImplSvc::retrieve(const DataHandle<T>& handle) const
                  << " of type "  << ClassID_traits<T>::typeName() 
                  << "(CLID " << ClassID_traits<T>::ID() << ')');
 #endif
-    addedNewPersObject(ClassID_traits<T>::ID(), dp);
   }
   return sc;
 }
@@ -507,7 +506,6 @@ StatusCode SGImplSvc::retrieve(DataHandle<T>& handle) const
                  << " of type "  << ClassID_traits<T>::typeName() 
                  << "(CLID " << ClassID_traits<T>::ID() << ')');
 #endif
-    addedNewPersObject(ClassID_traits<T>::ID(), dp);
   }
 
   return sc;
@@ -541,7 +539,6 @@ StatusCode SGImplSvc::retrieve(const DataHandle<T>& handle,
                   << " of type "  << ClassID_traits<T>::typeName() 
                   << "(CLID " << ClassID_traits<T>::ID() << ')');
 #endif
-    addedNewPersObject(ClassID_traits<T>::ID(), dp);
   }
   return sc;
 
@@ -575,7 +572,6 @@ StatusCode SGImplSvc::retrieve(DataHandle<T>& handle,
                  << ' ' << " of type "  << ClassID_traits<T>::typeName() 
                  << "(CLID " << ClassID_traits<T>::ID() << ')');
 #endif
-    addedNewPersObject(ClassID_traits<T>::ID(), dp);
   }
   return sc;
 
@@ -631,10 +627,6 @@ StatusCode SGImplSvc::retrieve(const DataHandle<T>& chbegin,
     return StatusCode::FAILURE;
   }
 
-  //FIXME no associateAux
-  SG::ConstProxyIterator idp(first);
-  while (idp != end) addedNewPersObject(ClassID_traits<T>::ID(), idp++->second);
-
   return StatusCode::SUCCESS;
 }
 
diff --git a/Control/StoreGate/share/SGHive_test.ref b/Control/StoreGate/share/SGHive_test.ref
index 83f5c859c06..103d0c40d97 100644
--- a/Control/StoreGate/share/SGHive_test.ref
+++ b/Control/StoreGate/share/SGHive_test.ref
@@ -2,15 +2,15 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/SGHive_test.txt
-JobOptionsSvc        INFO # =======> /home/leggett/work/v30r1.002/src/Control/StoreGate/share/../share/SGHive_test.txt
+JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/SGHive_test.txt
 JobOptionsSvc        INFO # (1,1): StoreGateSvc.OutputLevel = 1
 JobOptionsSvc        INFO # (2,1): HiveMgrSvc.OutputLevel = 1
 JobOptionsSvc        INFO # (3,1): HiveMgrSvc.NSlots = 4
 JobOptionsSvc        INFO Job options successfully read in from ../share/SGHive_test.txt
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v30r1)
-                                          running on zeus on Tue Jan  2 16:20:50 2018
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
+                                          running on karma on Tue Jul 10 10:38:19 2018
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
@@ -29,7 +29,7 @@ StoreGateSvc_Impl   DEBUG Property update for OutputLevel : new value = 1
 StoreGateSvc_Impl VERBOSE Initializing StoreGateSvc_Impl - package version StoreGate-00-00-00
 StoreGateSvc_Impl   DEBUG Service base class initialized successfully
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
-ClassIDSvc           INFO  getRegistryEntries: read 172 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 264 CLIDRegistry entries for module ALL
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 0_StoreGateSvc_...  DEBUG Property update for OutputLevel : new value = 1
 0_StoreGateSvc_...VERBOSE Initializing 0_StoreGateSvc_Impl - package version StoreGate-00-00-00
@@ -77,37 +77,28 @@ HiveMgrSvc          DEBUG Freed slot 1
 HiveMgrSvc          DEBUG Slot 1 allocated to event number 333333
 
 *** SGHive_test noSlot BEGINS ***
-ClassIDSvc           INFO  getRegistryEntries: read 931 CLIDRegistry entries for module ALL
-StoreGateSvc_Impl VERBOSE committing dataObj " ( 'SG::Foo' , 'blassed' ) "
-StoreGateSvc_Impl   DEBUG Recorded object @0x29b6750 with key pFoo1 of type SG::Foo(CLID 81010)
- in DataObject @0x2994690
+StoreGateSvc_Impl   DEBUG Recorded object @0x190c1d0 with key pFoo1 of type SG::Foo(CLID 81010)
+ in DataObject @0x190f690
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x2a29770 with key pFoo2 of type SG::Foo(CLID 81010)
- in DataObject @0x2a99200
+StoreGateSvc_Impl   DEBUG Recorded object @0x190f750 with key pFoo2 of type SG::Foo(CLID 81010)
+ in DataObject @0x190fba0
  object modifiable when retrieved
-StoreGateSvc_Impl VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo2' ) "
-StoreGateSvc_Impl VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo1' ) "
-StoreGateSvc_Impl   DEBUG Recorded object @0x2a999e0 with key pFoo3 of type SG::Foo(CLID 81010)
- in DataObject @0x2a29140
+StoreGateSvc_Impl   DEBUG Recorded object @0x189f570 with key pFoo3 of type SG::Foo(CLID 81010)
+ in DataObject @0x190fe70
  object modifiable when retrieved
-StoreGateSvc_Impl VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo3' ) "
 
 *** SGHive_test noSlot ENDS ***
 
 *** SGHive_test withSlot BEGINS ***
-0_StoreGateSvc_...VERBOSE committing dataObj " ( 'SG::Foo' , 'blassed' ) "
-0_StoreGateSvc_...  DEBUG Recorded object @0x2a29790 with key pFoo1 of type SG::Foo(CLID 81010)
- in DataObject @0x297b420
+0_StoreGateSvc_...  DEBUG Recorded object @0x190f770 with key pFoo1 of type SG::Foo(CLID 81010)
+ in DataObject @0x1910d20
  object modifiable when retrieved
-0_StoreGateSvc_...  DEBUG Recorded object @0x2a5ea70 with key pFoo2 of type SG::Foo(CLID 81010)
- in DataObject @0x298d210
+0_StoreGateSvc_...  DEBUG Recorded object @0x1911050 with key pFoo2 of type SG::Foo(CLID 81010)
+ in DataObject @0x1911190
  object modifiable when retrieved
-0_StoreGateSvc_...VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo2' ) "
-0_StoreGateSvc_...VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo1' ) "
-0_StoreGateSvc_...  DEBUG Recorded object @0x2a5e7f0 with key pFoo3 of type SG::Foo(CLID 81010)
- in DataObject @0x2a5ef20
+0_StoreGateSvc_...  DEBUG Recorded object @0x1910f40 with key pFoo3 of type SG::Foo(CLID 81010)
+ in DataObject @0x1911490
  object modifiable when retrieved
-0_StoreGateSvc_...VERBOSE committing dataObj " ( 'SG::Foo' , 'pFoo3' ) "
 
 *** SGHive_test withSlot ENDS ***
 StoreGateSvc      VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
diff --git a/Control/StoreGate/src/SGHiveMgrSvc.cxx b/Control/StoreGate/src/SGHiveMgrSvc.cxx
index 13d3fe10bd7..ef474705e03 100644
--- a/Control/StoreGate/src/SGHiveMgrSvc.cxx
+++ b/Control/StoreGate/src/SGHiveMgrSvc.cxx
@@ -141,7 +141,6 @@ size_t HiveMgrSvc::freeSlots() {
 DataObjIDColl HiveMgrSvc::getNewDataObjects() {
   // FIXME: to be removed
   DataObjIDColl products;
-  m_hiveStore->getNewDataObjects(products).ignore();
   return products;
 }
 
diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx
index a596d964048..698cb7008ec 100644
--- a/Control/StoreGate/src/SGImplSvc.cxx
+++ b/Control/StoreGate/src/SGImplSvc.cxx
@@ -2,7 +2,6 @@
   Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 */
 
-#define SLOW_NEWDATAOBJECTS 1
 #include <algorithm>
 #include <cassert>
 #include <iostream>
@@ -70,7 +69,6 @@ using SG::TransientAddress;
 ///////////////////////////////////////////////////////////////////////////
 // Remapping implementation.
 
-thread_local DataObjIDColl s_newObjs;
 
 namespace SG {
 
@@ -621,8 +619,6 @@ SGImplSvc::addSymLink(const CLID& linkid, DataProxy* dp)
     if (baseptr)
       this->t2pRegister (baseptr, dp).ignore();
   }
-
-  addedNewTransObject (linkid, dp->name());
   return sc;
 }
 
@@ -636,8 +632,6 @@ SGImplSvc::addAlias(const std::string& aliasKey, DataProxy* proxy)
     return StatusCode::FAILURE;
   }
 
-  addedNewTransObject (proxy->clID(), aliasKey);
-
   // add key to proxy and to ProxyStore
   return m_pStore->addAlias(aliasKey, proxy);
 }
@@ -822,10 +816,9 @@ SG::DataProxy* SGImplSvc::recordObject (SG::DataObjectSharedPtr<DataObject> obj,
  * @param id The CLID of the object.
  * @param key The key of the object.
  */
-StatusCode SGImplSvc::updatedObject (CLID id, const std::string& key)
+StatusCode SGImplSvc::updatedObject (CLID /*id*/, const std::string& /*key*/)
 {
   lock_t lock (m_mutex);
-  addedNewTransObject (id, key);
   return StatusCode::SUCCESS;
 }
 
@@ -1154,10 +1147,7 @@ SGImplSvc::record_impl( DataObject* pDObj, const std::string& key,
     }
   }
 
-  addedNewTransObject(clid, rawKey);
-
   return dp;
-  
 }
 
 DataProxy*
@@ -1579,32 +1569,9 @@ void SGImplSvc::addAutoSymLinks (const std::string& key,
   }
 }
 
-StatusCode SGImplSvc::getNewDataObjects(DataObjIDColl& products) {
-  lock_t lock (m_mutex);
-  tbb::spin_rw_mutex::scoped_lock lock2(m_newDataLock,true);
-  products.swap(m_newDataObjects);
-  m_newDataObjects.clear();
-  return StatusCode::SUCCESS;
-}
-
-bool SGImplSvc::newDataObjectsPresent() /*const*/ {
-  lock_t lock (m_mutex);
-  tbb::spin_rw_mutex::scoped_lock lock2(m_newDataLock,false);
-  return !m_newDataObjects.empty();
-} 
-
 void
 SGImplSvc::commitNewDataObjects() {
   lock_t lock (m_mutex);
-  tbb::spin_rw_mutex::scoped_lock lock2(m_newDataLock,true);
-  for (auto obj : s_newObjs) {
-    if (msgLevel(MSG::VERBOSE)) {
-      verbose() << "committing dataObj \"" << obj << "\""
-                << endmsg;
-    }
-    m_newDataObjects.insert( obj );
-  }
-  s_newObjs.clear();
 
   // Reset handles added since the last call to commit.
   bool hard_reset = (m_numSlots > 1);
@@ -1614,36 +1581,6 @@ SGImplSvc::commitNewDataObjects() {
     h->reset (hard_reset);
 }
 
-#ifndef SLOW_NEWDATAOBJECTS
-void SGImplSvc::addedNewPersObject(CLID, DataProxy*) const {}
-void SGImplSvc::addedNewTransObject(CLID, const std::string&) {}
-#else
-void SGImplSvc::addedNewPersObject(CLID clid, DataProxy* dp) const {
-  lock_t lock (m_mutex);
-  //if proxy is loading from persistency
-  //add key of object to list of "newly recorded" objects
-  if (0 != dp->provider()) {
-    // The object itself.
-    s_newObjs.insert(DataObjID(clid,dp->name()));
-
-    // Aliases.
-    for (const std::string& alias : dp->alias()) {
-      s_newObjs.insert(DataObjID(clid,alias));
-    }
-
-    // Symlinks.
-    for (CLID clid2 : dp->transientID()) {
-      if (clid2 != clid)
-        s_newObjs.insert(DataObjID(clid2,dp->name()));
-    }
-  }
-}
-void SGImplSvc::addedNewTransObject(CLID clid, const std::string& key) const {
-  lock_t lock (m_mutex);
-  s_newObjs.insert(DataObjID(clid,key));
-}
-#endif
-
 
 /**
  * @brief Tell the store that a proxy has been bound to a handle.
diff --git a/Control/StoreGate/src/StoreGateSvc.cxx b/Control/StoreGate/src/StoreGateSvc.cxx
index 1ec81eead82..48e042e1065 100644
--- a/Control/StoreGate/src/StoreGateSvc.cxx
+++ b/Control/StoreGate/src/StoreGateSvc.cxx
@@ -73,33 +73,11 @@ StoreGateSvc::currentSlot() {
 /////////////////////////////////////////////////////////////////
 
 
-bool 
-StoreGateSvc::newDataObjectsPresent() {
-  _SGXCALL(newDataObjectsPresent, (), false);
-}
-
-StatusCode 
-StoreGateSvc::getNewDataObjects(DataObjIDColl& products) {
-  _SGXCALL(getNewDataObjects, (products), StatusCode::FAILURE);
-}
-
 void
 StoreGateSvc::commitNewDataObjects() {
   _SGVOIDCALL(commitNewDataObjects, ());
 }
 
-///a new object transient object has been recorded
-void 
-StoreGateSvc::addedNewTransObject(CLID clid, const std::string& key) {
-  _SGVOIDCALL(addedNewTransObject, (clid, key));
-}
-
-///a new object persistent object has been recorded
-void 
-StoreGateSvc::addedNewPersObject(CLID clid, SG::DataProxy* dp) {
-  _SGVOIDCALL(addedNewPersObject, (clid, dp));
-}
-
 /// Create a proxy object using an IOpaqueAddress and a transient key
 StatusCode 
 StoreGateSvc::recordAddress(const std::string& skey,
diff --git a/Control/StoreGate/test/SGHive_test.cxx b/Control/StoreGate/test/SGHive_test.cxx
index f597bdd0e77..9e91026a995 100644
--- a/Control/StoreGate/test/SGHive_test.cxx
+++ b/Control/StoreGate/test/SGHive_test.cxx
@@ -85,34 +85,14 @@ public:
       m_rHSG(rHSG){}
     void testNewDataObjects(StoreGateSvc& rSG) 
     {  
-      DataObjIDColl products;
-      rSG.getNewDataObjects(products).ignore(); //reset counter
-      assert( !rSG.newDataObjectsPresent() );
-      assert( products.empty() );
-      //direct call
-      rSG.currentStore()->addedNewTransObject(ClassID_traits<SG::Foo>::ID(), "blassed");  
       rSG.commitNewDataObjects();
-      rSG.getNewDataObjects(products).ignore();    
-      assert( 1 == products.size() );
-      assert (products.count (DataObjID (81010,"blassed")) == 1);
 
       //add something to store
       assert(rSG.record(new SG::Foo(1), "pFoo1").isSuccess());
       assert(rSG.record(new SG::Foo(2), "pFoo2").isSuccess());
       rSG.commitNewDataObjects();
-      assert( rSG.newDataObjectsPresent() );
-      rSG.getNewDataObjects(products).ignore();
-      assert( 2 == products.size() );
-      assert (products.count (DataObjID (81010,"pFoo1")) == 1);
-      //we have emptied newdataobject array with call to newDataObjects
-      assert( !rSG.newDataObjectsPresent() );
       assert(rSG.record(new SG::Foo(3), "pFoo3").isSuccess());
       rSG.commitNewDataObjects();
-      assert( rSG.newDataObjectsPresent() );
-      rSG.getNewDataObjects(products).ignore();    
-      assert( 1 == products.size() );
-      //      assert (products.count (DataObjID (81010,"pFoo3")) == 1);
-      assert (products.count (DataObjID ("SG::Foo","pFoo3")) == 1);
     }
     void testNoSlot() {
       cout << "\n*** SGHive_test noSlot BEGINS ***" << endl;
-- 
GitLab