From 3f0fa716ba2743bc60b06401c5cd77df33c21940 Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Fri, 9 Oct 2020 10:38:30 -0400
Subject: [PATCH] CaloTools: Return algorithm from CaloNoiseCondAlg.

Helps in propagating the key for the CaloNoise dependency.
---
 Calorimeter/CaloTools/python/CaloNoiseCondAlg.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py b/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
index 278f6158e67..c101b26e6aa 100644
--- a/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
+++ b/Calorimeter/CaloTools/python/CaloNoiseCondAlg.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 from AthenaCommon.AlgSequence import AthSequencer
 from IOVDbSvc.CondDB import conddb
@@ -17,9 +17,11 @@ def CaloNoiseCondAlg(noisetype="totalNoise"):
         return getattr(condSeq,noiseAlgName)
  
     if (conddb.isMC):
-        condSeq += _CaloNoiseCondAlgMC(noiseAlgName,noisetype)
+        alg = _CaloNoiseCondAlgMC(noiseAlgName,noisetype)
     else: 
-        condSeq += _CaloNoiseCondAlgData(noiseAlgName,noisetype)
+        alg = _CaloNoiseCondAlgData(noiseAlgName,noisetype)
+    condSeq += alg
+    return alg
 
 
 def _CaloNoiseCondAlgMC(noiseAlgName,noisetype):
-- 
GitLab