From cfae0fb37b659a5c5bc7cdddf494a331cde08ca4 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Thu, 22 Oct 2020 19:19:45 +0200
Subject: [PATCH] Trigger: Fixes for DataHandle type change

Add a few explicit `str` conversions for DataHandles.
---
 .../python/DecisionHandlingConfig.py          |  4 +--
 .../python/TrigMuonRoIToolsConfig.py          |  4 +--
 .../TriggerJobOpts/python/TriggerConfig.py    | 25 ++++++++++---------
 .../HLTMenuConfig/Bjet/BjetSequenceSetup.py   |  8 +++---
 .../CommonSequences/CaloSequenceSetup.py      |  6 ++---
 .../Egamma/ElectronSequenceSetup.py           |  4 +--
 .../Egamma/PhotonSequenceSetup.py             |  2 +-
 .../HLTMenuConfig/Egamma/PrecisionCaloRec.py  |  4 +--
 .../PrecisionElectronRecoSequences.py         |  6 ++---
 .../Jet/JetChainConfiguration.py              |  8 +++---
 .../HLTMenuConfig/Jet/JetRecoSequences.py     |  6 ++---
 .../python/HLTMenuConfig/Menu/HLTCFConfig.py  |  2 +-
 .../HLTMenuConfig/Menu/MenuComponents.py      | 13 +++++-----
 .../HLTMenuConfig/Muon/MuonSequenceSetup.py   |  2 +-
 .../python/HLTMenuConfig/Muon/MuonSetup.py    | 20 +++++++--------
 .../Photon/PhotonRecoSequences.py             |  4 +--
 .../HLTMenuConfig/Tau/TauRecoSequences.py     | 11 ++++----
 17 files changed, 65 insertions(+), 64 deletions(-)

diff --git a/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py b/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
index fe55b17b79d..c03f42391f6 100644
--- a/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
+++ b/Trigger/TrigSteer/DecisionHandling/python/DecisionHandlingConfig.py
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 # 
 
 def setupFilterMonitoring( filterAlg ):    
@@ -8,7 +8,7 @@ def setupFilterMonitoring( filterAlg ):
     from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool
     monTool = GenericMonitoringTool('MonTool')
     
-    inputKeys = filterAlg.Input
+    inputKeys = [str(i) for i in filterAlg.Input]
 
     monTool.HistPath="HLTFramework/Filters"
     monTool.defineHistogram( 'name,stat;'+filterAlg.getName(),  path='EXPERT', type='TH2I',
diff --git a/Trigger/TrigTools/TrigMuonRoITools/python/TrigMuonRoIToolsConfig.py b/Trigger/TrigTools/TrigMuonRoITools/python/TrigMuonRoIToolsConfig.py
index aa05049b86f..3b724ff69e6 100644
--- a/Trigger/TrigTools/TrigMuonRoITools/python/TrigMuonRoIToolsConfig.py
+++ b/Trigger/TrigTools/TrigMuonRoITools/python/TrigMuonRoIToolsConfig.py
@@ -19,7 +19,7 @@ def TrigMuonRoIToolCfg():
         topSequence = AlgSequence()
         if not hasattr(topSequence,'SGInputLoader'):
             raise RuntimeError('Cannot configure TrigMuonRoITool because SGInputLoader is missing from topSequence')
-        topSequence.SGInputLoader.Load += [( rdoType, 'StoreGateSvc+'+tool.MUCTPILocation )]
+        topSequence.SGInputLoader.Load += [( rdoType, 'StoreGateSvc+%s' % tool.MUCTPILocation )]
 
         # Enable using the Converter to load MUCTPI_RDO from ByteStream
         from AthenaCommon.GlobalFlags import globalflags
@@ -27,6 +27,6 @@ def TrigMuonRoIToolCfg():
             from AthenaCommon.AppMgr import ServiceMgr as svcMgr
             if not hasattr(svcMgr, 'ByteStreamAddressProviderSvc'):
                 raise RuntimeError('Cannot configure TrigMuonRoITool because ByteStreamAddressProviderSvc is missing from svcMgr')
-            svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ rdoType+'/'+tool.MUCTPILocation ]
+            svcMgr.ByteStreamAddressProviderSvc.TypeNames += [ '%s/%s' % (rdoType, tool.MUCTPILocation) ]
 
     return tool
diff --git a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
index d341f13a8c4..e1474795343 100644
--- a/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
+++ b/Trigger/TriggerCommon/TriggerJobOpts/python/TriggerConfig.py
@@ -52,9 +52,9 @@ def __decisionsFromHypo( hypo ):
     from TrigCompositeUtils.TrigCompositeUtils import isLegId
     __log.debug("Hypo type {} is combo {}".format( hypo.getName(), __isCombo( hypo ) ) )
     if __isCombo( hypo ):
-        return [key for key in list(hypo.MultiplicitiesMap.keys()) if not isLegId(key)], hypo.HypoOutputDecisions[0]
+        return [key for key in list(hypo.MultiplicitiesMap.keys()) if not isLegId(key)], str(hypo.HypoOutputDecisions[0])
     else: # regular hypos
-        return [ t.getName() for t in hypo.HypoTools if not isLegId(t.getName())], hypo.HypoOutputDecisions
+        return [ t.getName() for t in hypo.HypoTools if not isLegId(t.getName())], str(hypo.HypoOutputDecisions)
 
 def __getSequenceChildrenIfIsSequence( s ):
     if isSequence( s ):
@@ -100,7 +100,7 @@ def collectFilters( steps ):
 
 def collectL1DecoderDecisionObjects(l1decoder):
     decisionObjects = set()
-    decisionObjects.update([ d.Decisions for d in l1decoder.roiUnpackers ])
+    decisionObjects.update([ str(d.Decisions) for d in l1decoder.roiUnpackers ])
     from L1Decoder.L1DecoderConfig import mapThresholdToL1DecisionCollection
     decisionObjects.add( mapThresholdToL1DecisionCollection("FSNOSEED") ) # Include also Full Scan
     __log.info("Collecting %i decision objects from L1 decoder instance", len(decisionObjects))
@@ -114,14 +114,14 @@ def collectHypoDecisionObjects(hypos, inputs = True, outputs = True):
                          hypoAlg.getName(), hypoAlg.HypoInputDecisions, hypoAlg.HypoOutputDecisions )
             if isinstance( hypoAlg.HypoInputDecisions, list):
                 if inputs:
-                    [ decisionObjects.add( d ) for d in hypoAlg.HypoInputDecisions ]
+                    [ decisionObjects.add( str(d) ) for d in hypoAlg.HypoInputDecisions ]
                 if outputs:
-                    [ decisionObjects.add( d ) for d in hypoAlg.HypoOutputDecisions ]
+                    [ decisionObjects.add( str(d) ) for d in hypoAlg.HypoOutputDecisions ]
             else:
                 if inputs:
-                    decisionObjects.add( hypoAlg.HypoInputDecisions )
+                    decisionObjects.add( str(hypoAlg.HypoInputDecisions) )
                 if outputs:
-                    decisionObjects.add( hypoAlg.HypoOutputDecisions )
+                    decisionObjects.add( str(hypoAlg.HypoOutputDecisions) )
     __log.info("Collecting %i decision objects from hypos", len(decisionObjects))
     return sorted(decisionObjects)
 
@@ -130,15 +130,15 @@ def collectFilterDecisionObjects(filters, inputs = True, outputs = True):
     for step, stepFilters in six.iteritems (filters):
         for filt in stepFilters:
             if inputs and hasattr( filt, "Input" ):
-                decisionObjects.update( filt.Input )
+                decisionObjects.update( str(i) for i in filt.Input )
             if outputs and hasattr( filt, "Output" ):
-                decisionObjects.update( filt.Output )
+                decisionObjects.update( str(o) for o in filt.Output )
     __log.info("Collecting %i decision objects from filters", len(decisionObjects))
     return decisionObjects
 
 def collectHLTSummaryDecisionObjects(hltSummary):
     decisionObjects = set()
-    decisionObjects.add( hltSummary.DecisionsSummaryKey )
+    decisionObjects.add( str(hltSummary.DecisionsSummaryKey) )
     __log.info("Collecting %i decision objects from hltSummary", len(decisionObjects))
     return decisionObjects
 
@@ -196,6 +196,7 @@ def triggerSummaryCfg(flags, hypos):
 
     for c, cont in six.iteritems (allChains):
         __log.debug("Final decision of chain  " + c + " will be read from " + cont )
+
     decisionSummaryAlg.FinalDecisionKeys = list(OrderedDict.fromkeys(allChains.values()))
     decisionSummaryAlg.FinalStepDecisions = dict(allChains)
     decisionSummaryAlg.DecisionsSummaryKey = "HLTNav_Summary" # Output
@@ -446,8 +447,8 @@ def triggerPOOLOutputCfg(flags, edmSet):
 
     # Ensure OutputStream runs after TrigDecisionMakerMT and xAODMenuWriterMT
     streamAlg.ExtraInputs += [
-        ("xAOD::TrigDecision", decmaker.TrigDecisionKey),
-        ("xAOD::TrigConfKeys", menuwriter.KeyWriterTool.ConfKeys)]
+        ("xAOD::TrigDecision", str(decmaker.TrigDecisionKey)),
+        ("xAOD::TrigConfKeys", str(menuwriter.KeyWriterTool.ConfKeys))]
 
     # Produce xAOD L1 RoIs from RoIBResult
     from AnalysisTriggerAlgs.AnalysisTriggerAlgsCAConfig import RoIBResultToxAODCfg
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
index 9d34dd8a56d..e530ebad463 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Bjet/BjetSequenceSetup.py
@@ -51,9 +51,9 @@ def bJetStep2Sequence():
 
 
     # Prepare data objects for view verifier
-    viewDataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + InputMakerAlg.InViewRoIs ),
-                       ( 'xAOD::VertexContainer' , 'StoreGateSvc+' + prmVtxKey ),
-                       ( 'xAOD::JetContainer' , 'StoreGateSvc+' + InputMakerAlg.InViewJets )]
+    viewDataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % InputMakerAlg.InViewRoIs ),
+                       ( 'xAOD::VertexContainer' , 'StoreGateSvc+%s' % prmVtxKey ),
+                       ( 'xAOD::JetContainer' , 'StoreGateSvc+%s' % InputMakerAlg.InViewJets )]
 
     # Second stage of Fast Tracking and Precision Tracking
     from TriggerMenuMT.HLTMenuConfig.Bjet.BjetTrackingConfiguration import getSecondStageBjetTracking
@@ -64,7 +64,7 @@ def bJetStep2Sequence():
 
     # Flavour Tagging
     from TriggerMenuMT.HLTMenuConfig.Bjet.BjetFlavourTaggingConfiguration import getFlavourTagging
-    acc_flavourTaggingAlgs,bTaggingContainerName = getFlavourTagging( inputJets=InputMakerAlg.InViewJets, inputVertex=prmVtxKey, inputTracks=PTTrackParticles[0] )
+    acc_flavourTaggingAlgs,bTaggingContainerName = getFlavourTagging( inputJets=str(InputMakerAlg.InViewJets), inputVertex=prmVtxKey, inputTracks=PTTrackParticles[0] )
     
     Configurable.configurableRun3Behavior=0
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
index e1d37d311f7..46850e37376 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/CommonSequences/CaloSequenceSetup.py
@@ -62,7 +62,7 @@ def cellRecoSequence(flags, name="HLTCaloCellMakerFS", RoIs=caloFSRoI, outputNam
     alg.RoIs=RoIs
     alg.TrigDataAccessMT=svcMgr.TrigCaloDataAccessSvc
     alg.CellsName=outputName
-    return parOR(name+"RecoSequence", [alg]), alg.CellsName
+    return parOR(name+"RecoSequence", [alg]), str(alg.CellsName)
 
 def caloClusterRecoSequence(
         flags, name="HLTCaloClusterMakerFS", RoIs=caloFSRoI,
@@ -76,7 +76,7 @@ def caloClusterRecoSequence(
             doLC=False,
             cells=cells_name)
     alg.CaloClusters = recordable(outputName)
-    return parOR(name+"RecoSequence", [cell_sequence, alg]), alg.CaloClusters
+    return parOR(name+"RecoSequence", [cell_sequence, alg]), str(alg.CaloClusters)
 
 def LCCaloClusterRecoSequence(
         flags, name="HLTCaloClusterCalibratorLCFS", RoIs=caloFSRoI,
@@ -92,4 +92,4 @@ def LCCaloClusterRecoSequence(
             InputClusters = em_clusters,
             OutputClusters = outputName,
             OutputCellLinks = outputName+"_cellLinks")
-    return parOR(name+"RecoSequence", [em_sequence, alg]), alg.OutputClusters
+    return parOR(name+"RecoSequence", [em_sequence, alg]), str(alg.OutputClusters)
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
index 4642bc39b57..30485e09cfa 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/ElectronSequenceSetup.py
@@ -27,8 +27,8 @@ def fastElectronSequence(ConfigFlags):
     # A simple algorithm to confirm that data has been inherited from parent view
     # Required to satisfy data dependencies
     from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs  
-    viewVerify.DataObjects += [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters ),
-                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs )]
+    viewVerify.DataObjects += [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+%s' % CaloMenuDefs.L2CaloClusters ),
+                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs )]
 
     TrackParticlesName = ""
     for viewAlg in viewAlgs:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
index 906e8cf658b..610cf8739e9 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PhotonSequenceSetup.py
@@ -18,7 +18,7 @@ def fastPhotonMenuSequence():
     
     from TriggerMenuMT.HLTMenuConfig.CommonSequences.CaloSequenceSetup import CaloMenuDefs
     ViewVerify = CfgMgr.AthViews__ViewDataVerifier("FastPhotonViewDataVerifier")
-    ViewVerify.DataObjects = [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+' + CaloMenuDefs.L2CaloClusters ),
+    ViewVerify.DataObjects = [( 'xAOD::TrigEMClusterContainer' , 'StoreGateSvc+%s' % CaloMenuDefs.L2CaloClusters ),
                               ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+EMIDRoIs' )]
 
     from TrigEgammaHypo.TrigEgammaFastPhotonFexMTConfig import EgammaFastPhotonFex_1
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionCaloRec.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionCaloRec.py
index 6e00d700512..ee2ecf9dd89 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionCaloRec.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Egamma/PrecisionCaloRec.py
@@ -1,5 +1,5 @@
 #
-#  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 egammaAlgs import egammaAlgsConf
@@ -19,7 +19,7 @@ def precisionCaloRecoSequence(DummyFlag, RoIs):
     log.debug('RoIs = %s',RoIs)
 
     egammaTopoClusterCopier = AlgFactory( egammaAlgsConf.egammaTopoClusterCopier,
-                                          name = 'TrigEgammaTopoClusterCopier'+RoIs ,
+                                          name = 'TrigEgammaTopoClusterCopier%s' % RoIs ,
                                           InputTopoCollection= "caloclusters",
                                           OutputTopoCollection=precisionCaloMenuDefs.precisionCaloClusters,
                                           OutputTopoCollectionShallow="tmp_"+precisionCaloMenuDefs.precisionCaloClusters,
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
index d5d7844d53e..d3afae96916 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Electron/PrecisionElectronRecoSequences.py
@@ -32,8 +32,8 @@ def precisionElectronRecoSequence(RoIs):
     ViewVerifyTrk   = CfgMgr.AthViews__ViewDataVerifier("PrecisionTrackViewDataVerifier")
 
     ViewVerifyTrk.DataObjects = [( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' ),
-                                 ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+' + precisionCaloMenuDefs.precisionCaloClusters ),
-                                 ( 'xAOD::TrackParticleContainer','StoreGateSvc+' + TrigEgammaKeys.TrigElectronTracksCollectionName)] 
+                                 ( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % precisionCaloMenuDefs.precisionCaloClusters ),
+                                 ( 'xAOD::TrackParticleContainer','StoreGateSvc+%s' % TrigEgammaKeys.TrigElectronTracksCollectionName)]
 
 
     """ Retrieve the factories now """
@@ -41,7 +41,7 @@ def precisionElectronRecoSequence(RoIs):
     from TriggerMenuMT.HLTMenuConfig.Egamma.TrigEgammaFactories import  TrigEMTrackMatchBuilder
    
     #The sequence of these algorithms
-    thesequence = parOR( "precisionElectron_"+RoIs)
+    thesequence = parOR( "precisionElectron_%s" % RoIs)
    
     thesequence += ViewVerifyTrk
     # Create the sequence of three steps:
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py
index e3754153984..41b77d34c2f 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetChainConfiguration.py
@@ -97,7 +97,7 @@ class JetChainConfiguration(ChainConfigurationBase):
         from TriggerMenuMT.HLTMenuConfig.Jet.JetMenuSequences import jetCaloHypoMenuSequence
         jetSeq = RecoFragmentsPool.retrieve( jetCaloHypoMenuSequence, 
                                              ConfigFlags, **self.recoDict )
-        jetCollectionName = jetSeq.hypo.Alg.Jets 
+        jetCollectionName = str(jetSeq.hypo.Alg.Jets)
 
         return jetCollectionName, ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict])
 
@@ -109,7 +109,7 @@ class JetChainConfiguration(ChainConfigurationBase):
         from TriggerMenuMT.HLTMenuConfig.Jet.JetMenuSequences import jetTrackingHypoMenuSequence
         jetSeq = RecoFragmentsPool.retrieve( jetTrackingHypoMenuSequence,
                                              ConfigFlags, clustersKey=clustersKey, **self.recoDict )
-        jetCollectionName = jetSeq.hypo.Alg.Jets 
+        jetCollectionName = str(jetSeq.hypo.Alg.Jets)
 
         return jetCollectionName, ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict])
 
@@ -120,7 +120,7 @@ class JetChainConfiguration(ChainConfigurationBase):
         jetSeq, clustersKey = RecoFragmentsPool.retrieve( jetCaloRecoMenuSequence,
                                                           ConfigFlags, clusterCalib=self.recoDict["calib"] )
 
-        return clustersKey, ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict])
+        return str(clustersKey), ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[self.dict])
 
     def getJetCaloPreselChainStep(self):
         # Define a fixed preselection dictionary for prototyping -- we may expand the options
@@ -168,7 +168,7 @@ class JetChainConfiguration(ChainConfigurationBase):
         jetSeq, clustersKey = RecoFragmentsPool.retrieve( jetCaloPreselMenuSequence,
                                                           ConfigFlags, **preselRecoDict )
 
-        return clustersKey, ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[preselChainDict])
+        return str(clustersKey), ChainStep(stepName, [jetSeq], multiplicity=[1], chainDicts=[preselChainDict])
 
     def getJetTLAChainStep(self, jetCollectionName):
         from TriggerMenuMT.HLTMenuConfig.Jet.JetTLASequences import jetTLAMenuSequence
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
index 9f8e18736c8..10c99e949b1 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Jet/JetRecoSequences.py
@@ -109,7 +109,7 @@ def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict
 
     # Add the PseudoJetGetter alg to the sequence
     constitPJAlg = getConstitPJGAlg( jetDef.inputdef )
-    constitPJKey = constitPJAlg.OutputContainer
+    constitPJKey = str(constitPJAlg.OutputContainer)
     recoSeq += conf2toConfigurable( constitPJAlg )
     # Basic list of PseudoJets is just the constituents
     # Append ghosts (tracks) if desired
@@ -130,7 +130,7 @@ def standardJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoDict
         # Not currently written because impossible to merge
         # across event views, which is maybe a concern in
         # the case of regional PFlow
-        rhoKey = eventShapeAlg.EventDensityTool.OutputContainer
+        rhoKey = str(eventShapeAlg.EventDensityTool.OutputContainer)
 
     # Import the standard jet modifiers as defined for offline
     # We can add/configure these differently if desired. 
@@ -226,7 +226,7 @@ def reclusteredJetRecoSequence( configFlags, dataSource, clustersKey, **jetRecoD
     rcJetDef.modifiers = rcModList
 
     rcConstitPJAlg = getConstitPJGAlg( rcJetDef.inputdef )
-    rcConstitPJKey = rcConstitPJAlg.OutputContainer
+    rcConstitPJKey = str(rcConstitPJAlg.OutputContainer)
     recoSeq += conf2toConfigurable( rcConstitPJAlg )
 
     # Get online monitoring tool
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
index ec70259e6dd..7bc052ca296 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/HLTCFConfig.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
 
 """
     ------ Documentation on HLT Tree creation -----
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
index 7cb01ff3181..645bd4fc3f2 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Menu/MenuComponents.py
@@ -1,5 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
+from GaudiKernel.DataHandle import DataHandle
 from AthenaCommon.Logging import logging
 log = logging.getLogger( __name__ )
 from collections import MutableSequence
@@ -18,10 +19,10 @@ class Node(object):
         self.outputs=[]
 
     def addOutput(self, name):
-        self.outputs.append(name)
+        self.outputs.append(str(name) if isinstance(name, DataHandle) else name)
 
     def addInput(self, name):
-        self.inputs.append(name)
+        self.inputs.append(str(name) if isinstance(name, DataHandle) else name)
 
     def getOutputList(self):
         return self.outputs
@@ -76,7 +77,7 @@ class AlgNode(Node):
             log.debug("Output DH not added in %s: %s already set!", self.Alg.getName(), name)
         else:
             if self.outputProp != '':
-                self.setPar(self.outputProp,name)
+                self.setPar(self.outputProp, name)
             else:
                 log.error("no OutputProp set")
         Node.addOutput(self, name)
@@ -90,7 +91,7 @@ class AlgNode(Node):
         if isinstance(cval, MutableSequence):
             outputs.extend(cval)
         else:
-            outputs.append(cval)
+            outputs.append(str(cval))
         return outputs
 
     def addInput(self, name):
@@ -99,7 +100,7 @@ class AlgNode(Node):
             log.debug("Input DH not added in %s: %s already set!", self.Alg.getName(), name)
         else:
             if self.inputProp != '':
-                self.setPar(self.inputProp,name)
+                self.setPar(self.inputProp, name)
             else:
                 log.error("no InputProp set")
         Node.addInput(self, name)
@@ -113,7 +114,7 @@ class AlgNode(Node):
         if isinstance(cval, MutableSequence):
             inputs.extend(cval)
         else:
-            inputs.append(cval)
+            inputs.append(str(cval))
         return inputs
 
     def __repr__(self):
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
index 125532d3283..5c3ad88f939 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSequenceSetup.py
@@ -136,7 +136,7 @@ def muCombAlgSequence(ConfigFlags):
     extraLoads = []
 
     for decision in muonChainFilter.InputDecisions:
-      extraLoads += [( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+'+decision )]
+      extraLoads += [( 'xAOD::TrigCompositeContainer' , 'StoreGateSvc+%s' % decision )]
 
     muFastIDRecoSequence = muonIDFastTrackingSequence( l2muCombViewsMaker.InViewRoIs , "", extraLoads )
     # muCombIDSequence = parOR("l2muCombIDSequence", [muFastIDRecoSequence, muCombFilterSequence])
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
index f0eca05add1..fd4ead0267a 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Muon/MuonSetup.py
@@ -60,10 +60,9 @@ muNamesFS = muonNames().getNames('FS')
 def makeMuonPrepDataAlgs(RoIs="MURoIs", forFullScan=False):
 
   from AthenaCommon.CFElements import parOR
-  
-  muDecodeRecoSequence = parOR("decodeMuViewNode_"+RoIs)
 
-  postFix = "_"+RoIs
+  postFix = "_%s" % RoIs
+  muDecodeRecoSequence = parOR("decodeMuViewNode"+postFix)
 
   viewAlgs_MuonPRD = []  # These algs should be executed to prepare muon PRDs for muFast and muEF steps.
 
@@ -365,7 +364,7 @@ def muFastRecoSequence( RoIs, doFullScanID = False, InsideOutMode=False ):
       ViewVerify.DataObjects += [('Muon::MMPrepDataContainer','StoreGateSvc+MM_Measurements')]
     #muFastRecoSequence+=ViewVerify
   else:
-    ViewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs )]
+    ViewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs )]
   ViewVerify.DataObjects += [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
                              ( 'DataVector< LVL1::RecMuonRoI >' , 'StoreGateSvc+HLT_RecMURoIs' )]
 
@@ -509,7 +508,7 @@ def muonIDFastTrackingSequence( RoIs, name, extraLoads=None ):
 
   from TrigInDetConfig.InDetSetup import makeInDetAlgs
   viewAlgs, viewVerify = makeInDetAlgs( config = IDTrigConfig, rois = RoIs )
-  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs )]
+  viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs )]
   if extraLoads:
     viewVerify.DataObjects += extraLoads
 
@@ -526,7 +525,7 @@ def muCombRecoSequence( RoIs, name ):
   ### Required to satisfy data dependencies                                       ###
   import AthenaCommon.CfgMgr as CfgMgr
   ViewVerify = CfgMgr.AthViews__ViewDataVerifier("muFastViewDataVerifier")
-  ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+'+muNames.L2SAName)]
+  ViewVerify.DataObjects = [('xAOD::L2StandAloneMuonContainer','StoreGateSvc+%s' % muNames.L2SAName)]
 
   muCombRecoSequence+=ViewVerify
 
@@ -589,7 +588,8 @@ def muEFSARecoSequence( RoIs, name ):
 
   EFMuonViewDataVerifier = CfgMgr.AthViews__ViewDataVerifier( "EFMuonViewDataVerifier_" + name )
   EFMuonViewDataVerifier.DataObjects = [( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' ),
-                                        ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs )]
+                                        ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs )]
+
   efAlgs.append( EFMuonViewDataVerifier )
 
   #need MdtCondDbAlg for the MuonStationIntersectSvc (required by segment and track finding)
@@ -684,7 +684,7 @@ def muEFCBRecoSequence( RoIs, name ):
   ViewVerifyMS.DataObjects = [( 'Muon::MdtPrepDataContainer' , 'StoreGateSvc+MDT_DriftCircles' ),  
                               ( 'Muon::TgcPrepDataContainer' , 'StoreGateSvc+TGC_Measurements' ),
                               ( 'Muon::RpcPrepDataContainer' , 'StoreGateSvc+RPC_Measurements' ),
-                              ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs ),
+                              ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs ),
                               ( 'xAOD::EventInfo' , 'StoreGateSvc+EventInfo' )]
   if "FS" in name:
     ViewVerifyMS.DataObjects +=[( 'MuonCandidateCollection' , 'StoreGateSvc+MuonCandidates_FS' )]
@@ -984,8 +984,8 @@ def efmuisoRecoSequence( RoIs, Muons ):
   trackParticles = PTTrackParticles[-1]
   trigEFmuIso.IdTrackParticles = trackParticles
   trigEFmuIso.MuonContName = muNames.EFIsoMuonName
-  trigEFmuIso.ptcone02Name = Muons+".ptcone02"
-  trigEFmuIso.ptcone03Name = Muons+".ptcone03"
+  trigEFmuIso.ptcone02Name = "%s.ptcone02" % Muons
+  trigEFmuIso.ptcone03Name = "%s.ptcone03" % Muons
 
   efmuisoRecoSequence += trigEFmuIso
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
index 3f3e7a41da2..00ead372a12 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Photon/PhotonRecoSequences.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 AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from TrigEDMConfig.TriggerEDMRun3 import recordable
@@ -27,7 +27,7 @@ def precisionPhotonRecoSequence(RoIs):
     from TriggerMenuMT.HLTMenuConfig.Egamma.PrecisionCaloSequenceSetup import precisionCaloMenuDefs
     import AthenaCommon.CfgMgr as CfgMgr
     ViewVerify = CfgMgr.AthViews__ViewDataVerifier("PrecisionPhotonPhotonViewDataVerifier")
-    ViewVerify.DataObjects = [( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+' + precisionCaloMenuDefs.precisionCaloClusters ),
+    ViewVerify.DataObjects = [( 'xAOD::CaloClusterContainer' , 'StoreGateSvc+%s' % precisionCaloMenuDefs.precisionCaloClusters ),
                               ( 'CaloCellContainer' , 'StoreGateSvc+CaloCells' )]
 
 
diff --git a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
index ae4748cd286..035d0d9c925 100644
--- a/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
+++ b/Trigger/TriggerCommon/TriggerMenuMT/python/HLTMenuConfig/Tau/TauRecoSequences.py
@@ -255,7 +255,7 @@ def tauIdSequence( RoIs, name):
 
     ViewVerifyId = CfgMgr.AthViews__ViewDataVerifier("tauIdViewDataVerifier_"+signatureName)
     ViewVerifyId.DataObjects = [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs'    ),
-                                ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs          ),
+                                ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs      ),
                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+RoiForTauCore'  ),
                                 ( 'xAOD::TauTrackContainer' , 'StoreGateSvc+HLT_tautrack_Presel'),  
                                 ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor'   ),
@@ -296,21 +296,20 @@ def precTrackSequence( RoIs , name):
 
 
     ViewVerifyTrk = CfgMgr.AthViews__ViewDataVerifier("tauViewDataVerifier_"+signatureName)
-    ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+'+IDTrigConfig.FT.tracksFTF() ),
+    ViewVerifyTrk.DataObjects = [( 'xAOD::TrackParticleContainer' , 'StoreGateSvc+%s' % IDTrigConfig.FT.tracksFTF() ),
                                  ( 'SG::AuxElement' , 'StoreGateSvc+EventInfo.AveIntPerXDecor' ),
-                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+'+RoIs ),
+                                 ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs ),
                                  ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+TAUCaloRoIs' ),
                                  ( 'xAOD::TauTrackContainer' , 'StoreGateSvc+HLT_tautrack_dummy' ),
                                  ( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly' ),    
                                  ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_FlaggedCondData_TRIG' ),
-                                 ( 'xAOD::IParticleContainer' , 'StoreGateSvc+'+IDTrigConfig.FT.tracksFTF() ),
+                                 ( 'xAOD::IParticleContainer' , 'StoreGateSvc+%s' % IDTrigConfig.FT.tracksFTF() ),
                                  ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
                                  ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' )]
 
     if "TrackInView" not in name:
        ViewVerifyTrk.DataObjects += [ ( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+RoiForTauCore' ) ]
 
-
     # Make sure the required objects are still available at whole-event level
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
@@ -357,7 +356,7 @@ def tauFTFSequence( RoIs, name ):
        if "InDetTrigTrackParticleCreatorAlg" in viewAlg.name():
          TrackCollection = viewAlg.TrackName
 
-    viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+' + RoIs ),
+    viewVerify.DataObjects += [( 'TrigRoiDescriptorCollection' , 'StoreGateSvc+%s' % RoIs ),
                                ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+PixelByteStreamErrs' ),
                                ( 'IDCInDetBSErrContainer' , 'StoreGateSvc+SCT_ByteStreamErrs' ),#For some reason not picked up properly
                                ( 'xAOD::TauJetContainer' , 'StoreGateSvc+HLT_TrigTauRecMerged_CaloOnly')] 
-- 
GitLab