From 34a27a470e7548426e8f6c9e46b3cd82ec58e68e Mon Sep 17 00:00:00 2001
From: leggett <leggett@cern.ch>
Date: Thu, 22 Oct 2020 09:13:32 -0700
Subject: [PATCH] GMR1124: autoretrieve AlgTools by Services

---
 Control/AthenaServices/src/AthenaEventLoopMgr.cxx            | 3 +++
 Control/PileUpTools/src/PileUpMergeSvc.cxx                   | 5 +++++
 DetectorDescription/RegionSelector/src/RegSelSvc.cxx         | 3 +++
 Simulation/ISF/ISF_Core/ISF_Services/src/LegacySimSvc.cxx    | 1 +
 .../ISF_FastCaloSimServices/src/DNNCaloSimSvc.cxx            | 2 ++
 .../ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx         | 2 +-
 .../TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx | 2 ++
 7 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
index f6059f351d5..6e0e0d219a3 100644
--- a/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
+++ b/Control/AthenaServices/src/AthenaEventLoopMgr.cxx
@@ -124,6 +124,9 @@ StatusCode AthenaEventLoopMgr::initialize()
          << " - package version " << PACKAGE_VERSION << endmsg ;
  
 
+  m_autoRetrieveTools = false;
+  m_checkToolDeps = false;
+  
   StatusCode sc = MinimalEventLoopMgr::initialize();
   if ( !sc.isSuccess() ) 
   {
diff --git a/Control/PileUpTools/src/PileUpMergeSvc.cxx b/Control/PileUpTools/src/PileUpMergeSvc.cxx
index b5af613ade3..0a765e9be61 100755
--- a/Control/PileUpTools/src/PileUpMergeSvc.cxx
+++ b/Control/PileUpTools/src/PileUpMergeSvc.cxx
@@ -91,8 +91,13 @@ void PileUpMergeSvc::decodeIntervals() {
 /// Service initialisation
 StatusCode 
 PileUpMergeSvc::initialize()    {
+
   msg() << MSG::INFO << "Initializing AthService " << name() 
 	<< " - package version " << PACKAGE_VERSION << endmsg ;
+
+  m_autoRetrieveTools = false;
+  m_checkToolDeps = false;
+
   // set up the SG service:
   if ( !(p_overStore.retrieve()).isSuccess() ) 
   {
diff --git a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
index 3e5ec0f646c..d27ac022908 100755
--- a/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
+++ b/DetectorDescription/RegionSelector/src/RegSelSvc.cxx
@@ -142,6 +142,9 @@ RegSelSvc::queryInterface(const InterfaceID& riid, void** ppvInterface) {
 
 StatusCode RegSelSvc::initialize() {
 
+  m_checkToolDeps = false;
+  m_autoRetrieveTools = false;
+  
   m_errorFlag=false;
   ATH_CHECK( AthService::initialize() );
   ATH_CHECK (m_detStore.retrieve() );
diff --git a/Simulation/ISF/ISF_Core/ISF_Services/src/LegacySimSvc.cxx b/Simulation/ISF/ISF_Core/ISF_Services/src/LegacySimSvc.cxx
index 34b01797882..15059f5f89b 100644
--- a/Simulation/ISF/ISF_Core/ISF_Services/src/LegacySimSvc.cxx
+++ b/Simulation/ISF/ISF_Core/ISF_Services/src/LegacySimSvc.cxx
@@ -15,6 +15,7 @@ ISF::LegacySimSvc::LegacySimSvc(const std::string& name,ISvcLocator* svc) :
 /** framework methods */
 StatusCode ISF::LegacySimSvc::initialize()
 {
+  m_checkToolDeps = false;
   ATH_CHECK ( m_simulatorTool.retrieve() );
   return StatusCode::SUCCESS;
 }
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/DNNCaloSimSvc.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/DNNCaloSimSvc.cxx
index 0bf6de09490..526564af309 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/DNNCaloSimSvc.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/DNNCaloSimSvc.cxx
@@ -67,6 +67,7 @@ ISF::DNNCaloSimSvc::DNNCaloSimSvc(const std::string& name, ISvcLocator* svc) :
   declareProperty("RandomSvc"                      ,       m_rndGenSvc                );
   declareProperty("RandomStream"                   ,       m_randomEngineName         );
   declareProperty("FastCaloSimCaloExtrapolation"   ,       m_FastCaloSimCaloExtrapolation );
+
 }
 
 ISF::DNNCaloSimSvc::~DNNCaloSimSvc()
@@ -75,6 +76,7 @@ ISF::DNNCaloSimSvc::~DNNCaloSimSvc()
 /** framework methods */
 StatusCode ISF::DNNCaloSimSvc::initialize()
 {
+
   ATH_MSG_INFO(m_screenOutputPrefix << "Initializing ...");
 
   ATH_CHECK(m_rndGenSvc.retrieve());
diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx
index 0b74cb04c5a..191ee44ae3a 100644
--- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx
+++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/src/FastCaloSimSvcPU.cxx
@@ -91,7 +91,7 @@ ISF::FastCaloSimSvcPU::~FastCaloSimSvcPU()
 StatusCode ISF::FastCaloSimSvcPU::initialize()
 {
    ATH_MSG_INFO ( m_screenOutputPrefix << "Initializing FastCaloSimSvcPU ...");
-   
+
    detID=new AtlasDetectorID();
    std::unique_ptr<IdDictParser> parser(new IdDictParser());
    IdDictMgr& idd = parser->parse ("IdDictParser/ATLAS_IDS.xml");
diff --git a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
index 30686645d28..cb77a09e530 100644
--- a/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
+++ b/Trigger/TrigEvent/TrigNavTools/src/TrigNavigationThinningSvc.cxx
@@ -69,6 +69,8 @@ StatusCode TrigNavigationThinningSvc::initialize() {
 
   ATH_MSG_DEBUG( "TrigNavigationThinningSvc::initialize()" << name() );
 
+  m_checkToolDeps = false;
+
   // load the required tools
   if( not m_trigDecisionTool.empty() ) {
     if ( m_trigDecisionTool.retrieve().isFailure() ) {
-- 
GitLab