From 50a7b9187bc21a31c5170dd35dcdf19a358d68f2 Mon Sep 17 00:00:00 2001
From: Charles Leggett <charles.g.leggett@gmail.com>
Date: Tue, 5 Dec 2017 08:43:20 +0000
Subject: [PATCH] updates for gaudi v30r0

---
 .../src/CaloClusterTimeTool.cxx               |  3 +-
 .../CaloCondPhysAlgs/src/LArMinBiasAlg.cxx    |  8 +-
 .../CaloTools/src/CaloLumiBCIDTool.cxx        |  4 +
 Control/AthViews/AthViews/AthViewAlgorithm.h  |  3 -
 .../AthenaBaseComps/AthAlgTool.h              | 18 ++--
 .../AthenaBaseComps/AthAlgorithm.h            | 19 ++--
 .../AthenaBaseComps/AthReentrantAlgorithm.h   | 18 ++--
 .../AthenaBaseComps/AthService.h              | 24 +++---
 Control/AthenaBaseComps/src/AthAlgTool.cxx    | 11 +--
 Control/AthenaBaseComps/src/AthAlgorithm.cxx  | 11 +--
 .../src/AthReentrantAlgorithm.cxx             | 11 ++-
 Control/AthenaBaseComps/src/AthService.cxx    | 86 +------------------
 .../share/SlotSpecificObj_test.ref            |  9 +-
 .../test/SlotSpecificObj_test.cxx             |  8 +-
 .../share/AthenaOutputStream_test.ref         | 57 ++++++------
 Control/AthenaServices/share/RCUSvc_test.ref  |  1 -
 Control/AthenaServices/src/DecisionSvc.cxx    |  2 -
 Control/AthenaServices/test/RCUSvc_test.cxx   |  8 +-
 Control/SGComps/share/SGFolder_test.ref       | 22 ++---
 Control/StoreGate/share/SGHive_test.ref       | 80 ++++++++---------
 Control/StoreGate/src/SGHiveMgrSvc.cxx        | 32 ++++++-
 Control/StoreGate/src/SGHiveMgrSvc.h          | 21 +++--
 Control/StoreGate/src/SGImplSvc.cxx           |  1 +
 Control/StoreGate/test/SGHive_test.cxx        |  2 +-
 .../DataQualityTools/src/DQTBackgroundMon.cxx |  1 +
 .../src/DQTNonCollBkg_ZDC.cxx                 |  3 +-
 .../src/GRLTriggerSelectorAlg.cxx             |  1 +
 ForwardDetectors/ZDC/ZdcRec/src/ZdcRec.cxx    |  4 +-
 ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV2.cxx  |  3 +-
 ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV3.cxx  |  1 +
 .../GenInterfaces/IHepMCWeightSvc.h           |  1 +
 .../PixelCabling/IPixelCablingSvc.h           |  1 +
 .../InDetPhysValMonitoring/src/ErrorHandler.h |  1 +
 .../src/LArAffectedRegionAlg.cxx              |  1 +
 .../LArBadChannelTool/src/LArBadChanTool.cxx  |  1 +
 .../LArCafJobs/LArCafJobs/LArShapeDumper.h    |  2 +-
 .../LArCalibUtils/src/LArCalibDigitMaker.cxx  |  1 +
 .../LArCalibUtils/src/LArOFCAlg.cxx           |  1 +
 .../LArCellRec/src/LArBadFebMaskingTool.cxx   |  4 +-
 .../LArCellRec/src/LArCellDeadOTXCorr.cxx     |  1 +
 .../LArCellRec/src/LArCellGainPathology.cxx   |  1 +
 .../LArCellRec/src/LArCellMerger.cxx          |  1 +
 .../LArCellRec/src/LArNoisyROTool.cxx         |  4 +-
 .../LArCondUtils/src/LArHV2Ntuple.cxx         |  3 +-
 .../LArCondUtils/src/LArHVPathologyDbAlg.cxx  |  1 +
 .../LArDigitization/src/LArHitEMap.cxx        |  1 +
 .../LArMonTools/src/LArDigitMon.cxx           |  3 +
 .../src/LArHVCorrectionMonTool.cxx            |  1 +
 .../LArRawChannelBuilderToolBaseClass.h       |  4 +-
 LArCalorimeter/LArROD/src/LArDigitThinner.cxx |  1 +
 .../share/LArFCalTowerBuilderTool.ref         |  4 +-
 .../LArRecUtils/src/LArAutoCorrNoiseTool.cxx  |  5 ++
 .../LArRecUtils/src/LArHVCorrTool.cxx         |  1 +
 .../LArRecUtils/src/LArHVScaleRetriever.cxx   |  1 +
 .../src/MdtRawDataValAlg.cxx                  |  1 -
 Projects/AthSimulation/externals.txt          |  2 +-
 Projects/Athena/externals.txt                 |  2 +-
 .../src/TrigVsOfflineMissingETTool.cxx        |  4 +-
 .../src/CombinedMuonTrackBuilder.cxx          |  1 +
 .../src/MuonInsideOutRecoTool.cxx             |  3 +-
 .../src/BeamBackgroundFiller.cxx              |  2 +
 .../src/TileCisDefaultCalibTool.cxx           |  1 +
 .../src/TileLaserDefaultCalibTool.cxx         |  1 +
 .../src/TileLaserLinearityCalibTool.cxx       |  1 +
 .../src/TileCondToolOfcCool.cxx               |  2 +-
 .../TileL2Algs/src/TileL2Builder.cxx          |  2 +-
 .../TileMonitoring/src/TileRODMonTool.cxx     |  1 +
 .../TileRecUtils/src/TileRawChannelMaker.cxx  |  3 +
 .../TileSimAlgs/src/TileDigitsFromPulse.cxx   |  7 +-
 .../src/TilePulseForTileMuonReceiver.cxx      | 11 ++-
 .../TileTBRec/src/TileTBOldNtupleRead.cxx     |  1 +
 .../TrkiPatFitterUtils/MessageHelper.h        |  8 +-
 .../TrigCaloRec/src/TrigLArNoisyROAlg.cxx     |  1 +
 .../TrigL2MuonSA/src/MuFastTrackFitter.cxx    | 59 +++++++------
 .../Root/TrigDecisionTool.cxx                 | 20 +++--
 .../TrigDecisionTool/TrigDecisionTool.h       |  6 +-
 .../TriggerMatchingTool/Root/MatchingTool.cxx |  2 +-
 .../TrigConfigSvc/HLTConfigSvc.h              |  2 -
 .../TrigConfigSvc/HLTJobOptionsSvc.h          |  2 -
 .../RatesAnalysis/src/RatesAnalysisAlg.cxx    |  1 +
 .../TrigBphysHypo/src/TrigL2BMuMuFex.cxx      |  1 +
 .../TrigBphysHypo/src/TrigL2TrkMassFex.cxx    |  1 +
 .../TrigCaloMonitoring/src/HLTCaloTool.cxx    |  1 +
 .../TrigCaloMonitoring/src/HLTCaloToolL2.cxx  |  1 +
 .../TrigSteer/ViewAlgsTest/share/EVTest.py    |  7 +-
 .../share/EmuStepProcessingTest.py            |  7 +-
 .../TrigUpgradeTest/share/cfTest.py           |  7 +-
 .../TrigUpgradeTest/share/mergeTest.py        |  7 +-
 88 files changed, 361 insertions(+), 334 deletions(-)

diff --git a/Calorimeter/CaloClusterCorrection/src/CaloClusterTimeTool.cxx b/Calorimeter/CaloClusterCorrection/src/CaloClusterTimeTool.cxx
index 50b1a889da3..538c1e69e8c 100755
--- a/Calorimeter/CaloClusterCorrection/src/CaloClusterTimeTool.cxx
+++ b/Calorimeter/CaloClusterCorrection/src/CaloClusterTimeTool.cxx
@@ -34,7 +34,8 @@ using xAOD::CaloCluster;
 CaloClusterTimeTool::CaloClusterTimeTool (const std::string& type,const std::string& name,const IInterface* parent)
    :  AthAlgTool( type, name, parent ),
       m_LArOnlineIDHelper(nullptr),
-      m_calo_id(nullptr)
+      m_calo_id(nullptr),
+      m_LArCablingService("LArCablingService")
 {
   declareInterface<ICaloClusterTimeTool>(this);
   
diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
index abd57f4a14d..3c9b3c36cf4 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
@@ -27,8 +27,12 @@
   //Constructor
   LArMinBiasAlg:: LArMinBiasAlg(const std::string& name, ISvcLocator* pSvcLocator):
     AthAlgorithm(name,pSvcLocator),
-    m_larmcsym("LArMCSymTool"),m_datasetID_lowPt(119995),m_datasetID_highPt(119996),
-    m_weight_lowPt(39.8606),m_weight_highPt(0.138128)
+    m_larmcsym("LArMCSymTool"),
+    m_datasetID_lowPt(119995),
+    m_datasetID_highPt(119996),
+    m_weight_lowPt(39.8606),
+    m_weight_highPt(0.138128),
+    m_cablingService("LArCablingService")
   {
      declareProperty("datasetID_lowPt",m_datasetID_lowPt);
      declareProperty("datasetID_highPt",m_datasetID_highPt);
diff --git a/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx b/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx
index 35a71556436..4516409b4be 100644
--- a/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx
+++ b/Calorimeter/CaloTools/src/CaloLumiBCIDTool.cxx
@@ -15,6 +15,7 @@ CaloLumiBCIDTool::CaloLumiBCIDTool (const std::string& type,
 				  const std::string& name, 
 				  const IInterface* parent) :
     AthAlgTool(type, name, parent),
+    m_cablingService("LArCablingService"),
     m_larmcsym("LArMCSymTool"),
     m_OFCTool("LArOFCTool"),
     m_lumiTool("LuminosityTool"),
@@ -99,16 +100,19 @@ StatusCode CaloLumiBCIDTool::initialize() {
                                   dynamic_cast<ICaloLumiBCIDTool*>(this),
                                   m_dd_ofc,m_keyOFC,true) );
     ATH_MSG_INFO( "Registered callback for key: " << m_keyOFC  );
+    m_OFCTool.disable();
   }
 
 // get LumiTool
   if (m_isMC) {
     ATH_CHECK( m_bunchCrossingTool.retrieve() );
     ATH_MSG_DEBUG(" -- bunch crossing Tool retrieved");
+    m_lumiTool.disable();
   
   } else {
     ATH_CHECK( m_lumiTool.retrieve() );
     ATH_MSG_DEBUG(" -- Lumi Tool retrieved");
+    m_bunchCrossingTool.disable();
   }
 
  //
diff --git a/Control/AthViews/AthViews/AthViewAlgorithm.h b/Control/AthViews/AthViews/AthViewAlgorithm.h
index b71a73965ad..30cf76ebb17 100755
--- a/Control/AthViews/AthViews/AthViewAlgorithm.h
+++ b/Control/AthViews/AthViews/AthViewAlgorithm.h
@@ -22,9 +22,6 @@ class AthViewAlgorithm : public AthAlgorithm
   // Public methods: 
   /////////////////////////////////////////////////////////////////// 
  public: 
-  // fwd compat w/ gaudi-21
-  using AthMessaging::msg;
-
   // Copy constructor: 
 
   /// Constructor with parameters: 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
index 555af17d4f0..894d772533d 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgTool.h
@@ -38,7 +38,6 @@ namespace Gaudi {
 #include "AthenaBaseComps/AthMemMacros.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "AthenaBaseComps/AthCheckMacros.h"
-#include "AthenaBaseComps/AthMessaging.h"
 #include "AthenaBaseComps/HandleClassifier.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "StoreGate/VarHandleProperty.h"
@@ -51,8 +50,7 @@ namespace Gaudi {
 
 
 class AthAlgTool : 
-  public ::AlgTool,
-  public ::AthMessaging
+  public ::AlgTool
 { 
 
   /////////////////////////////////////////////////////////////////// 
@@ -60,9 +58,6 @@ class AthAlgTool :
   /////////////////////////////////////////////////////////////////// 
 public: 
 
-  // fwd compat w/ gaudi-21
-  using AthMessaging::msg;
-
   // Copy constructor: 
 
   /// Constructor with parameters: 
@@ -331,6 +326,17 @@ public:
   virtual std::vector<Gaudi::DataHandle*> outputHandles() const override;
 
 
+  // forward to CommonMessaging
+  inline MsgStream& msg() const {
+    return msgStream();
+  }
+  inline MsgStream& msg(const MSG::Level lvl) const {
+    return msgStream(lvl);
+  }
+  inline bool msgLvl(const MSG::Level lvl) const {
+    return msgLevel(lvl);
+  }
+
   /////////////////////////////////////////////////////////////////// 
   // Non-const methods: 
   /////////////////////////////////////////////////////////////////// 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
index 059e9c50aa4..019239a3d08 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthAlgorithm.h
@@ -38,7 +38,6 @@ namespace Gaudi {
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthCheckMacros.h"
 #include "AthenaBaseComps/AthMemMacros.h"
-#include "AthenaBaseComps/AthMessaging.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "AthenaBaseComps/HandleClassifier.h"
 #include "StoreGate/StoreGateSvc.h"
@@ -75,17 +74,13 @@ namespace Gaudi {
  */ 
 
 class AthAlgorithm
-  : public ::Algorithm,
-    public ::AthMessaging
+  : public ::Algorithm
 { 
   /////////////////////////////////////////////////////////////////// 
   // Public methods: 
   /////////////////////////////////////////////////////////////////// 
  public: 
 
-  // fwd compat w/ gaudi-21
-  using AthMessaging::msg;
-
   // Copy constructor: 
 
   /// Constructor with parameters: 
@@ -385,6 +380,18 @@ public:
   virtual const DataObjIDColl& extraOutputDeps() const override;
 
 
+  // forward to CommonMessaging
+  inline MsgStream& msg() const {
+    return msgStream();
+  }
+  inline MsgStream& msg(const MSG::Level lvl) const {
+    return msgStream(lvl);
+  }
+  inline bool msgLvl(const MSG::Level lvl) const {
+    return msgLevel(lvl);
+  }
+  
+  
   /////////////////////////////////////////////////////////////////// 
   // Non-const methods: 
   /////////////////////////////////////////////////////////////////// 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
index 98a637f23c4..b7b9bd05caa 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthReentrantAlgorithm.h
@@ -48,7 +48,6 @@ namespace Gaudi {
 #include "GaudiKernel/ServiceHandle.h"
 #include "AthenaBaseComps/AthCheckMacros.h"
 #include "AthenaBaseComps/AthMemMacros.h"
-#include "AthenaBaseComps/AthMessaging.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "AthenaBaseComps/HandleClassifier.h"
 #include "StoreGate/StoreGateSvc.h"
@@ -114,17 +113,13 @@ namespace Gaudi {
 
 
 class AthReentrantAlgorithm
-  : public ::ReEntAlgorithm,
-    public ::AthMessaging
+  : public ::ReEntAlgorithm
 { 
   /////////////////////////////////////////////////////////////////// 
   // Public methods: 
   /////////////////////////////////////////////////////////////////// 
  public: 
 
-  // fwd compat w/ gaudi-21
-  using AthMessaging::msg;
-
   // Copy constructor: 
 
   /// Constructor with parameters: 
@@ -428,6 +423,17 @@ public:
   virtual const DataObjIDColl& extraOutputDeps() const override;
 
 
+  // forward to CommonMessaging
+  inline MsgStream& msg() const {
+    return msgStream();
+  }
+  inline MsgStream& msg(const MSG::Level lvl) const {
+    return msgStream(lvl);
+  }
+  inline bool msgLvl(const MSG::Level lvl) const {
+    return msgLevel(lvl);
+  }
+
   /////////////////////////////////////////////////////////////////// 
   // Non-const methods: 
   /////////////////////////////////////////////////////////////////// 
diff --git a/Control/AthenaBaseComps/AthenaBaseComps/AthService.h b/Control/AthenaBaseComps/AthenaBaseComps/AthService.h
index 5088b35f8c2..da5ca8087a6 100644
--- a/Control/AthenaBaseComps/AthenaBaseComps/AthService.h
+++ b/Control/AthenaBaseComps/AthenaBaseComps/AthService.h
@@ -17,7 +17,6 @@
 // Framework includes
 #include "GaudiKernel/Service.h"
 #include "GaudiKernel/MsgStream.h"
-#include "AthenaBaseComps/AthMessaging.h"
 #include "AthenaBaseComps/AthMsgStreamMacros.h"
 #include "AthenaBaseComps/AthCheckMacros.h"
 
@@ -31,8 +30,7 @@ class ISvcLocator;
 template <class TYPE> class SvcFactory;
 
 class AthService : 
-  public ::Service, 
-  public ::AthMessaging
+  public ::Service
 { 
  protected:
   friend class SvcFactory<AthService>;
@@ -42,9 +40,6 @@ class AthService :
   /////////////////////////////////////////////////////////////////// 
  public: 
 
-  // fwd compat w/ gaudi-21
-  using ::AthMessaging::msg;
-
   // Copy constructor: 
 
   /// Constructor with parameters: 
@@ -68,6 +63,17 @@ class AthService :
   virtual StatusCode queryInterface( const InterfaceID& riid, 
                                      void** ppvInterface );
 
+  // forward to CommonMessaging
+  inline MsgStream& msg() const {
+    return msgStream();
+  }
+  inline MsgStream& msg(const MSG::Level lvl) const {
+    return msgStream(lvl);
+  }
+  inline bool msgLvl(const MSG::Level lvl) const {
+    return msgLevel(lvl);
+  }
+
   /////////////////////////////////////////////////////////////////// 
   // Const methods: 
   ///////////////////////////////////////////////////////////////////
@@ -81,9 +87,6 @@ class AthService :
   /////////////////////////////////////////////////////////////////// 
  protected: 
 
-  /// callback for output level property 
-  void msg_update_handler(Property& outputLevel);
-
   /////////////////////////////////////////////////////////////////// 
   // Private data: 
   /////////////////////////////////////////////////////////////////// 
@@ -94,9 +97,6 @@ class AthService :
   AthService (const AthService&);
   AthService& operator= (const AthService&);
 
-  /// need to cache output level during initialize
-  int m_ol;
-
 }; 
 
 /////////////////////////////////////////////////////////////////// 
diff --git a/Control/AthenaBaseComps/src/AthAlgTool.cxx b/Control/AthenaBaseComps/src/AthAlgTool.cxx
index 2f5b2209929..ef62075d4fe 100644
--- a/Control/AthenaBaseComps/src/AthAlgTool.cxx
+++ b/Control/AthenaBaseComps/src/AthAlgTool.cxx
@@ -27,7 +27,6 @@ AthAlgTool::AthAlgTool( const std::string& type,
 			const std::string& name, 
 			const IInterface* parent ) : 
   ::AlgTool      ( type, name, parent ),
-  ::AthMessaging ( msgSvc(),     name ),
   m_evtStore     ( "StoreGateSvc/StoreGateSvc",  name ),
   m_detStore     ( "StoreGateSvc/DetectorStore", name ),
   m_userStore    ( "UserDataSvc/UserDataSvc", name ),
@@ -39,10 +38,7 @@ AthAlgTool::AthAlgTool( const std::string& type,
 
   auto props = getProperties();
   for( Property* prop : props ) {
-    if( prop->name() == "OutputLevel" ) {
-      prop->declareUpdateHandler
-        (&AthAlgTool::msg_update_handler, this);
-    } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+    if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
       prop->declareUpdateHandler
         (&AthAlgTool::extraDeps_update_handler, this);
     }
@@ -68,7 +64,6 @@ AthAlgTool::AthAlgTool( const std::string& type,
 ///////////////
 AthAlgTool::~AthAlgTool()
 { 
-  ATH_MSG_DEBUG ("Calling destructor");
 }
 
 
@@ -162,9 +157,9 @@ AthAlgTool::msg_update_handler( Property& outputLevel )
    // type at one point, to be able to fall back on something.
    IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel );
    if( iprop ) {
-      this->setLevel( static_cast<MSG::Level> (iprop->value()) );
+     msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) );
    } else {
-      this->setLevel( msgLevel() );
+     msgStream().setLevel( msgLevel() );
    }
 }
 
diff --git a/Control/AthenaBaseComps/src/AthAlgorithm.cxx b/Control/AthenaBaseComps/src/AthAlgorithm.cxx
index c58751afcfc..153f1663028 100644
--- a/Control/AthenaBaseComps/src/AthAlgorithm.cxx
+++ b/Control/AthenaBaseComps/src/AthAlgorithm.cxx
@@ -29,7 +29,6 @@ AthAlgorithm::AthAlgorithm( const std::string& name,
 			    ISvcLocator* pSvcLocator,
 			    const std::string& version ) : 
   ::Algorithm   ( name, pSvcLocator, version ),
-  ::AthMessaging( msgSvc(), name ),
   m_evtStore    ( "StoreGateSvc/StoreGateSvc",  name ),
   m_detStore    ( "StoreGateSvc/DetectorStore", name ),
   m_userStore   ( "UserDataSvc/UserDataSvc", name ),
@@ -41,10 +40,7 @@ AthAlgorithm::AthAlgorithm( const std::string& name,
 
   auto props = getProperties();
   for( Property* prop : props ) {
-    if( prop->name() == "OutputLevel" ) {
-      prop->declareUpdateHandler
-        (&AthAlgorithm::msg_update_handler, this);
-    } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
+    if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
       prop->declareUpdateHandler
         (&AthAlgorithm::extraDeps_update_handler, this);
     }
@@ -78,7 +74,6 @@ AthAlgorithm::AthAlgorithm( const std::string& name,
 ///////////////
 AthAlgorithm::~AthAlgorithm()
 { 
-  ATH_MSG_DEBUG ("Calling destructor");
 }
 
 /////////////////////////////////////////////////////////////////// 
@@ -111,9 +106,9 @@ AthAlgorithm::msg_update_handler( Property& outputLevel )
    // type at one point, to be able to fall back on something.
    IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel );
    if( iprop ) {
-      this->setLevel( static_cast<MSG::Level> (iprop->value()) );
+     msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) );
    } else {
-      this->setLevel( msgLevel() );
+     msgStream().setLevel( msgLevel() );
    }
 }
 
diff --git a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
index ed420dd5cbe..c423c0c3896 100644
--- a/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
+++ b/Control/AthenaBaseComps/src/AthReentrantAlgorithm.cxx
@@ -31,7 +31,6 @@ AthReentrantAlgorithm::AthReentrantAlgorithm( const std::string& name,
 			    ISvcLocator* pSvcLocator,
 			    const std::string& version ) : 
   ::ReEntAlgorithm   ( name, pSvcLocator, version ),
-  ::AthMessaging( msgSvc(), name ),
   m_evtStore    ( "StoreGateSvc/StoreGateSvc",  name ),
   m_detStore    ( "StoreGateSvc/DetectorStore", name ),
   m_userStore   ( "UserDataSvc/UserDataSvc", name ),
@@ -41,12 +40,12 @@ AthReentrantAlgorithm::AthReentrantAlgorithm( const std::string& name,
   // Property declaration
   // 
   //declareProperty( "Property", m_nProperty );
-
+  setUpMessaging();
   auto props = getProperties();
   for( Property* prop : props ) {
     if( prop->name() == "OutputLevel" ) {
-      prop->declareUpdateHandler
-        (&AthReentrantAlgorithm::msg_update_handler, this);
+      // prop->declareUpdateHandler
+      //   (&AthReentrantAlgorithm::msg_update_handler, this);
     } else if (prop->name() == "ExtraOutputs" || prop->name() == "ExtraInputs") {
       prop->declareUpdateHandler
         (&AthReentrantAlgorithm::extraDeps_update_handler, this);
@@ -114,9 +113,9 @@ AthReentrantAlgorithm::msg_update_handler( Property& outputLevel )
    // type at one point, to be able to fall back on something.
    IntegerProperty* iprop = dynamic_cast< IntegerProperty* >( &outputLevel );
    if( iprop ) {
-      this->setLevel( static_cast<MSG::Level> (iprop->value()) );
+     msgStream().setLevel( static_cast<MSG::Level> (iprop->value()) );
    } else {
-      this->setLevel( msgLevel() );
+     msgStream().setLevel( msgLevel() );
    }
 }
 
diff --git a/Control/AthenaBaseComps/src/AthService.cxx b/Control/AthenaBaseComps/src/AthService.cxx
index 241123fa39e..669233bcdcb 100644
--- a/Control/AthenaBaseComps/src/AthService.cxx
+++ b/Control/AthenaBaseComps/src/AthService.cxx
@@ -25,63 +25,23 @@
 ////////////////
 AthService::AthService( const std::string& name, 
 			ISvcLocator* pSvcLocator ) : 
-  ::Service      ( name, pSvcLocator ),
-  ::AthMessaging ( msgSvc(), name ),
-  m_ol(0)
-{
-  //
-  // Property declaration
-  // 
-  //declareProperty( "Property", m_nProperty, "descr" );
-
-  m_outputLevel
-    .declareUpdateHandler
-    (&AthService::msg_update_handler, this);
-
+  ::Service      ( name, pSvcLocator )
+{    
 }
 
 // Destructor
 ///////////////
 AthService::~AthService()
-{ 
-  ATH_MSG_DEBUG ("Calling destructor");
+{
 }
 
 StatusCode AthService::sysInitialize()
 {
-  // Initialize it only if was not done
-#ifdef GAUDIKERNEL_STATEMACHINE_H_
-  if (Gaudi::StateMachine::OFFLINE != this->FSMState()) {
-    m_targetState = Gaudi::StateMachine::CONFIGURED;
-
-#else
-  if( m_state != OFFLINE ) {
-#endif
-    ATH_MSG_WARNING ("Service already initialized");
-    return StatusCode::SUCCESS;
-  }
-
-  // Set the Service's properties
-  ATH_CHECK(setProperties());
-  m_ol = m_outputLevel;
-  // if ( !setProperties().isSuccess() ) {
-  //   return StatusCode::FAILURE;
-  // }
-#ifdef GAUDIKERNEL_STATEMACHINE_H_
-  m_state = Gaudi::StateMachine::ChangeState(Gaudi::StateMachine::CONFIGURE,
-					     m_state);  
-#else
-  m_state = CONFIGURED;
-#endif
-
-  StatusCode sc = Service::sysInitialize();
-  m_outputLevel = m_ol;
-  return sc;
+  return Service::sysInitialize();
 }
 
 StatusCode AthService::initialize()
 {
-  m_outputLevel = m_ol;
   return StatusCode::SUCCESS;
 }
 
@@ -97,18 +57,6 @@ StatusCode AthService::reinitialize()
 
 StatusCode AthService::sysFinalize()
 {
-#ifdef GAUDIKERNEL_STATEMACHINE_H_
-  if (Gaudi::StateMachine::OFFLINE == this->FSMState()) {
-    ATH_MSG_WARNING ("Service already offline");
-    return StatusCode::SUCCESS;
-  }
-#else
-  if( m_state == OFFLINE ) {
-    ATH_MSG_WARNING ("Service already offline");
-    return StatusCode::SUCCESS;
-  }
-  m_state = OFFLINE;
-#endif
   return Service::sysFinalize();
 }
 
@@ -123,29 +71,3 @@ AthService::queryInterface( const InterfaceID& riid,
 {
   return Service::queryInterface( riid, ppvi );
 }
-
-/////////////////////////////////////////////////////////////////// 
-// Const methods: 
-///////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////// 
-// Non-const methods: 
-/////////////////////////////////////////////////////////////////// 
-
-/////////////////////////////////////////////////////////////////// 
-// Protected methods: 
-/////////////////////////////////////////////////////////////////// 
-
-/////////////////////////////////////////////////////////////////// 
-// Const methods: 
-///////////////////////////////////////////////////////////////////
-
-/////////////////////////////////////////////////////////////////// 
-// Non-const methods: 
-/////////////////////////////////////////////////////////////////// 
-
-void 
-AthService::msg_update_handler(Property& /*m_outputLevel*/) 
-{
-  this->setLevel (static_cast<MSG::Level> (outputLevel()));
-}
diff --git a/Control/AthenaKernel/share/SlotSpecificObj_test.ref b/Control/AthenaKernel/share/SlotSpecificObj_test.ref
index d9d6251a24c..a04ce915b99 100644
--- a/Control/AthenaKernel/share/SlotSpecificObj_test.ref
+++ b/Control/AthenaKernel/share/SlotSpecificObj_test.ref
@@ -1,14 +1,15 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/SlotSpecificObj_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/nobackup/atlas/build/../tests/../share/SlotSpecificObj_test.txt
+JobOptionsSvc        INFO # =======> /home/leggett/bld2/work/cmsg/src/Control/AthenaKernel/share/../share/SlotSpecificObj_test.txt
 JobOptionsSvc        INFO # (1,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO Job options successfully read in from ../share/SlotSpecificObj_test.txt
+MessageSvc          DEBUG Service base class initialized successfully
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Thu Jul  6 15:46:33 2017
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v29r1)
+                                          running on zeus on Thu Nov  9 09:47:34 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service AppMgrRunable
@@ -23,9 +24,9 @@ AlgExecStateSvc     DEBUG Service base class initialized successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramDataSvc    DEBUG Service base class initialized successfully
-HistogramPersis...  DEBUG  'CnvServices':[ 'RootHistSvc' ]
 HistogramPersis...  DEBUG Service base class initialized successfully
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
 test1
+TestWhiteBoard      DEBUG Service base class initialized successfully
diff --git a/Control/AthenaKernel/test/SlotSpecificObj_test.cxx b/Control/AthenaKernel/test/SlotSpecificObj_test.cxx
index 113e84cf911..32b401190f2 100644
--- a/Control/AthenaKernel/test/SlotSpecificObj_test.cxx
+++ b/Control/AthenaKernel/test/SlotSpecificObj_test.cxx
@@ -35,13 +35,15 @@ public:
   virtual StatusCode selectStore(size_t /*partitionIndex*/) override { std::abort(); }
   virtual StatusCode clearStore(size_t /*partitionIndex*/) override { std::abort(); }
   virtual StatusCode setNumberOfStores(size_t /*slots*/) override { std::abort(); }
-  virtual StatusCode getNewDataObjects(DataObjIDColl& /*products*/) override { std::abort(); }
-  virtual bool newDataObjectsPresent() override { std::abort(); }
+  virtual DataObjIDColl getNewDataObjects() override { std::abort(); }
+  virtual void addNewDataObjects( DataObjIDColl& /*products*/ ){ std::abort(); }
+  virtual bool exists( const DataObjID& ) override { std::abort(); } 
   virtual size_t allocateStore( int /*evtnumber*/ ) override { std::abort(); }
   virtual StatusCode freeStore( size_t /*partitionIndex*/ ) override { std::abort(); }
   virtual size_t getPartitionNumber(int /*eventnumber*/) const override { std::abort(); }
-
   virtual size_t getNumberOfStores() const override { return nslots; }
+  virtual unsigned int freeSlots() override { std::abort(); }
+
 };
 
 
diff --git a/Control/AthenaServices/share/AthenaOutputStream_test.ref b/Control/AthenaServices/share/AthenaOutputStream_test.ref
index 5d14213f0e6..7639af6cff8 100644
--- a/Control/AthenaServices/share/AthenaOutputStream_test.ref
+++ b/Control/AthenaServices/share/AthenaOutputStream_test.ref
@@ -2,18 +2,19 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/AthenaOutputStream_test.txt
-JobOptionsSvc        INFO # =======> /afs/cern.ch/user/s/ssnyder/atlas-work3/Control/AthenaServices/share/../share/AthenaOutputStream_test.txt
+JobOptionsSvc        INFO # =======> /home/leggett/work/v30r0.msg/src/Control/AthenaServices/share/../share/AthenaOutputStream_test.txt
 JobOptionsSvc        INFO # (5,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (6,1): StoreGateSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (8,1): AthenaOutputStream.OutputLevel = 1
 JobOptionsSvc        INFO # (10,1): AthenaOutputStream.ItemList = ["Bar#uno", "Bar#due", "Bar#tre", "8101#*", "Fee#quattro", "Fee!#cinque", "13#*"]
 JobOptionsSvc        INFO # (15,1): AthenaOutputStream.AcceptAlgs = ["AthenaOutputStream", "aSFQS"]
 JobOptionsSvc        INFO Job options successfully read in from ../share/AthenaOutputStream_test.txt
+MessageSvc          DEBUG Service base class initialized successfully
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
                                                    Welcome to ApplicationMgr (GaudiCoreSvc v29r0)
-                                          running on lxplus012.cern.ch on Fri Oct 27 20:30:38 2017
+                                          running on zeus.lbl.gov on Fri Dec  1 12:14:33 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service AppMgrRunable
@@ -28,7 +29,6 @@ AlgExecStateSvc     DEBUG Service base class initialized successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramDataSvc    DEBUG Service base class initialized successfully
-HistogramPersis...  DEBUG  'CnvServices':[ 'RootHistSvc' ]
 HistogramPersis...  DEBUG Service base class initialized successfully
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
@@ -36,8 +36,6 @@ ApplicationMgr Ready
 ClassIDSvc          DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [ModuleLoaded] listener 'ClassIDSvc' with priority 100
 ClassIDSvc           INFO  getRegistryEntries: read 917 CLIDRegistry entries for module ALL
-ClassIDSvc          DEBUG processCLIDDB: read 1471 entries from CLIDDB file: /afs/cern.ch/user/s/ssnyder/atlas-work3/build-x86_64-slc6-gcc62-opt/x86_64-slc6-gcc62-opt/share/clid.db
-ClassIDSvc          DEBUG processCLIDDB: read 1471 entries from CLIDDB file: /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-10-26T2259/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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
@@ -51,7 +49,6 @@ TimelineSvc         DEBUG Service base class initialized successfully
 TimelineSvc         DEBUG initialize
 AthenaOutputStreamVERBOSE ServiceLocatorHelper::service: found service TimelineSvc
 AthenaOutputStream  DEBUG In initialize 
-DecisionSvc         DEBUG In DecisionSvc::DecisionSvc 
 IncidentSvc         DEBUG Adding [EndEvent] listener 'DecisionSvc' with priority 100
 AthenaOutputStream  DEBUG Found IDecisionSvc.
 DecisionSvc          INFO Inserting stream: AthenaOutputStream with no Algs
@@ -74,7 +71,9 @@ MetaDataStore_Impl  DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [EndEvent] listener 'MetaDataStore' with priority 100
 IncidentSvc         DEBUG Adding [BeginEvent] listener 'MetaDataStore' with priority 100
 AthenaPoolCnvSvc     INFO Initializing AthenaPoolCnvSvc - package version AthenaPoolCnvSvc-00-00-00
+DataModelCompatSvc  DEBUG Property update for OutputLevel : new value = -777138672
 DataModelCompatSvc  DEBUG FILE:LINE (StatusCode DataModelCompatSvc::initialize()): running
+DataModelCompatSvcVERBOSE ServiceLocatorHelper::service: found service IncidentSvc
 IncidentSvc         DEBUG Adding [BeginEvent] listener 'DataModelCompatSvc' with priority 0
 IoComponentMgr      DEBUG --> initialize()
 IoComponentMgr      DEBUG Service base class initialized successfully
@@ -87,19 +86,12 @@ IoComponentMgr      DEBUG --> io_hasitem()
 PoolSvc              INFO io_register[PoolSvc](xmlcatalog_file:PoolFileCatalog.xml) [ok]
 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) will be considered for COOL data
-DBReplicaSvc         INFO Read replica configuration from /cvmfs/atlas-nightlies.cern.ch/repo/sw/master/2017-10-26T2259/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-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 lxplus012.cern.ch [ATLF ATLAS_COOLPROD atlas_dd ATLAS_CONFIG INT8R INTR ATONR_COOL ATONR_CONF DEVDB11 ATLF ]
+DBReplicaSvc        DEBUG HOSTNAME zeus has no domain - try hostname --fqdn
+DBReplicaSvc        DEBUG HOSTNAME from fqdn: zeus.lbl.gov
+DBReplicaSvc         INFO Frontier server at (serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(proxyurl=http://msquid01-ib.nersc.gov:3128)(proxyurl=http://msquid02-ib.nersc.gov:3128) will be considered for COOL data
+DBReplicaSvc         INFO Read replica configuration from /bld1/leggett/build/v30r0.msg/build/install/Athena/22.0.0/InstallArea/x86_64-slc6-gcc62-dbg/share/dbreplica.config
+DBReplicaSvc        DEBUG Candidate server ATLF (priority -2300)
+DBReplicaSvc         INFO Total of 1 servers found for host zeus.lbl.gov [ATLF ]
 PoolSvc              INFO Successfully setup replica sorting algorithm
 PoolSvc             DEBUG OutputLevel is 
 PoolSvc              INFO Setting up APR FileCatalog and Streams
@@ -117,6 +109,7 @@ IncidentSvc         DEBUG Adding [BeginInputFile] listener 'MetaDataSvc' with pr
 IncidentSvc         DEBUG Adding [EndInputFile] listener 'MetaDataSvc' with priority 10
 IncidentSvc         DEBUG Adding [EndTagFile] listener 'MetaDataSvc' with priority 10
 IncidentSvc         DEBUG Adding [LastInputFile] listener 'MetaDataSvc' with priority 10
+IncidentSvc         DEBUG Adding [ShmProxy] listener 'MetaDataSvc' with priority 90
 IoComponentMgr      DEBUG --> io_register(MetaDataSvc)
 IoComponentMgr      DEBUG     registering IoComponent "MetaDataSvc"
 AthenaOutputStr...  DEBUG Property update for OutputLevel : new value = 1
@@ -143,24 +136,24 @@ AthenaOutputStream  DEBUG output handles: 0
 AthenaOutputStream  DEBUG Registering all Tools in ToolHandleArray HelperTools
 AthenaOutputStream  DEBUG Adding private ToolHandle tool AthenaOutputStream.AthenaOutputStreamTool (AthenaOutputStreamTool)
 AthenaOutputStream  DEBUG Data Deps for AthenaOutputStream
-ClassIDSvc           INFO  getRegistryEntries: read 928 CLIDRegistry entries for module ALL
-StoreGateSvc_Impl   DEBUG Recorded object @0x2908180 with key uno of type Foo(CLID 8101)
- in DataObject @0x29081c0
+ClassIDSvc           INFO  getRegistryEntries: read 929 CLIDRegistry entries for module ALL
+StoreGateSvc_Impl   DEBUG Recorded object @0x3737610 with key uno of type Foo(CLID 8101)
+ in DataObject @0x3737550
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x299f710 with key due of type Foo(CLID 8101)
- in DataObject @0x1fb0a90
+StoreGateSvc_Impl   DEBUG Recorded object @0x2bdb430 with key due of type Foo(CLID 8101)
+ in DataObject @0x37d19d0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x1fb0710 with key uno of type Bar(CLID 8107)
- in DataObject @0x1fb08d0
+StoreGateSvc_Impl   DEBUG Recorded object @0x2c1e1e0 with key uno of type Bar(CLID 8107)
+ in DataObject @0x37d20e0
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x2908a50 with key due of type Bar(CLID 8107)
- in DataObject @0x2906e80
+StoreGateSvc_Impl   DEBUG Recorded object @0x37d1760 with key due of type Bar(CLID 8107)
+ in DataObject @0x2c36d30
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x2908790 with key quattro of type Bar(CLID 8107)
- in DataObject @0x29070f0
+StoreGateSvc_Impl   DEBUG Recorded object @0x37367c0 with key quattro of type Bar(CLID 8107)
+ in DataObject @0x3737060
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0x29086a0 with key cinque of type Bar(CLID 8107)
- in DataObject @0x299f360
+StoreGateSvc_Impl   DEBUG Recorded object @0x3737e00 with key cinque of type Bar(CLID 8107)
+ in DataObject @0x37383f0
  object modifiable when retrieved
 AthenaOutputStr...WARNING add: can not find clid 13 in clid db
 AthenaOutputStream  DEBUG addItemObjects(13,"*") called
diff --git a/Control/AthenaServices/share/RCUSvc_test.ref b/Control/AthenaServices/share/RCUSvc_test.ref
index 3761336104f..9434f3e2d07 100644
--- a/Control/AthenaServices/share/RCUSvc_test.ref
+++ b/Control/AthenaServices/share/RCUSvc_test.ref
@@ -31,7 +31,6 @@ EventLoopMgr      WARNING Unable to locate service "EventSelector"
 EventLoopMgr      WARNING No events will be processed from external input.
 HistogramDataSvc    DEBUG Property update for OutputLevel : new value = 2
 HistogramDataSvc    DEBUG Service base class initialized successfully
-HistogramPersis...  DEBUG  'CnvServices':[ 'RootHistSvc' ]
 HistogramPersis...  DEBUG Service base class initialized successfully
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
diff --git a/Control/AthenaServices/src/DecisionSvc.cxx b/Control/AthenaServices/src/DecisionSvc.cxx
index 0984f387801..41e03a7a7ad 100644
--- a/Control/AthenaServices/src/DecisionSvc.cxx
+++ b/Control/AthenaServices/src/DecisionSvc.cxx
@@ -36,8 +36,6 @@ DecisionSvc::DecisionSvc(const std::string& name,
 {
   declareProperty("CalcStats",m_calcStats);
 
-  ATH_MSG_DEBUG ("In DecisionSvc::DecisionSvc ");
-
   assert( pSvcLocator );
 }
 
diff --git a/Control/AthenaServices/test/RCUSvc_test.cxx b/Control/AthenaServices/test/RCUSvc_test.cxx
index f078f02ecd4..b6e21bdfad0 100644
--- a/Control/AthenaServices/test/RCUSvc_test.cxx
+++ b/Control/AthenaServices/test/RCUSvc_test.cxx
@@ -46,13 +46,15 @@ public:
   virtual StatusCode selectStore(size_t /*partitionIndex*/) override { std::abort(); }
   virtual StatusCode clearStore(size_t /*partitionIndex*/) override { std::abort(); }
   virtual StatusCode setNumberOfStores(size_t /*slots*/) override { std::abort(); }
-  virtual StatusCode getNewDataObjects(DataObjIDColl& /*products*/) override { std::abort(); }
-  virtual bool newDataObjectsPresent() override { std::abort(); }
+  virtual DataObjIDColl getNewDataObjects() override { std::abort(); }
+  virtual void addNewDataObjects( DataObjIDColl& /*products*/ ){ std::abort(); }
+  virtual bool exists( const DataObjID& ) override { std::abort(); }
   virtual size_t allocateStore( int /*evtnumber*/ ) override { std::abort(); }
   virtual StatusCode freeStore( size_t /*partitionIndex*/ ) override { std::abort(); }
   virtual size_t getPartitionNumber(int /*eventnumber*/) const override { std::abort(); }
-
   virtual size_t getNumberOfStores() const override { return nslots; }
+  virtual unsigned int freeSlots() override { std::abort(); }
+
 };
 
 
diff --git a/Control/SGComps/share/SGFolder_test.ref b/Control/SGComps/share/SGFolder_test.ref
index 7c3c0ab3e14..4aa85877085 100644
--- a/Control/SGComps/share/SGFolder_test.ref
+++ b/Control/SGComps/share/SGFolder_test.ref
@@ -2,50 +2,40 @@
 
 
 Initializing Gaudi ApplicationMgr using job opts ../share/SGFolder_test.txt
-JobOptionsSvc        INFO # =======> /home/sss/atlas/dvtest/build/../tests/../share/SGFolder_test.txt
+JobOptionsSvc        INFO # =======> /home/leggett/work/v30r0.msg/src/Control/SGComps/share/../share/SGFolder_test.txt
 JobOptionsSvc        INFO # (5,1): MessageSvc.OutputLevel = 2
 JobOptionsSvc        INFO # (6,1): ToolSvc.MyFolder.ItemList = ["Foo#Bla", "Bar#*", "8101", "8107#", "Baricco#*"]
 JobOptionsSvc        INFO # (7,1): ToolSvc.MyFolder.CheckItems = 1
 JobOptionsSvc        INFO Job options successfully read in from ../share/SGFolder_test.txt
+MessageSvc          DEBUG Service base class initialized successfully
 ApplicationMgr      DEBUG Getting my own properties
 ApplicationMgr    SUCCESS 
 ====================================================================================================================================
-                                                   Welcome to ApplicationMgr (GaudiCoreSvc v27r1p99)
-                                          running on karma on Sun May 15 22:59:34 2016
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v29r0)
+                                          running on zeus.lbl.gov on Fri Dec  1 11:36:27 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 ServiceManager      DEBUG Initializing service AppMgrRunable
-AppMgrRunable       DEBUG Property update for OutputLevel : new value = 2
 AppMgrRunable       DEBUG Service base class initialized successfully
 ServiceManager      DEBUG Initializing service EventLoopMgr
-EventLoopMgr        DEBUG Property update for OutputLevel : new value = 2
 EventLoopMgr        DEBUG Service base class initialized successfully
-IncidentSvc         DEBUG Property update for OutputLevel : new value = 2
 IncidentSvc         DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [AbortEvent] listener '<unknown>' with priority 0
-EventDataSvc        DEBUG Property update for OutputLevel : new value = 2
 EventDataSvc        DEBUG Service base class initialized successfully
-EventPersistenc...  DEBUG Property update for OutputLevel : new value = 2
 EventPersistenc...  DEBUG Service base class initialized successfully
+AlgExecStateSvc     DEBUG Service base class initialized successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
 EventLoopMgr      WARNING No events will be processed from external input.
-HistogramDataSvc    DEBUG Property update for OutputLevel : new value = 2
 HistogramDataSvc    DEBUG Service base class initialized successfully
-HistogramPersis...  DEBUG  'CnvServices':[ 'RootHistSvc' ]
 HistogramPersis...  DEBUG Service base class initialized successfully
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-ToolSvc             DEBUG Property update for OutputLevel : new value = 2
 ToolSvc             DEBUG Service base class initialized successfully
-ClassIDSvc          DEBUG Property update for OutputLevel : new value = 2
-ClassIDSvc           INFO Initializing ClassIDSvc - package version CLIDComps-00-00-00
 ClassIDSvc          DEBUG Service base class initialized successfully
 IncidentSvc         DEBUG Adding [ModuleLoaded] listener 'ClassIDSvc' with priority 100
-ClassIDSvc           INFO  getRegistryEntries: read 989 CLIDRegistry entries for module ALL
-ClassIDSvc          DEBUG processCLIDDB: read 412 entries from CLIDDB file: /home/sss/atlas/dvtest/build/share/clid.db
+ClassIDSvc           INFO  getRegistryEntries: read 1205 CLIDRegistry entries for module ALL
 ToolSvc.MyFolder  WARNING add: can not find type [Baricco] in clid db
-ToolSvc.MyFolder    DEBUG Property update for OutputLevel : new value = 2
 ToolSvc.MyFolder  WARNING add: can not find type [basfbojjvd] in clid db
 ToolSvc.MyFolder  WARNING add: can not find type [cucu] in clid db
 ToolSvc.MyFolder  WARNING add: can not find clid 56789401 in clid db
diff --git a/Control/StoreGate/share/SGHive_test.ref b/Control/StoreGate/share/SGHive_test.ref
index a2068b86e86..5b908077c15 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 # =======> /afs/cern.ch/user/s/ssnyder/atlas-work7/Control/StoreGate/run/../share/SGHive_test.txt
+JobOptionsSvc        INFO # =======> /home/leggett/work/v30r0/src/Control/StoreGate/share/../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 v3r6)
-                                          running on lxplus066.cern.ch on Fri Feb 19 01:46:58 2016
+                                                   Welcome to ApplicationMgr (GaudiCoreSvc v29r0)
+                                          running on zeus.lbl.gov on Fri Nov 17 11:22:53 2017
 ====================================================================================================================================
 ApplicationMgr       INFO Application Manager Configured successfully
 EventLoopMgr      WARNING Unable to locate service "EventSelector" 
@@ -18,31 +18,27 @@ EventLoopMgr      WARNING No events will be processed from external input.
 HistogramPersis...WARNING Histograms saving not required.
 ApplicationMgr       INFO Application Manager Initialized successfully
 ApplicationMgr Ready
-HiveMgrSvc           INFO Initializing HiveMgrSvc - package version StoreGate-03-06-17
+HiveMgrSvc          DEBUG Property update for OutputLevel : new value = 1
+HiveMgrSvc        VERBOSE Initializing HiveMgrSvc - package version StoreGate-00-00-00
 HiveMgrSvc          DEBUG Service base class initialized successfully
+StoreGateSvc        DEBUG Property update for OutputLevel : new value = 1
 StoreGateSvc        DEBUG Service base class initialized successfully
-StoreGateSvc         INFO Initializing StoreGateSvc - package version StoreGate-03-06-17
-StoreGateSvc_Impl    INFO Initializing StoreGateSvc_Impl - package version StoreGate-03-06-17
-StoreGateSvc_Impl   DEBUG Service base class initialized successfully
+StoreGateSvc      VERBOSE Initializing StoreGateSvc - package version StoreGate-00-00-00
+StoreGateSvc        DEBUG trying to create store SGImplSvc/StoreGateSvc_Impl
+StoreGateSvc_Impl VERBOSE Initializing StoreGateSvc_Impl - package version StoreGate-00-00-00
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
-ClassIDSvc           INFO Initializing ClassIDSvc - package version CLIDComps-00-06-18-02
-ClassIDSvc           INFO  getRegistryEntries: read 159 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 172 CLIDRegistry entries for module ALL
 StoreGateSvc_Impl VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-ProxyProviderSvc     INFO Initializing ProxyProviderSvc - package version SGComps-00-02-04
-0_StoreGateSvc_...   INFO Initializing 0_StoreGateSvc_Impl - package version StoreGate-03-06-17
-0_StoreGateSvc_...  DEBUG Service base class initialized successfully
+0_StoreGateSvc_...VERBOSE Initializing 0_StoreGateSvc_Impl - package version StoreGate-00-00-00
 0_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 0_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-1_StoreGateSvc_...   INFO Initializing 1_StoreGateSvc_Impl - package version StoreGate-03-06-17
-1_StoreGateSvc_...  DEBUG Service base class initialized successfully
+1_StoreGateSvc_...VERBOSE Initializing 1_StoreGateSvc_Impl - package version StoreGate-00-00-00
 1_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 1_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-2_StoreGateSvc_...   INFO Initializing 2_StoreGateSvc_Impl - package version StoreGate-03-06-17
-2_StoreGateSvc_...  DEBUG Service base class initialized successfully
+2_StoreGateSvc_...VERBOSE Initializing 2_StoreGateSvc_Impl - package version StoreGate-00-00-00
 2_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 2_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
-3_StoreGateSvc_...   INFO Initializing 3_StoreGateSvc_Impl - package version StoreGate-03-06-17
-3_StoreGateSvc_...  DEBUG Service base class initialized successfully
+3_StoreGateSvc_...VERBOSE Initializing 3_StoreGateSvc_Impl - package version StoreGate-00-00-00
 3_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service EventPersistencySvc
 3_StoreGateSvc_...VERBOSE ServiceLocatorHelper::service: found service ClassIDSvc
 Now we expect to see an error message:
@@ -59,7 +55,7 @@ HiveMgrSvc          ERROR No slots available for event number 123465
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
-HiveMgrSvc          ERROR Attempt to allocate an event slot for an event that is still active: event number 0
+HiveMgrSvc          ERROR No slots available for event number 0
 <<---Error Message Ends-------
 Now we expect to see an error message:
 ----Error Message Starts--->>
@@ -71,18 +67,18 @@ HiveMgrSvc          DEBUG Freed slot 1
 HiveMgrSvc          DEBUG Slot 1 allocated to event number 333333
 
 *** SGHive_test noSlot BEGINS ***
-ClassIDSvc           INFO  getRegistryEntries: read 784 CLIDRegistry entries for module ALL
+ClassIDSvc           INFO  getRegistryEntries: read 930 CLIDRegistry entries for module ALL
 StoreGateSvc_Impl VERBOSE committing dataObj "('SG::Foo','blassed')"
-StoreGateSvc_Impl   DEBUG Recorded object @0xd49da0 with key pFoo1 of type SG::Foo(CLID 81010)
- in DataObject @0xcaa2b0
+StoreGateSvc_Impl   DEBUG Recorded object @0x1d4f900 with key pFoo1 of type SG::Foo(CLID 81010)
+ in DataObject @0x1e0ce30
  object modifiable when retrieved
-StoreGateSvc_Impl   DEBUG Recorded object @0xd4b880 with key pFoo2 of type SG::Foo(CLID 81010)
- in DataObject @0xd29b40
+StoreGateSvc_Impl   DEBUG Recorded object @0x1db42d0 with key pFoo2 of type SG::Foo(CLID 81010)
+ in DataObject @0x1d96090
  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 @0xd4c3c0 with key pFoo3 of type SG::Foo(CLID 81010)
- in DataObject @0xd1f750
+StoreGateSvc_Impl   DEBUG Recorded object @0x1e3ebe0 with key pFoo3 of type SG::Foo(CLID 81010)
+ in DataObject @0x1d61480
  object modifiable when retrieved
 StoreGateSvc_Impl VERBOSE committing dataObj "('SG::Foo','pFoo3')"
 
@@ -90,37 +86,31 @@ StoreGateSvc_Impl VERBOSE committing dataObj "('SG::Foo','pFoo3')"
 
 *** SGHive_test withSlot BEGINS ***
 0_StoreGateSvc_...VERBOSE committing dataObj "('SG::Foo','blassed')"
-0_StoreGateSvc_...  DEBUG Recorded object @0xd4c900 with key pFoo1 of type SG::Foo(CLID 81010)
- in DataObject @0xc88e70
+0_StoreGateSvc_...  DEBUG Recorded object @0x1e41b20 with key pFoo1 of type SG::Foo(CLID 81010)
+ in DataObject @0x1e7d530
  object modifiable when retrieved
-0_StoreGateSvc_...  DEBUG Recorded object @0xd4ea50 with key pFoo2 of type SG::Foo(CLID 81010)
- in DataObject @0xc88ec0
+0_StoreGateSvc_...  DEBUG Recorded object @0x1e43120 with key pFoo2 of type SG::Foo(CLID 81010)
+ in DataObject @0x1e0d680
  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 @0xd4ee70 with key pFoo3 of type SG::Foo(CLID 81010)
- in DataObject @0xc88c50
+0_StoreGateSvc_...  DEBUG Recorded object @0x1e0d6d0 with key pFoo3 of type SG::Foo(CLID 81010)
+ in DataObject @0x1e0d120
  object modifiable when retrieved
 0_StoreGateSvc_...VERBOSE committing dataObj "('SG::Foo','pFoo3')"
 
 *** SGHive_test withSlot ENDS ***
-StoreGateSvc         INFO Finalizing StoreGateSvc - package version StoreGate-03-06-17
-StoreGateSvc_Impl    INFO Finalizing StoreGateSvc_Impl - package version StoreGate-03-06-17
+StoreGateSvc      VERBOSE Finalizing StoreGateSvc - package version StoreGate-00-00-00
+StoreGateSvc_Impl VERBOSE Finalizing StoreGateSvc_Impl - package version StoreGate-00-00-00
 StoreGateSvc_Impl   DEBUG Clearing store with forceRemove=1
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd231c0, recorded with key=pFoo1, CLID=81010, containing data object @0xcaa2b0  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd2e1e0, recorded with key=pFoo2, CLID=81010, containing data object @0xd29b40  ... -> DONE
-StoreGateSvc_Impl VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd71f50, recorded with key=pFoo3, CLID=81010, containing data object @0xd1f750  ... -> DONE
-HiveMgrSvc           INFO Finalizing HiveMgrSvc - package version StoreGate-03-06-17
-0_StoreGateSvc_...   INFO Finalizing 0_StoreGateSvc_Impl - package version StoreGate-03-06-17
+HiveMgrSvc           INFO Finalizing HiveMgrSvc - package version StoreGate-00-00-00
+0_StoreGateSvc_...VERBOSE Finalizing 0_StoreGateSvc_Impl - package version StoreGate-00-00-00
 0_StoreGateSvc_...  DEBUG Clearing store with forceRemove=1
-0_StoreGateSvc_...VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd75650, recorded with key=pFoo1, CLID=81010, containing data object @0xc88e70  ... -> DONE
-0_StoreGateSvc_...VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd2ed90, recorded with key=pFoo2, CLID=81010, containing data object @0xc88ec0  ... -> DONE
-0_StoreGateSvc_...VERBOSE DataStore::clearStore() forcing release of DataProxy @0xd27240, recorded with key=pFoo3, CLID=81010, containing data object @0xc88c50  ... -> DONE
-1_StoreGateSvc_...   INFO Finalizing 1_StoreGateSvc_Impl - package version StoreGate-03-06-17
+1_StoreGateSvc_...VERBOSE Finalizing 1_StoreGateSvc_Impl - package version StoreGate-00-00-00
 1_StoreGateSvc_...  DEBUG Clearing store with forceRemove=1
-2_StoreGateSvc_...   INFO Finalizing 2_StoreGateSvc_Impl - package version StoreGate-03-06-17
+2_StoreGateSvc_...VERBOSE Finalizing 2_StoreGateSvc_Impl - package version StoreGate-00-00-00
 2_StoreGateSvc_...  DEBUG Clearing store with forceRemove=1
-3_StoreGateSvc_...   INFO Finalizing 3_StoreGateSvc_Impl - package version StoreGate-03-06-17
+3_StoreGateSvc_...VERBOSE Finalizing 3_StoreGateSvc_Impl - package version StoreGate-00-00-00
 3_StoreGateSvc_...  DEBUG Clearing store with forceRemove=1
 *** SGHiveTest OK ***
 
diff --git a/Control/StoreGate/src/SGHiveMgrSvc.cxx b/Control/StoreGate/src/SGHiveMgrSvc.cxx
index bcc872fe3db..5927ac513a9 100644
--- a/Control/StoreGate/src/SGHiveMgrSvc.cxx
+++ b/Control/StoreGate/src/SGHiveMgrSvc.cxx
@@ -47,6 +47,7 @@ StatusCode HiveMgrSvc::clearStore(size_t slotIndex) {
   if (slotIndex < m_nSlots) {
     rc=m_slots[slotIndex].pEvtStore->clearStore();
     if (rc.isSuccess()) debug() << "cleared store " << slotIndex << endmsg;
+    m_freeSlots++;
   }    
   if (!rc.isSuccess()) error() << "could not clear store " << slotIndex << endmsg;
   return rc;
@@ -65,6 +66,7 @@ StatusCode HiveMgrSvc::setNumberOfStores(size_t slots) {
   } else {
     m_slots.resize(slots);
     m_nSlots = slots;
+    m_freeSlots.store(slots);
     return StatusCode::SUCCESS;
   }
 }
@@ -82,6 +84,10 @@ size_t HiveMgrSvc::getNumberOfStores() const {
  * @return Slot number (npos to indicate an error).
  */
 size_t HiveMgrSvc::allocateStore( int evtNumber ) {
+  if (m_freeSlots == 0) {
+    error() << "No slots available for event number " << evtNumber << endmsg;
+    return std::string::npos;
+  }
   for (size_t index=0; index<m_nSlots; ++index) {
     if( m_slots[index].eventNumber == evtNumber) {
       error() << "Attempt to allocate an event slot for an event that is still active: event number " << evtNumber << endmsg;
@@ -90,6 +96,7 @@ size_t HiveMgrSvc::allocateStore( int evtNumber ) {
       m_slots[index].eventNumber = evtNumber;
       debug() << "Slot " << index 
               << " allocated to event number "<< evtNumber << endmsg;
+      m_freeSlots--;
       return index;
     }
   }
@@ -126,13 +133,29 @@ size_t HiveMgrSvc::getPartitionNumber(int evtNumber) const {
   return std::string::npos;
 }
 
+unsigned int HiveMgrSvc::freeSlots() {
+  return m_freeSlots;
+}
+
+
+DataObjIDColl HiveMgrSvc::getNewDataObjects() {
+  // FIXME: to be removed
+  DataObjIDColl products;
+  m_hiveStore->getNewDataObjects(products).ignore();
+  return products;
+}
 
-StatusCode HiveMgrSvc::getNewDataObjects(DataObjIDColl& products) {
-  return m_hiveStore->getNewDataObjects(products);
+void HiveMgrSvc::addNewDataObjects( DataObjIDColl& /*products*/ ){
+  // FIXME
+  error() << "addNewDataObjects(...) not implemented!" << endmsg;
 }
 
-bool HiveMgrSvc::newDataObjectsPresent() {
-  return m_hiveStore->newDataObjectsPresent();
+bool HiveMgrSvc::exists( const DataObjID& id) {
+  // this should only get called in error situations, so we
+  // don't care if it's slow
+  std::string key = id.key();
+  key.erase(0,key.find("+")+1);
+  return m_hiveStore->transientContains(id.clid(), id.key());
 } 
 
 StatusCode HiveMgrSvc::initialize() {
@@ -176,6 +199,7 @@ StatusCode HiveMgrSvc::initialize() {
     }
   }
   
+  m_freeSlots.store( m_nSlots );
   return selectStore(0);
 }
 
diff --git a/Control/StoreGate/src/SGHiveMgrSvc.h b/Control/StoreGate/src/SGHiveMgrSvc.h
index aaee3b5b1da..046f597e063 100644
--- a/Control/StoreGate/src/SGHiveMgrSvc.h
+++ b/Control/StoreGate/src/SGHiveMgrSvc.h
@@ -62,19 +62,26 @@ public:
    */
   virtual size_t getNumberOfStores() const override;
  
+  /** explicitly notify the presence of new object in the store
+   *
+   * @param  products     [IN]     Location of new objects
+   */
+  virtual void addNewDataObjects( DataObjIDColl& products ) override;
+
   /** Get the latest new data objects registered in store.
    *
    * @param  products     [IN]     Slot number (event slot)   *
    * @return Status code indicating failure or success.
    */
-  virtual StatusCode getNewDataObjects(DataObjIDColl& products) override;
+  virtual DataObjIDColl getNewDataObjects() override;
 
-  /** Check if something is new in the whiteboard without getting the products.
+  /** Check if a data object exists in store.
+   *  TODO: remove the method ASA a cross-experiment
+   *        event data store interface emerges
    *
-   * @param  products     [IN]     Slot number (event slot)   *
-   * @return Boolean indicating the presence of new products
+   * @return  boolean
    */
-  virtual bool newDataObjectsPresent() override;
+    virtual bool exists( const DataObjID& ) override;
   
   /** Allocate a store slot for new event
    *
@@ -99,6 +106,9 @@ public:
    */
   virtual size_t getPartitionNumber(int eventnumber) const override;
   
+  /// Get free slots number
+  virtual unsigned int freeSlots() override;
+    
   //@{ @name Gaudi Service boilerplate
   virtual StatusCode initialize() override;
   virtual StatusCode finalize() override;
@@ -117,6 +127,7 @@ private:
   ServiceHandle<StoreGateSvc> m_hiveStore;
   size_t m_nSlots; //property settable also by setNumberOfStores
   std::vector<SG::HiveEventSlot> m_slots;
+    std::atomic<unsigned int> m_freeSlots {0};
   //maybe  ServiceHandle<ActiveStoreSvc> m_active;
 
 };
diff --git a/Control/StoreGate/src/SGImplSvc.cxx b/Control/StoreGate/src/SGImplSvc.cxx
index de7e47f3762..1b46bf4c93b 100644
--- a/Control/StoreGate/src/SGImplSvc.cxx
+++ b/Control/StoreGate/src/SGImplSvc.cxx
@@ -1238,6 +1238,7 @@ SGImplSvc::t2pRemove(const void* const pTrans)
 void
 SGImplSvc::msg_update_handler(Property& /*outputLevel*/)
 {
+  setUpMessaging();
   msg().setLevel (outputLevel());
   msgSvc()->setOutputLevel(name(), outputLevel());
 }
diff --git a/Control/StoreGate/test/SGHive_test.cxx b/Control/StoreGate/test/SGHive_test.cxx
index 12007f2ef79..f597bdd0e77 100644
--- a/Control/StoreGate/test/SGHive_test.cxx
+++ b/Control/StoreGate/test/SGHive_test.cxx
@@ -101,7 +101,7 @@ public:
       assert(rSG.record(new SG::Foo(2), "pFoo2").isSuccess());
       rSG.commitNewDataObjects();
       assert( rSG.newDataObjectsPresent() );
-      rSG.getNewDataObjects(products).ignore();    
+      rSG.getNewDataObjects(products).ignore();
       assert( 2 == products.size() );
       assert (products.count (DataObjID (81010,"pFoo1")) == 1);
       //we have emptied newdataobject array with call to newDataObjects
diff --git a/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx b/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx
index da8f9f3754e..9530eb3b3cd 100644
--- a/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx
+++ b/DataQuality/DataQualityTools/src/DQTBackgroundMon.cxx
@@ -50,6 +50,7 @@ DQTBackgroundMon::DQTBackgroundMon(const std::string & type,
   DataQualityFatherMonTool(type, name, parent),
   m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
   m_helperTool("Muon::MuonEDMHelperTool/MuonEDMHelperTool"),
+  m_idHelperTool("Muon::MuonIdHelperTool"),
   m_idToFixedIdTool("MuonCalib::IdToFixedIdTool"),
   m_doMuons(1),
   m_doTrigger(1),
diff --git a/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx b/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx
index 30cd0924c6c..810722520eb 100644
--- a/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx
+++ b/DataQuality/DataQualityTools/src/DQTNonCollBkg_ZDC.cxx
@@ -43,7 +43,8 @@ DQTNonCollBkg_ZDC::DQTNonCollBkg_ZDC(const std::string & type,
                                           m_complainContain(1),
                                           m_complainRetrieve(1),
 					  m_nsamples(0),
-					  m_bcid(nullptr)
+					  m_bcid(nullptr),
+                                          m_trigDec("Trig::TrigDecisionTool")
 
 {
   declareInterface<IMonitorToolBase> (this);
diff --git a/DataQuality/GoodRunsListsUser/src/GRLTriggerSelectorAlg.cxx b/DataQuality/GoodRunsListsUser/src/GRLTriggerSelectorAlg.cxx
index e4f2c36b89a..8ada6e88c1b 100644
--- a/DataQuality/GoodRunsListsUser/src/GRLTriggerSelectorAlg.cxx
+++ b/DataQuality/GoodRunsListsUser/src/GRLTriggerSelectorAlg.cxx
@@ -16,6 +16,7 @@ GRLTriggerSelectorAlg::GRLTriggerSelectorAlg(const std::string& name, ISvcLocato
  : AthAlgorithm(name, pSvcLocator)
  , m_GoodRunsListSelectorTool("GoodRunsListSelectorTool")
  , m_TriggerRegistryTool("TriggerRegistryTool")
+ , m_tdTool("Trig::TrigDecisionTool")
  , m_gcounter(0)
  , m_gaccept(0)
  , m_tcounter(0)
diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRec.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRec.cxx
index b4ea371f045..d8f780dc8d0 100644
--- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRec.cxx
+++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRec.cxx
@@ -33,7 +33,9 @@ ZdcRec::ZdcRec(const std::string& name, ISvcLocator* pSvcLocator) :
 	m_rawCollection(0),
 	m_eventCount(0),
 	m_complainContain(1),
-	m_complainRetrieve(1)
+	m_complainRetrieve(1),
+        m_ChannelTool("ZdcRecChannelTool"),
+        m_NoiseTool("ZdcRecNoiseTool")
 
 {
 	declareProperty("OwnPolicy",m_ownPolicy) ;
diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV2.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV2.cxx
index d8ee766f721..abd1b424b93 100644
--- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV2.cxx
+++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV2.cxx
@@ -38,7 +38,8 @@ ZdcRecV2::ZdcRecV2(const std::string& name, ISvcLocator* pSvcLocator) :
 	m_ttContainer(0),
 	m_eventCount(0),
 	m_complainContain(1),
-	m_complainRetrieve(1)
+	m_complainRetrieve(1),
+        m_ChannelTool("ZdcRecChannelToolV2")
 
 {
 	declareProperty("OwnPolicy",m_ownPolicy) ;
diff --git a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV3.cxx b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV3.cxx
index 9951f025902..4ce47705129 100644
--- a/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV3.cxx
+++ b/ForwardDetectors/ZDC/ZdcRec/src/ZdcRecV3.cxx
@@ -39,6 +39,7 @@ ZdcRecV3::ZdcRecV3(const std::string& name, ISvcLocator* pSvcLocator) :
 	m_eventCount(0),
 	m_complainContain(1),
 	m_complainRetrieve(1),
+        m_ChannelTool("ZdcRecChannelToolV2"),
 	m_zdcTool("ZDC::ZdcAnalysisTool/ZdcAnalysisTool")
 {
 	declareProperty("OwnPolicy",m_ownPolicy) ;
diff --git a/Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h b/Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h
index b2958657a0e..edc100ed7ce 100644
--- a/Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h
+++ b/Generators/GenInterfaces/GenInterfaces/IHepMCWeightSvc.h
@@ -7,6 +7,7 @@
 
 #include "GaudiKernel/IInterface.h"
 #include <string>
+#include <map>
 
 /// @brief IService to read/write HepMC's WeightContainer key names from/to IOVMetaDataContainers
 ///  author: will buttinger , NLAA
diff --git a/InnerDetector/InDetDetDescr/PixelCabling/PixelCabling/IPixelCablingSvc.h b/InnerDetector/InDetDetDescr/PixelCabling/PixelCabling/IPixelCablingSvc.h
index 52edac34967..1e54a41a4c6 100644
--- a/InnerDetector/InDetDetDescr/PixelCabling/PixelCabling/IPixelCablingSvc.h
+++ b/InnerDetector/InDetDetDescr/PixelCabling/PixelCabling/IPixelCablingSvc.h
@@ -16,6 +16,7 @@
 
 #include <deque>
 #include <vector>
+#include <map>
 
 // forward declarations
 class IdentifierHash;
diff --git a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ErrorHandler.h b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ErrorHandler.h
index b2218a428ce..8cd285e131e 100644
--- a/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ErrorHandler.h
+++ b/InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ErrorHandler.h
@@ -10,6 +10,7 @@
 #define ErrorHandler_h
 #include <stdexcept>
 #include <xercesc/sax2/DefaultHandler.hpp>
+#include <iostream>
 class XmlErrorHandler: public xercesc::DefaultHandler {
 public:
   void
diff --git a/LArCalorimeter/LArAffectedRegion/src/LArAffectedRegionAlg.cxx b/LArCalorimeter/LArAffectedRegion/src/LArAffectedRegionAlg.cxx
index a1b14cf0b78..adfec57a0e5 100644
--- a/LArCalorimeter/LArAffectedRegion/src/LArAffectedRegionAlg.cxx
+++ b/LArCalorimeter/LArAffectedRegion/src/LArAffectedRegionAlg.cxx
@@ -72,6 +72,7 @@
 
 LArAffectedRegionAlg::LArAffectedRegionAlg(const std::string& name, ISvcLocator* pSvcLocator) :
   AthAlgorithm(name, pSvcLocator),
+  m_larCablingSvc("LArCablingService"),
   m_BadChanTool("LArBadChanTool"),
   m_hvtool("LArHVToolMC"),
   m_onlineID(NULL),
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChanTool.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChanTool.cxx
index 06923abf191..e5b782fcbde 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChanTool.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChanTool.cxx
@@ -42,6 +42,7 @@ struct BadFebEntryMerger {
 LArBadChanTool::LArBadChanTool(const std::string& type, const std::string& name, 
 			       const IInterface* parent) :
 	AthAlgTool( type, name, parent), 
+        m_cablingService("LArCablingService"),
 	m_updatedFromDB( false),
 	m_updatedFebsFromDB( false),
 	m_ready( false),
diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
index 0f810fef6c3..aa3a2e83410 100755
--- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
+++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
@@ -102,7 +102,7 @@ class LArShapeDumper : public AthAlgorithm
   ToolHandle<ILArBadChanTool> m_badChannelTool;
   ToolHandle<ILArBadChannelMasker> m_badChannelMasker;
   ToolHandle<ILArADC2MeVTool> m_adc2mevTool; 
-  ToolHandle<LArOFPeakRecoTool> m_peakReco;
+  //  ToolHandle<LArOFPeakRecoTool> m_peakReco;
   ToolHandle<Trig::TrigDecisionTool> m_trigDec;
 
 
diff --git a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
index c5ae9de81b5..679a7ed6a9d 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArCalibDigitMaker.cxx
@@ -24,6 +24,7 @@ using CLHEP::ns;
 
 LArCalibDigitMaker::LArCalibDigitMaker(const std::string& name, ISvcLocator* pSvcLocator)
   : AthAlgorithm(name, pSvcLocator),
+    m_larCablingSvc("LArCablingService"),
     m_nTrigger(0)
 {
   //declareProperty("DigitKey",m_key="");
diff --git a/LArCalorimeter/LArCalibUtils/src/LArOFCAlg.cxx b/LArCalorimeter/LArCalibUtils/src/LArOFCAlg.cxx
index a67a5f33a72..bb39782aa80 100755
--- a/LArCalorimeter/LArCalibUtils/src/LArOFCAlg.cxx
+++ b/LArCalorimeter/LArCalibUtils/src/LArOFCAlg.cxx
@@ -33,6 +33,7 @@
 
 LArOFCAlg::LArOFCAlg(const std::string& name, ISvcLocator* pSvcLocator) 
 	: AthAlgorithm(name, pSvcLocator),
+          m_cablingService("LArCablingService"),
           m_onlineID(nullptr),
           m_calo_dd_man(nullptr),
 	  m_larPhysWaveBin(nullptr),
diff --git a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx
index 05c2b7de820..9be7d01d805 100755
--- a/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArBadFebMaskingTool.cxx
@@ -46,7 +46,9 @@ LArBadFebMaskingTool::LArBadFebMaskingTool(
 			     const std::string& name, 
 			     const IInterface* parent)
   :AthAlgTool(type, name, parent),
-   m_badChannelTool(""),m_maskParity(true),m_maskSampleHeader(true),m_maskEVTID(true),m_maskScacStatus(true),
+   m_badChannelTool(""),
+   m_cablingService("LArCablingService"),
+   m_maskParity(true),m_maskSampleHeader(true),m_maskEVTID(true),m_maskScacStatus(true),
    m_maskScaOutOfRange(true),m_maskGainMismatch(true),m_maskTypeMismatch(true),m_maskNumOfSamples(true),
    m_maskEmptyDataBlock(true),m_maskDspBlockSize(true),m_maskCheckSum(true),m_maskMissingHeader(true),
    m_maskBadGain(true),m_minFebsInError(1),
diff --git a/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx
index 4f2b85eabcb..0ef9c9499dd 100644
--- a/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellDeadOTXCorr.cxx
@@ -118,6 +118,7 @@ LArCellDeadOTXCorr::LArCellDeadOTXCorr(
 		const std::string& name, 
 		const IInterface* parent)
   : AthAlgTool(type, name, parent),
+    m_cablingService("LArCablingService"),
     m_caloMgr(nullptr),
     m_lvl1Helper(nullptr),
     m_calo_id(nullptr),
diff --git a/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx
index 077af12219e..4942d3b68d0 100755
--- a/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellGainPathology.cxx
@@ -41,6 +41,7 @@ LArCellGainPathology::LArCellGainPathology(
 			     const std::string& name, 
 			     const IInterface* parent)
   : AthAlgTool(type, name, parent),
+    m_cablingService("LArCablingService"),
     m_calo_id(nullptr),
     m_onlineID(nullptr)
 { 
diff --git a/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx b/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx
index 5a8c3d82dc4..f87ab6f3f5f 100755
--- a/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArCellMerger.cxx
@@ -34,6 +34,7 @@ LArCellMerger::LArCellMerger(
 			     const std::string& name, 
 			     const IInterface* parent)
   :AthAlgTool(type, name, parent),
+   m_cablingService("LArCablingService"),
    m_rawChannelContainerName("LArRawChannels_digits"),
    m_calo_id(nullptr),
    m_evt(0),
diff --git a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
index 63a1ad8838f..4592e0b8f24 100644
--- a/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
+++ b/LArCalorimeter/LArCellRec/src/LArNoisyROTool.cxx
@@ -25,7 +25,9 @@ LArNoisyROTool::LArNoisyROTool( const std::string& type,
 				const std::string& name, 
 				const IInterface* parent ) : 
   ::AthAlgTool  ( type, name, parent   ),
-  m_calo_id(0), m_onlineID(0) , m_invocation_counter(0),m_SaturatedCellTightCutEvents(0),
+  m_calo_id(0), m_onlineID(0), 
+  m_cablingService("LArCablingService"),
+  m_invocation_counter(0),m_SaturatedCellTightCutEvents(0),
   m_partitionMask({{LArNoisyROSummary::EMECAMask,LArNoisyROSummary::EMBAMask,LArNoisyROSummary::EMBCMask,LArNoisyROSummary::EMECCMask}}) //beware: The order matters! 
 {
   declareInterface<ILArNoisyROTool >(this);
diff --git a/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx b/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
index 64d4564d7d0..72f63a9a27a 100644
--- a/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHV2Ntuple.cxx
@@ -51,7 +51,8 @@
     m_hv(0),
     m_current(0),
     m_barrelec(0), m_posneg(0), m_FT(0),m_slot(0),m_channel(0),
-    m_caloId(0), m_onlId(0)
+    m_caloId(0), m_onlId(0),
+    m_cabling("LArCablingService")
   {
     declareProperty("AddCellID",m_addcells);
   }
diff --git a/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx b/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
index 51c767d2ebd..b9eae5f1937 100644
--- a/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
+++ b/LArCalorimeter/LArCondUtils/src/LArHVPathologyDbAlg.cxx
@@ -52,6 +52,7 @@ LArHVPathologyDbAlg::LArHVPathologyDbAlg(const std::string& name, ISvcLocator* p
   , m_regSvc("IOVRegistrationSvc",name)
   , m_pathologyTool("LArHVPathologyDbTool")
   , m_mode(0)
+  , m_cablingService("LArCablingService")
   , m_larem_id(0)
   , m_larhec_id(0)
   , m_larfcal_id(0)
diff --git a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
index 892bb273118..caad4f4d4ea 100755
--- a/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
+++ b/LArCalorimeter/LArDigitization/src/LArHitEMap.cxx
@@ -32,6 +32,7 @@ LArHitEMap::LArHitEMap(void):
   m_larem_id(0),
   m_larhec_id(0),
   m_larfcal_id(0),
+  m_cablingService("LArCablingService"),
   m_initialized(false)
 {
         m_ncellem=0;
diff --git a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
index 3674775114c..08fcc02a727 100755
--- a/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArDigitMon.cxx
@@ -70,6 +70,7 @@ LArDigitMon::LArDigitMon(const std::string& type,
     m_strHelper(0),
     m_LArOnlineIDHelper(0),
     m_LArEM_IDHelper(0),
+    m_LArCablingService("LArCablingService"),
     m_badChannelMask("BadLArRawChannelMask"),
     m_summary(0),
     m_feedthroughID(0),
@@ -189,6 +190,8 @@ LArDigitMon::initialize()
       ATH_MSG_ERROR( "Could not retrieve BadChannelMask" << m_badChannelMask);
       return StatusCode::FAILURE;
     }
+  } else {
+    m_badChannelMask.disable();
   }
   
   /** Retrieve pedestals container*/
diff --git a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
index 7781f4885d9..c02a482597e 100644
--- a/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
+++ b/LArCalorimeter/LArMonTools/src/LArHVCorrectionMonTool.cxx
@@ -50,6 +50,7 @@ LArHVCorrectionMonTool::LArHVCorrectionMonTool(const std::string& type,
     m_CaloDetDescrMgr(0),
     m_strHelper(0),
     m_rootStore(0),
+    m_larCablingService("LArCablingService"),
     m_hvCorrTool("LArHVCorrTool"),
     m_keyHVScaleCorr("LArHVScaleCorr"),
     m_eventsCounter(0)
diff --git a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderToolBaseClass.h b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderToolBaseClass.h
index f2f5bd6c016..d49f30acaab 100755
--- a/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderToolBaseClass.h
+++ b/LArCalorimeter/LArROD/LArROD/LArRawChannelBuilderToolBaseClass.h
@@ -47,12 +47,12 @@ class LArRawChannelBuilderToolBaseClass : public AthAlgTool,
     {
       m_parent=myParent; 
       if ( m_isSC ) {
-           ToolHandle<LArSuperCellCablingTool> lscct;
+           ToolHandle<LArSuperCellCablingTool> lscct("LArSuperCellCablingTool");
            CHECK( lscct.retrieve() );
            LArSuperCellCablingTool* plscct = &(*lscct);
            m_larCablingSvc = (LArCablingBase*) plscct;
       } else {
-           ToolHandle<LArCablingService> lcS;
+           ToolHandle<LArCablingService> lcS("LArCablingService");
            CHECK( lcS.retrieve() );
            LArCablingService* plcS = &(*lcS);
            m_larCablingSvc = (LArCablingBase*)plcS;
diff --git a/LArCalorimeter/LArROD/src/LArDigitThinner.cxx b/LArCalorimeter/LArROD/src/LArDigitThinner.cxx
index cc8fe5c197e..1c04d553c57 100755
--- a/LArCalorimeter/LArROD/src/LArDigitThinner.cxx
+++ b/LArCalorimeter/LArROD/src/LArDigitThinner.cxx
@@ -17,6 +17,7 @@
 LArDigitThinner::LArDigitThinner(const std::string& name,
 				 ISvcLocator* pSvcLocator) :
     AthAlgorithm(name, pSvcLocator)
+    , m_larCablingSvc("LArCablingService")
     , m_onlineID(NULL)
     , m_caloCellId(NULL)
     , m_inputContainerName("LArDigitContainer_MC")
diff --git a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
index 8dddca1fb79..3ab6b03ca2c 100644
--- a/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
+++ b/LArCalorimeter/LArRecUtils/share/LArFCalTowerBuilderTool.ref
@@ -140,7 +140,7 @@ IdDictDetDescrCnv    INFO Reading InnerDetector    IdDict file InDetIdDictFiles/
 IdDictDetDescrCnv    INFO Reading LArCalorimeter   IdDict file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
 IdDictDetDescrCnv    INFO Reading TileCalorimeter  IdDict file IdDictParser/IdDictTileCalorimeter.xml
 IdDictDetDescrCnv    INFO Reading Calorimeter      IdDict file IdDictParser/IdDictCalorimeter_L1Onl.xml
-IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.02.xml
+IdDictDetDescrCnv    INFO Reading MuonSpectrometer IdDict file IdDictParser/IdDictMuonSpectrometer_R.03.xml
 IdDictDetDescrCnv    INFO Reading ForwardDetectors IdDict file IdDictParser/IdDictForwardDetectors_2010.xml
 IdDictDetDescrCnv    INFO Found id dicts:
 IdDictDetDescrCnv    INFO Using dictionary tag: null
@@ -151,7 +151,7 @@ IdDictDetDescrCnv    INFO Dictionary InnerDetector        version IBL-DBM
 IdDictDetDescrCnv    INFO Dictionary LArCalorimeter       version fullAtlas            DetDescr tag LArIdentifier-DC3-05-Comm file IdDictParser/IdDictLArCalorimeter_DC3-05-Comm-01.xml
 IdDictDetDescrCnv    INFO Dictionary LArElectrode         version fullAtlas            DetDescr tag (using default) file 
 IdDictDetDescrCnv    INFO Dictionary LArHighVoltage       version fullAtlas            DetDescr tag (using default) file 
-IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.02                 DetDescr tag MuonIdentifier-05         file IdDictParser/IdDictMuonSpectrometer_R.02.xml
+IdDictDetDescrCnv    INFO Dictionary MuonSpectrometer     version R.03                 DetDescr tag MuonIdentifier-08         file IdDictParser/IdDictMuonSpectrometer_R.03.xml
 IdDictDetDescrCnv    INFO Dictionary TileCalorimeter      version fullAtlasAndTestBeam DetDescr tag TileIdentifier-00         file IdDictParser/IdDictTileCalorimeter.xml
 TileTBID             INFO initialize_from_dictionary 
 AtlasDetectorID      INFO initialize_from_dictionary - OK
diff --git a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx
index 270a3dfd6af..5428b565559 100755
--- a/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArAutoCorrNoiseTool.cxx
@@ -19,6 +19,7 @@ LArAutoCorrNoiseTool::LArAutoCorrNoiseTool(const std::string& type,
     m_lar_on_id(nullptr),
     m_lar_scon_id(nullptr),
     m_cablingService("LArCablingService"),
+    m_cablingSCService("LArSuperCellCablingTool"),
     m_larmcsym("LArMCSymTool"),
     m_keyAutoCorr("LArAutoCorr"),
     m_cacheValid(false),m_loadAtBegin(true),
@@ -51,12 +52,16 @@ StatusCode LArAutoCorrNoiseTool::initialize()
   if ( m_isSC ){
     ATH_CHECK(  detStore()->retrieve(m_lar_scon_id,"LArOnline_SuperCellID") );
     ATH_CHECK( m_cablingSCService.retrieve() );
+    m_cablingService.disable();
   } // m_isSC
   else {
     ATH_CHECK(  detStore()->retrieve(m_lar_on_id,"LArOnlineID") );
     ATH_CHECK( m_cablingService.retrieve() );
+    m_cablingSCService.disable();
     if (m_MCSym) {
       ATH_CHECK( m_larmcsym.retrieve() );
+    } else {
+      m_larmcsym.disable();
     }
   }
   
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
index 98fd1e8792f..fe739981118 100755
--- a/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArHVCorrTool.cxx
@@ -35,6 +35,7 @@ LArHVCorrTool::LArHVCorrTool(const std::string& type,
     m_larhec_id(NULL),
     m_larfcal_id(NULL),	
     m_electrodeID(NULL),
+    m_cablingService("LArCablingService"),
     m_hvtool("LArHVToolMC")
 {
   declareInterface<ILArHVCorrTool>(this);
diff --git a/LArCalorimeter/LArRecUtils/src/LArHVScaleRetriever.cxx b/LArCalorimeter/LArRecUtils/src/LArHVScaleRetriever.cxx
index 966e83443ba..6dc05763987 100644
--- a/LArCalorimeter/LArRecUtils/src/LArHVScaleRetriever.cxx
+++ b/LArCalorimeter/LArRecUtils/src/LArHVScaleRetriever.cxx
@@ -53,6 +53,7 @@ StatusCode LArHVScaleRetriever::initialize()
 
   if( m_isMC ) {
     ATH_CHECK( m_keyHVScaleCorr.initialize() );
+    m_ilarhvcorrtool.disable();
   }else {
     CHECK( m_ilarhvcorrtool.retrieve() ) ;  
   }
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
index 12fb523b0c8..043c45fc9f9 100755
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/MdtRawDataMonitoring/src/MdtRawDataValAlg.cxx
@@ -195,7 +195,6 @@ StatusCode MdtRawDataValAlg::initialize()
   //initialize to stop coverity bugs
    m_activeStore = 0;
    m_mdtIdHelper=0;
-   m_idHelper=0;
    p_MuonDetectorManager=0;
    //mdtevents_RPCtrig = 0;
    //mdtevents_TGCtrig=0;
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index 79e6e5dd4f3..c029a4264c6 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -9,4 +9,4 @@
 AthSimulationExternalsVersion = 81ea37fe
 
 # The version of atlas/Gaudi to use:
-GaudiVersion = v29r0.001
+GaudiVersion = v30r0.001
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index f3efea7d7fd..3ab714c2167 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -9,4 +9,4 @@
 AthenaExternalsVersion = 81ea37fe
 
 # The version of atlas/Gaudi to use: 
-GaudiVersion = v29r0.002
+GaudiVersion = v30r0.001
diff --git a/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx b/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx
index ab4cb750f7c..d725f96a7db 100755
--- a/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx
+++ b/Reconstruction/MissingETPerformance/src/TrigVsOfflineMissingETTool.cxx
@@ -150,7 +150,9 @@ namespace metfit {
 /*-----------------------------------------------------*/
 TrigVsOfflineMissingETTool::TrigVsOfflineMissingETTool(const std::string & type, 
     const std::string & name, const IInterface* parent) : AthAlgTool(type, name, parent),
-                                                          m_debuglevel(false)
+                                                          m_debuglevel(false),
+                                                          m_trigDec("Trig::TrigDecisionTool")
+           
   /*-----------------------------------------------------*/
 {
   declareInterface<TrigVsOfflineMissingETTool>( this );
diff --git a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
index 75da880c67b..08b757ff652 100755
--- a/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
+++ b/Reconstruction/MuonIdentification/MuidTrackBuilder/src/CombinedMuonTrackBuilder.cxx
@@ -81,6 +81,7 @@ CombinedMuonTrackBuilder::CombinedMuonTrackBuilder (const std::string&type,
 	m_extrapolator			("Trk::Extrapolator/AtlasExtrapolator"),
 	m_fitter			("Trk::iPatFitter/iPatFitter"),
 	m_fitterSL			("Trk::iPatFitter/iPatSLFitter"),
+        m_idHelperTool                  ("Muon::MuonIdHelperTool"),
 	m_intersector			("Trk::RungeKuttaIntersector/RungeKuttaIntersector"),
 	m_magFieldProperties		(Trk::FullField),
 	m_magFieldSvc			("AtlasFieldSvc",name),
diff --git a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
index 6a4dd0e9b28..7f198fe2570 100644
--- a/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
+++ b/Reconstruction/MuonIdentification/MuonCombinedTrackFindingTools/src/MuonInsideOutRecoTool.cxx
@@ -41,7 +41,8 @@ namespace MuonCombined {
     m_candidateTrackBuilder("Muon::MuonCandidateTrackBuilderTool/MuonCandidateTrackBuilderTool"),
     m_recoValidationTool(""),
     m_trackFitter("Rec::CombinedMuonTrackBuilder/CombinedMuonTrackBuilder"),
-    m_trackAmbibuityResolver("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor")
+    m_trackAmbibuityResolver("Trk::SimpleAmbiguityProcessorTool/MuonAmbiProcessor"),
+    m_layerHashProvider("Muon::MuonLayerHashProviderTool")
   {
     declareInterface<IMuonCombinedInDetExtensionTool>(this);
     declareInterface<MuonInsideOutRecoTool>(this);
diff --git a/Reconstruction/RecBackground/RecBackgroundAlgs/src/BeamBackgroundFiller.cxx b/Reconstruction/RecBackground/RecBackgroundAlgs/src/BeamBackgroundFiller.cxx
index 1f3b4f830b0..ae1614a6b33 100644
--- a/Reconstruction/RecBackground/RecBackgroundAlgs/src/BeamBackgroundFiller.cxx
+++ b/Reconstruction/RecBackground/RecBackgroundAlgs/src/BeamBackgroundFiller.cxx
@@ -36,6 +36,8 @@ BeamBackgroundFiller::BeamBackgroundFiller(const std::string& name,
   m_numClusterShape(0),
   m_numJet(0),
   m_direction(0),
+  m_helperTool("Muon::MuonEDMHelperTool"),
+  m_idHelperTool("Muon::MuonIdHelperTool"),
   m_idToFixedIdTool("MuonCalib::IdToFixedIdTool")
 {
   declareProperty("cscSegmentContainerKey", m_cscSegmentContainerKey="NCB_MuonSegments");
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx
index 749504434a6..dfc0a5e4bbe 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileCisDefaultCalibTool.cxx
@@ -43,6 +43,7 @@ TileCisDefaultCalibTool::TileCisDefaultCalibTool(const std::string& type, const
   , m_tileHWID(0)
   , m_cabling(0)
   , m_cablingSvc("TileCablingSvc", name)
+  , m_beamPrv("TileBeamInfoProvider")
   , m_stuckBitsProbs("")
   , m_scanMap(0)
   , m_scanMapRMS(0)
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
index d84a81d4afb..4a9d3df792d 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserDefaultCalibTool.cxx
@@ -42,6 +42,7 @@ TileLaserDefaultCalibTool::TileLaserDefaultCalibTool(const std::string& type, co
   m_isLaserCalib(false),
   m_tileHWID(nullptr),
   m_cabling(nullptr),
+  m_tileToolEmscale("TileCondToolEmscale"),
   m_tileBadChanTool("TileBadChanTool"),
   m_beamInfo(nullptr),
   m_stuckBitsProbs(""),
diff --git a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
index f789631f943..4cc3b09245a 100644
--- a/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
+++ b/TileCalorimeter/TileCalib/TileCalibAlgs/src/TileLaserLinearityCalibTool.cxx
@@ -35,6 +35,7 @@ TileLaserLinearityCalibTool::TileLaserLinearityCalibTool(const std::string& type
   AthAlgTool(type, name, pParent),
   m_tileHWID (nullptr),
   m_cabling (nullptr),
+  m_tileToolEmscale("TileCondToolEmscale"),
   m_beamInfo (nullptr),
   m_toolRunNo(0),
   m_ADC_problem(0),
diff --git a/TileCalorimeter/TileConditions/src/TileCondToolOfcCool.cxx b/TileCalorimeter/TileConditions/src/TileCondToolOfcCool.cxx
index 7c5e5f1ae1b..0a8297fe455 100644
--- a/TileCalorimeter/TileConditions/src/TileCondToolOfcCool.cxx
+++ b/TileCalorimeter/TileConditions/src/TileCondToolOfcCool.cxx
@@ -25,7 +25,7 @@ const InterfaceID& TileCondToolOfcCool::interfaceID() {
 TileCondToolOfcCool::TileCondToolOfcCool(const std::string& type, const std::string& name,
     const IInterface* parent)
     : AthAlgTool(type, name, parent)
-    , m_pryOfcCool("TileCondProxyCool_TileCalibDrawerOfc_/TileCondProxyDefault_OfcCool", this)
+    , m_pryOfcCool("TileCondProxyCool<TileCalibDrawerOfc>/TileCondProxyDefault_OfcCool", this)
     , m_weights(0)
     , m_NPhases(0)
     , m_NFields(0)
diff --git a/TileCalorimeter/TileL2Algs/src/TileL2Builder.cxx b/TileCalorimeter/TileL2Algs/src/TileL2Builder.cxx
index 322d59b264c..1940c41e018 100644
--- a/TileCalorimeter/TileL2Algs/src/TileL2Builder.cxx
+++ b/TileCalorimeter/TileL2Algs/src/TileL2Builder.cxx
@@ -65,7 +65,7 @@ TileL2Builder::TileL2Builder(const std::string& type, const std::string& name,
   declareProperty("NoiseThreshold", m_noiseThreshold);       // use channels only above noise cut
   declareProperty("Noise", m_noiseType);            // choose between electronic or total noise
   declareProperty("TileCondToolEmscale", m_tileToolEmscale);      // Name of calibration tool
-  declareProperty("TileCondToolNoiseRawChn", m_tileToolNoiseRawChn);  // Name of tool with noise RMS
+  declareProperty("TileCondToolNoiseRawChn", m_tileToolNoiseRawChn=nullptr);  // Name of tool with noise RMS
   declareProperty("TileBadChanTool", m_tileBadChanTool);      // Name of bad channel tool
 }
 
diff --git a/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx b/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
index 2a3cc99e848..898f672380a 100644
--- a/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
+++ b/TileCalorimeter/TileMonitoring/src/TileRODMonTool.cxx
@@ -39,6 +39,7 @@ TileRODMonTool::TileRODMonTool(const std::string & type, const std::string & nam
   , m_OFNI(false)
   , m_corrtime(false)
   , m_tileToolEmscale("TileCondToolEmscale")
+  , m_beamInfo("TileBeamInfoProvider")
   , m_tileBadChanTool("TileBadChanTool")
   , m_robSvc("ROBDataProviderSvc", name)
   , m_evEref{}
diff --git a/TileCalorimeter/TileRecUtils/src/TileRawChannelMaker.cxx b/TileCalorimeter/TileRecUtils/src/TileRawChannelMaker.cxx
index 7fe02f2fb27..328a3e27dcd 100644
--- a/TileCalorimeter/TileRecUtils/src/TileRawChannelMaker.cxx
+++ b/TileCalorimeter/TileRecUtils/src/TileRawChannelMaker.cxx
@@ -32,6 +32,7 @@ TileRawChannelMaker::TileRawChannelMaker(const std::string& name,
     , m_TileDigitsContainerID("TileDigitsCnt")
     , m_tileRawChannelBuilderList()
     , m_fitOverflow(false)      
+    , m_tileRawChannelBuilderFitOverflow("TileRawChannelBuilder")
 {
   // declareProperty("TileRawChannelBuilder",m_TileRawChannelBuilderIDVec);
   declareProperty("TileDigitsContainer", m_TileDigitsContainerID);
@@ -67,6 +68,8 @@ StatusCode TileRawChannelMaker::initialize() {
   
   if (m_fitOverflow) {
     CHECK( m_tileRawChannelBuilderFitOverflow.retrieve() );
+  } else {
+    m_tileRawChannelBuilderFitOverflow.disable();
   }
 
   ATH_MSG_INFO( "Initialization completed successfully");
diff --git a/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx b/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx
index 22dff13a55c..4286b18534e 100644
--- a/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx
+++ b/TileCalorimeter/TileSimAlgs/src/TileDigitsFromPulse.cxx
@@ -57,7 +57,12 @@ using CLHEP::RandFlat;
 // Constructor
 //
 TileDigitsFromPulse::TileDigitsFromPulse(std::string name, ISvcLocator* pSvcLocator) :
-		AthAlgorithm(name, pSvcLocator), m_tileHWID(0), m_tileInfo(0), m_pHRengine(0), m_rndmSvc("AtRndmGenSvc", name)
+  AthAlgorithm(name, pSvcLocator),
+  m_tileHWID(0),
+  m_tileInfo(0),
+  m_tileToolNoiseSample("TileCondToolNoiseSample"),
+  m_pHRengine(0),
+  m_rndmSvc("AtRndmGenSvc", name)
 
 {
 	m_rChUnit = TileRawChannelUnit::ADCcounts;
diff --git a/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx b/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx
index 9f16d05fb54..25dd7963a2a 100644
--- a/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx
+++ b/TileCalorimeter/TileSimAlgs/src/TilePulseForTileMuonReceiver.cxx
@@ -90,7 +90,9 @@ TilePulseForTileMuonReceiver::TilePulseForTileMuonReceiver(std::string name, ISv
   , m_tileToolNoiseSample("TileCondToolNoiseSample")
   , m_tileToolPulseShape("TileCondToolPulseShape")
   , m_tileBadChanTool("TileBadChanTool")
-  , m_beamInfo("TileBeamInfoProvider/TileBeamInfoProvider") {
+  , m_beamInfo("TileBeamInfoProvider/TileBeamInfoProvider")
+  , m_MuRcvBuildTool("TileRawChannelBuilderMF")
+{
   // declare properties...
 
   declareProperty("TileHitContainer"               , m_hitContainer         = "TileHitCnt");
@@ -179,9 +181,14 @@ StatusCode TilePulseForTileMuonReceiver::initialize() {
 
     m_shapeMuonReceiver = m_tileInfo->MuRcvFullShape();
     m_shapeMuonReceiver.push_back(0.0);
+    m_tileToolPulseShape.disable();
   }
 
-  if (m_maskBadChannels) CHECK(m_tileBadChanTool.retrieve());
+  if (m_maskBadChannels) {
+    CHECK(m_tileBadChanTool.retrieve());
+  } else {
+    m_tileBadChanTool.disable();
+  }
 
   ATH_MSG_VERBOSE("TilePulseForTileMuonReceiver initialization completed");
   return StatusCode::SUCCESS;
diff --git a/TileCalorimeter/TileTBRec/src/TileTBOldNtupleRead.cxx b/TileCalorimeter/TileTBRec/src/TileTBOldNtupleRead.cxx
index d67fe01e1fc..0302d413bfd 100644
--- a/TileCalorimeter/TileTBRec/src/TileTBOldNtupleRead.cxx
+++ b/TileCalorimeter/TileTBRec/src/TileTBOldNtupleRead.cxx
@@ -35,6 +35,7 @@ TileTBOldNtupleRead::TileTBOldNtupleRead(std::string name, ISvcLocator* pSvcLoca
   : AthAlgorithm(name, pSvcLocator)
   , m_tileHWID(0)
   , m_cabling(0)
+  , m_beamInfo("TileBeamInfoProvider")
   , m_trigType(0)
   , m_file(0)
   , m_ntuple(0)
diff --git a/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/MessageHelper.h b/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/MessageHelper.h
index de9568e71cf..c436b133992 100644
--- a/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/MessageHelper.h
+++ b/Tracking/TrkFitter/TrkiPatFitterUtils/TrkiPatFitterUtils/MessageHelper.h
@@ -8,12 +8,12 @@
 #include <sstream>
 #include <string>
 #include <vector>
-#include "AthenaBaseComps/AthMessaging.h"
+#include "AthenaBaseComps/AthAlgTool.h"
 
 class MessageHelper
 {
 public:
-    MessageHelper				(const AthMessaging& parent);
+    MessageHelper				(const AthAlgTool& parent);
     void	incrementCount			(unsigned int messageNumber);    
     void	printSummary			(void) const;
     void	printWarning			(unsigned int messageNumber);
@@ -24,14 +24,14 @@ public:
     bool	wouldPrintWarning		(unsigned int messageNumber) const;
 
 private:
-    const AthMessaging&               m_parent; 
+    const AthAlgTool&                 m_parent; 
     unsigned int                      m_maxWarnings;	//!< Maximum number of WARNING messages permitted. 
     mutable std::vector<unsigned int> m_warningCounts;	//!< The counts per error (the index is the error number)
     mutable std::vector<std::string>  m_warningText;	//!< The text for the WARNINGs (the index is the error number). Filled in ctor. 
 };
 
 inline
-MessageHelper::MessageHelper (const AthMessaging& parent)
+MessageHelper::MessageHelper (const AthAlgTool& parent)
     : m_parent		(parent),
       m_maxWarnings	(3)
 {}
diff --git a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigLArNoisyROAlg.cxx b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigLArNoisyROAlg.cxx
index 1405e7884e8..b30931bcdc9 100755
--- a/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigLArNoisyROAlg.cxx
+++ b/Trigger/TrigAlgorithms/TrigCaloRec/src/TrigLArNoisyROAlg.cxx
@@ -47,6 +47,7 @@ class ISvcLocator;
 TrigLArNoisyROAlg::TrigLArNoisyROAlg(const std::string& name, ISvcLocator* pSvcLocator)
   : HLT::AllTEAlgo(name, pSvcLocator), 
     m_useCachedResult(false), m_roiEtaLimit(4.8), m_onlineID(0),
+    m_cablingService("LArCablingService"),
     m_AllTECaloClusterContainer(NULL)
 {
 
diff --git a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx
index 602f14331d4..ba42c4fd4eb 100644
--- a/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx
+++ b/Trigger/TrigAlgorithms/TrigL2MuonSA/src/MuFastTrackFitter.cxx
@@ -28,7 +28,11 @@ TrigL2MuonSA::MuFastTrackFitter::MuFastTrackFitter(const std::string& type,
   m_storeGateSvc( "StoreGateSvc", name ),
   m_use_mcLUT(true),
   m_alignmentBarrelLUTSvc(0),
-  m_use_endcapInnerFromBarrel(false)
+  m_use_endcapInnerFromBarrel(false),
+  m_sagittaRadiusEstimate("TrigL2MuonSA::SagittaRadiusEstimate"),
+  m_alphaBetaEstimate("TrigL2MuonSA::AlphaBetaEstimate"),
+  m_ptFromRadius("TrigL2MuonSA::PtFromRadius"),
+  m_ptFromAlphaBeta("TrigL2MuonSA::PtFromAlphaBeta")
 {
   declareInterface<TrigL2MuonSA::MuFastTrackFitter>(this);
 }
@@ -58,6 +62,11 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::initialize()
      ATH_MSG_ERROR("Could not find StoreGateSvc");
       return sc;
    }
+
+   ATH_CHECK( m_sagittaRadiusEstimate.retrieve() );
+   ATH_CHECK( m_alphaBetaEstimate.retrieve() );
+   ATH_CHECK( m_ptFromRadius.retrieve() );
+   ATH_CHECK( m_ptFromAlphaBeta.retrieve() );
    
    // 
    return StatusCode::SUCCESS; 
@@ -99,42 +108,42 @@ StatusCode TrigL2MuonSA::MuFastTrackFitter::setMCFlag(BooleanProperty use_mcLUT)
   }
 
   // Calculation of sagitta and radius
-  sc = m_sagittaRadiusEstimate.retrieve();
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_sagittaRadiusEstimate);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved service " << m_sagittaRadiusEstimate);
+  // sc = m_sagittaRadiusEstimate.retrieve();
+  // if ( sc.isFailure() ) {
+  //   ATH_MSG_ERROR("Could not retrieve " << m_sagittaRadiusEstimate);
+  //   return sc;
+  // }
+  // ATH_MSG_DEBUG("Retrieved service " << m_sagittaRadiusEstimate);
 
   m_sagittaRadiusEstimate->setMCFlag(m_use_mcLUT, m_alignmentBarrelLUTSvc);
 
   // Calculation of alpha and beta
-  sc = m_alphaBetaEstimate.retrieve();
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_alphaBetaEstimate);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved service " << m_alphaBetaEstimate);
+  // sc = m_alphaBetaEstimate.retrieve();
+  // if ( sc.isFailure() ) {
+  //   ATH_MSG_ERROR("Could not retrieve " << m_alphaBetaEstimate);
+  //   return sc;
+  // }
+  // ATH_MSG_DEBUG("Retrieved service " << m_alphaBetaEstimate);
 
   m_alphaBetaEstimate->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc);
 
   // conversion: radius -> pT
-  sc = m_ptFromRadius.retrieve();
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_ptFromRadius);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved service " << m_ptFromRadius);
+  // sc = m_ptFromRadius.retrieve();
+  // if ( sc.isFailure() ) {
+  //   ATH_MSG_ERROR("Could not retrieve " << m_ptFromRadius);
+  //   return sc;
+  // }
+  // ATH_MSG_DEBUG("Retrieved service " << m_ptFromRadius);
 
   m_ptFromRadius->setMCFlag(m_use_mcLUT, m_ptBarrelLUTSvc);
 
   // conversion: alpha, beta -> pT
-  sc = m_ptFromAlphaBeta.retrieve();
-  if ( sc.isFailure() ) {
-    ATH_MSG_ERROR("Could not retrieve " << m_ptFromAlphaBeta);
-    return sc;
-  }
-  ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta);
+  // sc = m_ptFromAlphaBeta.retrieve();
+  // if ( sc.isFailure() ) {
+  //   ATH_MSG_ERROR("Could not retrieve " << m_ptFromAlphaBeta);
+  //   return sc;
+  // }
+  // ATH_MSG_DEBUG("Retrieved service " << m_ptFromAlphaBeta);
 
   m_ptFromAlphaBeta->setMCFlag(m_use_mcLUT, m_ptEndcapLUTSvc);
 
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx
index 25e26aadd22..c3a7c480def 100644
--- a/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/Root/TrigDecisionTool.cxx
@@ -26,7 +26,9 @@
 #include "TrigConfL1Data/CTPConfig.h"
 #include "TrigConfL1Data/Menu.h"
 
-
+#ifdef ASGTOOL_ATHENA
+#include "AthenaKernel/getMessageSvc.h"
+#endif
 
 
 static std::vector<std::string> s_instances;
@@ -34,6 +36,9 @@ static std::vector<std::string> s_instances;
 
 Trig::TrigDecisionTool::TrigDecisionTool(const std::string& name) :
   asg::AsgMetadataTool(name),
+#ifdef ASGTOOL_ATHENA
+  AthMessaging( Athena::getMessageSvc(), name),
+#endif
   m_configKeysCache(),
   m_configKeysCached( false )
   ,m_configTool("TrigConf::xAODConfigTool")
@@ -50,15 +55,18 @@ Trig::TrigDecisionTool::TrigDecisionTool(const std::string& name) :
    declareProperty( "UseAODDecision", m_useAODDecision = false );
    declareProperty( "AcceptMultipleInstance", m_acceptMultipleInstance = false );
 
-   //full Athena env
+  //full Athena env
 #ifndef XAOD_ANALYSIS
    declareProperty( "TrigConfigSvc", m_configSvc, "Trigger Config Service");
-   declareProperty( "Navigation", m_fullNavigation); 
-   m_navigation = &*m_fullNavigation; 
+   declareProperty( "Navigation", m_fullNavigation);
+   // ugly hack to prevent genconf from causing the MessageSvc to bork
+   const std::string cmd = System::cmdLineArgs()[0];
+   if ( cmd.find( "genconf" ) == std::string::npos ) {
+     m_navigation = &*m_fullNavigation;
+   }
 #endif
    declareProperty( "ConfigTool", m_configTool);
-
-
+   
 #ifndef XAOD_STANDALONE
    //just for Athena/AthAnalysisBase
    auto props = getProperties();
diff --git a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionTool.h b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionTool.h
index ca37d88b944..0b7af32e354 100755
--- a/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionTool.h
+++ b/Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/TrigDecisionTool.h
@@ -26,6 +26,7 @@
 
 #include "TrigConfInterfaces/ITrigConfigTool.h" 
 #ifdef ASGTOOL_ATHENA
+#include "AthenaBaseComps/AthMessaging.h"
 
 
 #ifndef XAOD_ANALYSIS
@@ -53,7 +54,10 @@ namespace Trig {
   class TrigDecisionTool :
     public asg::AsgMetadataTool,
     virtual Trig::ITrigDecisionTool,
-    public TrigDecisionToolCore   
+    public TrigDecisionToolCore
+#ifdef ASGTOOL_ATHENA
+    , public AthMessaging
+#endif   
   { 
     // constructors, destructor
     ASG_TOOL_INTERFACE(Trig::TrigDecisionTool)
diff --git a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx
index 9497455eb57..4a1936a7a2a 100644
--- a/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx
+++ b/Trigger/TrigAnalysis/TriggerMatchingTool/Root/MatchingTool.cxx
@@ -39,7 +39,7 @@ namespace Trig {
 #ifndef XAOD_STANDALONE
   void MatchingTool::updateOutputLevel(Property& p) {
     this->msg_update_handler(p); //calls original handler
-    impl()->msg().setLevel(AthMessaging::msg().level()); //pass on our message level to the matchingimplementation
+    impl()->msg().setLevel(msgLevel()); //pass on our message level to the matchingimplementation
   }
 #endif
 
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTConfigSvc.h b/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTConfigSvc.h
index e748df166d6..8ca7b5cdda2 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTConfigSvc.h
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTConfigSvc.h
@@ -36,8 +36,6 @@ namespace TrigConf {
    {
    public:
 
-      using AthService::AthMessaging::msg;
-
       // implementing IIHLTConfigSvc
       const HLTChainList*    chainList() const __attribute__ ((deprecated));
       const HLTChainList&    chains() const;
diff --git a/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTJobOptionsSvc.h b/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTJobOptionsSvc.h
index 47e3d4580d4..da66b4abbfb 100644
--- a/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTJobOptionsSvc.h
+++ b/Trigger/TrigConfiguration/TrigConfigSvc/TrigConfigSvc/HLTJobOptionsSvc.h
@@ -36,8 +36,6 @@ namespace TrigConf {
    class HLTJobOptionsSvc : public extends2<ConfigSvcBase, IProperty, IJobOptionsSvc>
    {
    public:
-
-      using AthService::AthMessaging::msg;
       
       // Constructor and destructor
       HLTJobOptionsSvc( const std::string& name, ISvcLocator* pSvcLocator );
diff --git a/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx b/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx
index 597a795c185..823b9a8d4b2 100644
--- a/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx
+++ b/Trigger/TrigCost/RatesAnalysis/src/RatesAnalysisAlg.cxx
@@ -17,6 +17,7 @@
 RatesAnalysisAlg::RatesAnalysisAlg( const std::string& name, ISvcLocator* pSvcLocator ) : 
   AthAnalysisAlgorithm( name, pSvcLocator ),
   m_enhancedBiasRatesTool("EnhancedBiasWeighter/EnhancedBiasRatesTool"),
+  m_tdt("Trig::TrigDecisionTool"),
   m_targetMu(0.),
   m_targetBunches(0.),
   m_targetLumi(0.),
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx
index 39da3893d38..ecaa34d192b 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2BMuMuFex.cxx
@@ -50,6 +50,7 @@
 /*--------------------------------------------------------------------------------*/
 TrigL2BMuMuFex::TrigL2BMuMuFex(const std::string & name, ISvcLocator* pSvcLocator):
 HLT::ComboAlgo(name, pSvcLocator),
+m_bphysHelperTool("TrigBphysHelperUtilsTool"),
 m_muon1(0),
 m_muon2(0),
 m_L2vertFitter("TrigL2VertexFitter",this),
diff --git a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassFex.cxx b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassFex.cxx
index 8e5d28e59a4..30fd2f06d48 100644
--- a/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassFex.cxx
+++ b/Trigger/TrigHypothesis/TrigBphysHypo/src/TrigL2TrkMassFex.cxx
@@ -47,6 +47,7 @@ using namespace std;
 /*------------------------------------------------------------------------------------*/
 TrigL2TrkMassFex::TrigL2TrkMassFex(const std::string & name, ISvcLocator* pSvcLocator):
   HLT::FexAlgo(name, pSvcLocator),
+  m_bphysHelperTool("TrigBphysHelperUtilsTool"),
   m_vertFitter("TrigVertexFitter",this),
   m_L2vertFitter("TrigL2VertexFitter",this),
   m_vertexingTool("TrigVertexingTool",this),
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloTool.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloTool.cxx
index 856c67d8f54..cc277d37f27 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloTool.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloTool.cxx
@@ -24,6 +24,7 @@
 HLTCaloTool::HLTCaloTool(const std::string & type, const std::string & name, const IInterface* parent) : IHLTMonTool(type,name,parent),
  m_tcrAlgTools(this),
  m_onlineHelper(NULL),
+ m_cablingSvc("LArCablingService"),
  m_tileID(NULL)
 {
 	declareProperty ("TCRTools", m_tcrAlgTools);
diff --git a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloToolL2.cxx b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloToolL2.cxx
index 3d20e2462ff..e5f5305b279 100644
--- a/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloToolL2.cxx
+++ b/Trigger/TrigMonitoring/TrigCaloMonitoring/src/HLTCaloToolL2.cxx
@@ -19,6 +19,7 @@
 
 HLTCaloToolL2::HLTCaloToolL2(const std::string & type, const std::string & name, const IInterface* parent) : IHLTMonTool(type,name,parent),
         m_onlineHelper(NULL),
+        m_cablingSvc("LArCablingService"),
 	m_tileID(NULL)
 {
 	declareProperty ("DoNtuple", m_ntuple = false);
diff --git a/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py b/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
index a1fbdd666dd..0f42063a36c 100644
--- a/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
+++ b/Trigger/TrigSteer/ViewAlgsTest/share/EVTest.py
@@ -1,8 +1,7 @@
 # Configure the scheduler
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.ShowDataFlow=True
-svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( False )
+AlgScheduler.ShowDataFlow( False)
 
 # Event-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
index 18981a7f734..5cae8c73498 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/EmuStepProcessingTest.py
@@ -11,10 +11,9 @@
 #--------------------------------------------------------------
 
 # Configure the scheduler
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.ShowDataFlow=True
-svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataFlow( True )
 
 # include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # svcMgr.ByteStreamInputSvc.FullFileName = [ "./input.data" ]
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
index 88339647c99..93e5c12d3f9 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/cfTest.py
@@ -11,10 +11,9 @@
 #--------------------------------------------------------------
 
 # Configure the scheduler
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.ShowDataFlow=True
-svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataFlow( True )
 
 # include( "ByteStreamCnvSvc/BSEventStorageEventSelector_jobOptions.py" )
 # svcMgr.ByteStreamInputSvc.FullFileName = [ "./input.data" ]
diff --git a/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py b/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
index 9481498b8eb..dc32630effb 100644
--- a/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
+++ b/Trigger/TrigValidation/TrigUpgradeTest/share/mergeTest.py
@@ -11,10 +11,9 @@
 #--------------------------------------------------------------
 
 # Configure the scheduler
-from GaudiHive.GaudiHiveConf import ForwardSchedulerSvc
-svcMgr += ForwardSchedulerSvc()
-svcMgr.ForwardSchedulerSvc.ShowDataFlow=True
-svcMgr.ForwardSchedulerSvc.ShowControlFlow=True
+from AthenaCommon.AlgScheduler import AlgScheduler
+AlgScheduler.ShowControlFlow( True )
+AlgScheduler.ShowDataFlow( True )
 
 # Event-level algorithm sequence
 from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
-- 
GitLab