diff --git a/Control/AthenaConfiguration/python/ComponentAccumulator.py b/Control/AthenaConfiguration/python/ComponentAccumulator.py
index d5c540af4306e272e11fbe9facd80ec90aa5876e..45d34b1a10484405da7043671bdf782583d396b0 100644
--- a/Control/AthenaConfiguration/python/ComponentAccumulator.py
+++ b/Control/AthenaConfiguration/python/ComponentAccumulator.py
@@ -829,6 +829,8 @@ def __indent( indent = ""):
 def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ):
     _log = logging.getLogger( "__setProperties".ljust(30) )
     for pname, pvalue in six.iteritems( sourceConf2Instance._properties ):
+        if destConfigurableInstance.__class__.__name__ == 'AlgSequence' and pname == 'Members':
+            continue
         propType = sourceConf2Instance._descriptors[pname].cpp_type
         if "PrivateToolHandleArray" in propType:
             setattr( destConfigurableInstance, pname, [conf2toConfigurable( tool, __indent( indent ) ) for tool in pvalue] )
@@ -854,7 +856,7 @@ def __setProperties( destConfigurableInstance, sourceConf2Instance, indent="" ):
                 pass
             setattr( destConfigurableInstance, pname, pvalue )
 
-def conf2toConfigurable( comp, indent="" ):
+def conf2toConfigurable( comp, indent="", suppressDupes=False ):
     """
     Method converts from Conf2 ( comp argument ) to old Configurable
     If the Configurable of the same name exists, the properties merging process is invoked
@@ -929,9 +931,11 @@ def conf2toConfigurable( comp, indent="" ):
             return listOrDictHelper
 
     def __areSettingsSame( existingConfigurableInstance, newConf2Instance, indent="" ):
-        _log.debug( "{}Checking if setting is the same {}".format( indent, existingConfigurableInstance.getFullName() ) )
+        _log.debug( "{}Checking if setting is the same {} {}".format( indent, existingConfigurableInstance.getFullName(), newConf2Instance.getFullJobOptName() ) )
         alreadySetProperties = dict([ (pname, pvalue) for pname,pvalue
                                       in six.iteritems(existingConfigurableInstance.getValuedProperties()) ])
+        _log.debug("Existing properties: {}".format(alreadySetProperties))
+        _log.debug("New properties: {}".format(newConf2Instance._properties))
         for pname, pvalue in six.iteritems( newConf2Instance._properties ): # six.iteritems(comp._properties):
             if __isOldConfigurable( pvalue ):
                 _log.warning( "{}New configuration object {} property {} has legacy configuration components assigned to it {}"
@@ -939,10 +943,31 @@ def conf2toConfigurable( comp, indent="" ):
                 _log.warning( "Skipping comparison, no guarantees about configuration consistency" )
                 continue
             propType = newConf2Instance._descriptors[pname].cpp_type
-            _log.debug("{}Comparing type: {}".format(indent, propType))
+            _log.debug("{}Comparing type: {} for: {}".format(indent, propType, pname))
             if  "PrivateToolHandleArray" in  propType:
-                for oldC, newC in zip( alreadySetProperties[pname], pvalue):
-                    __areSettingsSame( oldC, newC, __indent(indent))
+                toolDict = {_.getName(): _ for _ in alreadySetProperties[pname]}
+                _log.debug('Private tool properties? {}'.format(toolDict))
+                newCdict = {_.getName() : _ for _ in pvalue}
+                oldCset = set(toolDict); newCset = set(newCdict)
+                _log.debug('Private tool property names? {} {}'.format(oldCset, newCset))
+                for oldC in oldCset & newCset:
+                    __areSettingsSame( toolDict[oldC], newCdict[oldC], __indent(indent))
+                for newC in newCset-oldCset:
+                    # clone new config to old array
+                    alreadySetProperties[pname].append(conf2toConfigurable(newCdict[newC]))
+            elif "PublicToolHandleArray" in propType:
+                toolSet = {_.getName() for _ in alreadySetProperties[pname]}
+                _log.debug('Public tool handle array properties? {} {}'.format(toolSet, pvalue))
+                # strings?
+                for newC in pvalue:
+                    if isinstance(newC, six.string_types):
+                        pubtoolclass, pubtoolname = newC.split('/')
+                        if pubtoolname not in toolSet:
+                            klass = __findConfigurableClass( pubtoolclass )
+                            alreadySetProperties[pname].append(klass( pubtoolname ))
+                    else:
+                        _log.warning('Not handling actual Configurable2s for public tool merging yet')
+                        raise Exception()           
             elif "PrivateToolHandle" in propType or "GaudiConfig2.Configurables" in propType or "ServiceHandle" in propType:
                 existingVal = getattr(existingConfigurableInstance, pname)
                 if isinstance( pvalue, str ):
@@ -951,10 +976,13 @@ def conf2toConfigurable( comp, indent="" ):
                     _log.debug( "{}Some kind of handle  and, object type {} existing {}".format( indent, type(pvalue), type(existingVal) ) )
                     __areSettingsSame( existingVal, pvalue, indent)
             else:
-                pvalue=__listHelperToList(pvalue)
+                if isinstance(pvalue,(GaudiConfig2.semantics._ListHelper,GaudiConfig2.semantics._DictHelper)):
+                    pvalue=pvalue.data
+
                 if pname not in alreadySetProperties:
-                    continue
-                if alreadySetProperties[pname] != pvalue:
+                    _log.info("{}Adding property: {} for {}".format(indent, pname, newConf2Instance.getName() ))
+                    setattr(existingConfigurableInstance, pname, pvalue)
+                elif alreadySetProperties[pname] != pvalue:
                     _log.info("{}Merging property: {} for {}".format(indent, pname, newConf2Instance.getName() ))
                     # create surrogate
                     clone = newConf2Instance.getInstance("Clone")
@@ -971,7 +999,7 @@ def conf2toConfigurable( comp, indent="" ):
         _log.debug( "{}Pre-existing configurable {} was found, checking if has the same properties".format( indent, comp.getName() ) )
         __areSettingsSame( existingConfigurable, comp )
         _log.debug( "{}Pre-existing configurable was found to have the same properties".format( indent, comp.name ) )
-        instance = existingConfigurable
+        instance = existingConfigurable if not suppressDupes else None
     else: # create new configurable
         _log.debug( "{}Creating component configurable {}".format( indent, comp.getFullJobOptName() ) )
         configurableClass = __findConfigurableClass( comp.getFullJobOptName().split( "/" )[0] )
@@ -1004,6 +1032,13 @@ def appendCAtoAthena(ca):
 
 
     from AthenaCommon.AppMgr import ServiceMgr,ToolSvc,theApp,athCondSeq,athOutSeq,athAlgSeq,topSequence
+    if len( ca.getPublicTools() ) != 0:
+        _log.info( "Merging public tools" )
+        for comp in ca.getPublicTools():
+            instance = conf2toConfigurable( comp, indent="  " )
+            if instance not in ToolSvc:
+                ToolSvc += instance
+
     if len(ca.getServices()) != 0:
         _log.info( "Merging services" )
         for comp in ca.getServices():
@@ -1018,13 +1053,6 @@ def appendCAtoAthena(ca):
             if instance not in athCondSeq:
                 athCondSeq += instance
 
-    if len( ca.getPublicTools() ) != 0:
-        _log.info( "Merging public tools" )
-        for comp in ca.getPublicTools():
-            instance = conf2toConfigurable( comp, indent="  " )
-            if instance not in ToolSvc:
-                ToolSvc += instance
-
     if len( ca.getAppProps() ) != 0:
         _log.info( "Merging ApplicationMgr properties" )
         for (propName, propValue) in six.iteritems(ca.getAppProps()):
@@ -1066,8 +1094,10 @@ def appendCAtoAthena(ca):
             if el.__class__.__name__ == "AthSequencer":
                 __mergeSequences( sequence, el, __indent( indent ) )
             elif el.getGaudiType() == "Algorithm":
-                sequence += conf2toConfigurable( el, indent=__indent( indent ) )
-                _log.info( "{}Algorithm {} and added to the sequence {}".format( __indent( indent ),  el.getFullJobOptName(), sequence.name() ) )
+                toadd = conf2toConfigurable( el, indent=__indent( indent ), suppressDupes=True)
+                if toadd is not None:
+                    sequence += toadd
+                    _log.info( "{}Algorithm {} and added to the sequence {}".format( __indent( indent ),  el.getFullJobOptName(), sequence.name() ) )
 
 
     preconfigured = [athCondSeq,athOutSeq,athAlgSeq,topSequence]
diff --git a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py
index 86384e7caebc02d433a13072f033a991bc15a3a7..62b3f0ac25245fb5574f2d693ab0b2667337fb4e 100644
--- a/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py
+++ b/Control/AthenaMonitoring/python/BadLBFilterToolConfig.py
@@ -66,7 +66,7 @@ def BadLBFilterToolCfg(inputFlags,name, defects, alwaysReturnTrue=False, ignoreR
 
     sgkey = 'DQBadLBFilterAlgResult_%s' % name
     #Schedule required cond-algo
-    result.merge(BadLBFilterAlgCfg(inputFlags,name,defects,sgkey,ignoreRecoverable, origDbTag))
+    result.merge(BadLBFilterAlgCfg(inputFlags,name+'_Alg',defects,sgkey,ignoreRecoverable, origDbTag))
 
     monFilterTool=CompFactory.DQBadLBFilterTool(name,alwaysReturnTrue=alwaysReturnTrue,
                                                 ReadKey= sgkey)
diff --git a/Control/AthenaMonitoring/python/DQMonFlags.py b/Control/AthenaMonitoring/python/DQMonFlags.py
index e624702ee23d8125eb9ba4c5659a2bc8a2aa8d00..8b733d2b926f1e991fe45aace3d64c36ee24fdd7 100644
--- a/Control/AthenaMonitoring/python/DQMonFlags.py
+++ b/Control/AthenaMonitoring/python/DQMonFlags.py
@@ -227,7 +227,7 @@ class doAFPMon(JobProperty):
     """Switch for AFP monitoring"""
     statusOn=True
     allowedTypes=['bool']
-    StoredValue=False
+    StoredValue=True
 list+=[doAFPMon]
 
 class doHIMon(JobProperty):
@@ -414,6 +414,13 @@ class specialCleaningConfiguration(JobProperty):
     StoredValue={}
 list+=[specialCleaningConfiguration]
 
+class doNewMonitoring(JobProperty):
+    """ Global switch for monitoring """
+    statusOn=True
+    allowedTypes=['bool']
+    StoredValue=False
+list+=[doNewMonitoring]
+
 ##-----------------------------------------------------------------------------
 ## 2nd step
 ## Definition of the DQMon flag container
diff --git a/Control/AthenaMonitoring/python/TriggerInterface.py b/Control/AthenaMonitoring/python/TriggerInterface.py
index 83848acfbb52624fe1bbfb92cf1e3214ccffd975..fd3f07f7602a446944dbe3860840054998e8a7bf 100644
--- a/Control/AthenaMonitoring/python/TriggerInterface.py
+++ b/Control/AthenaMonitoring/python/TriggerInterface.py
@@ -18,8 +18,7 @@ def getTrigDecisionTool(flags):
     rv = ComponentAccumulator()
 
     if flags.DQ.isReallyOldStyle:
-        from AthenaCommon.AppMgr import ToolSvc
-        rv.addPublicTool(ToolSvc.TrigDecisionTool)
+        rv.addPublicTool(CompFactory.Trig.TrigDecisionTool('TrigDecisionTool'))
         getTrigDecisionTool.rv = rv
         return getTrigDecisionTool.rv
 
@@ -29,7 +28,12 @@ def getTrigDecisionTool(flags):
     tdt = CompFactory.Trig.TrigDecisionTool('TrigDecisionTool')
     tdt.TrigConfigSvc = cfgsvc
 
-    tdt.NavigationFormat = "TrigComposite" if 'HLTNav_Summary' in flags.Input.Collections else "TriggerElement"
+    if not flags.Input.isMC and flags.Input.Format == 'BS' and min(flags.Input.RunNumber) <= 380000:
+        # need to work through exact details here
+        # tdt.UseOldEventInfoDecisionFormat = True
+        tdt.NavigationFormat = "TrigComposite"
+    else:
+        tdt.NavigationFormat = "TrigComposite" if 'HLTNav_Summary' in flags.Input.Collections else "TriggerElement"
     rv.addPublicTool(tdt)
     # Other valid option of NavigationFormat is "TriggerElement" for Run 2 navigation. 
     # This option to be removed and "TrigComposite" the only valid choice once a R2->R3 converter is put in place. 
diff --git a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
index 38ef6113f109a5f4602102b778d412fbb1d9c58f..dfb1421e91687d48958a416b526e9f08206f5661 100644
--- a/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
+++ b/Control/AthenaMonitoring/share/DQMonFlagsConfig_jobOptions.py
@@ -17,12 +17,6 @@ if not 'rec' in dir():
 
 from RecExConfig.RecAlgsFlags import recAlgs
 
-if rec.doTrigger() == False:
-   DQMonFlags.useTrigger=False     # steers trigger-awareness
-   DQMonFlags.doLVL1CaloMon=False
-   DQMonFlags.doCTPMon=False
-   DQMonFlags.doHLTMon=False
-
 # Set the data type based on beamType/HI flag
 if globalflags.DataSource.get_Value() == 'geant4':
    DQMonFlags.monManDataType = 'monteCarlo'
@@ -71,6 +65,13 @@ elif DQMonFlags.monType=='BSall':
 else:
    local_logger.warning("invalid DQMonFlags.monType: %s, using default monManEnvironment", DQMonFlags.monType())
 
+# the meaning of this flag has changed in MT
+if rec.doTrigger() == False and not (TriggerFlags.doMT() and DQMonFlags.monManEnvironment=='tier0ESD'):
+   DQMonFlags.useTrigger=False     # steers trigger-awareness
+   DQMonFlags.doLVL1CaloMon=False
+   DQMonFlags.doCTPMon=False
+   DQMonFlags.doHLTMon=False
+
 if not DQMonFlags.doMonitoring():
    local_logger.info("monitoring globally switched off")
    DQMonFlags.doGlobalMon=False
@@ -104,53 +105,54 @@ if not DQMonFlags.doMonitoring():
 else:
    local_logger.info("monitoring environment set to %s", DQMonFlags.monManEnvironment())
 
-   # AOD monitoring
-   if DQMonFlags.monManEnvironment == 'AOD':
-      DQMonFlags.histogramFile='MonitorAOD.root'
-      DQMonFlags.doCaloMon=False
-      DQMonFlags.doLArMon=False
-      DQMonFlags.doTileMon=False
-#      DQMonFlags.doJetMon=False
-      # ??
-      DQMonFlags.doCTPMon=False
-      DQMonFlags.doPixelMon=False
-      DQMonFlags.doSCTMon=False
-      DQMonFlags.doTRTMon=False
-      DQMonFlags.doTRTElectronMon=False
-      DQMonFlags.doInDetGlobalMon=False
-      DQMonFlags.doInDetAlignMon=False
+   # new-style monitoring drives this internally so skip this section
+   if not DQMonFlags.doNewMonitoring:
 
-      DQMonFlags.doGlobalMon=False
-      DQMonFlags.doLVL1CaloMon=False
-      DQMonFlags.doHLTMon=False
-      DQMonFlags.doEgammaMon=False
-      DQMonFlags.doMuonRawMon=False
-      DQMonFlags.doLucidMon=False
+      # AOD monitoring
+      if DQMonFlags.monManEnvironment == 'AOD':
+         DQMonFlags.histogramFile='MonitorAOD.root'
+         DQMonFlags.doCaloMon=False
+         DQMonFlags.doLArMon=False
+         DQMonFlags.doTileMon=False
+         DQMonFlags.doCTPMon=False
+         DQMonFlags.doPixelMon=False
+         DQMonFlags.doSCTMon=False
+         DQMonFlags.doTRTMon=False
+         DQMonFlags.doTRTElectronMon=False
+         DQMonFlags.doInDetGlobalMon=False
+         DQMonFlags.doInDetAlignMon=False
 
-   # ESD monitoring: switch off DQ monitoring packages which are not yet migrated:
-   elif DQMonFlags.monManEnvironment == 'tier0ESD':
-      DQMonFlags.histogramFile='MonitorESD.root'
-      DQMonFlags.doCTPMon=False
-      DQMonFlags.doPixelMon=False
-      DQMonFlags.doSCTMon=False
-      DQMonFlags.doTRTMon=False
-      DQMonFlags.doTRTElectronMon=False
-      DQMonFlags.doInDetGlobalMon=False
-      DQMonFlags.doInDetAlignMon=False
-   # ESD monitoring: packages which use only ESD: disable when running over BS
-   elif DQMonFlags.monManEnvironment == 'tier0Raw':
-      DQMonFlags.doInDetPerfMon=False
-      DQMonFlags.doMissingEtMon=False
-      DQMonFlags.doTauMon=False
-      DQMonFlags.doMuonTrackMon=False
-      DQMonFlags.doMuonAlignMon=False
-      DQMonFlags.doMuonPhysicsMon=False
-      DQMonFlags.doMuonSegmentMon=False
-      DQMonFlags.doMuonTrkPhysMon=False
-      DQMonFlags.doMuonCombinedMon=False
-      DQMonFlags.doLucidMon=False
-      DQMonFlags.doJetTagMon=False
-      DQMonFlags.doJetMon=False
+         DQMonFlags.doGlobalMon=False
+         DQMonFlags.doLVL1CaloMon=False
+         DQMonFlags.doHLTMon=False
+         DQMonFlags.doEgammaMon=False
+         DQMonFlags.doMuonRawMon=False
+         DQMonFlags.doLucidMon=False
+
+      # ESD monitoring: switch off DQ monitoring packages which are not yet migrated:
+      elif DQMonFlags.monManEnvironment == 'tier0ESD':
+         DQMonFlags.histogramFile='MonitorESD.root'
+         DQMonFlags.doCTPMon=False
+         DQMonFlags.doPixelMon=False
+         DQMonFlags.doSCTMon=False
+         DQMonFlags.doTRTMon=False
+         DQMonFlags.doTRTElectronMon=False
+         DQMonFlags.doInDetGlobalMon=False
+         DQMonFlags.doInDetAlignMon=False
+      # ESD monitoring: packages which use only ESD: disable when running over BS
+      elif DQMonFlags.monManEnvironment == 'tier0Raw':
+         DQMonFlags.doInDetPerfMon=False
+         DQMonFlags.doMissingEtMon=False
+         DQMonFlags.doTauMon=False
+         DQMonFlags.doMuonTrackMon=False
+         DQMonFlags.doMuonAlignMon=False
+         DQMonFlags.doMuonPhysicsMon=False
+         DQMonFlags.doMuonSegmentMon=False
+         DQMonFlags.doMuonTrkPhysMon=False
+         DQMonFlags.doMuonCombinedMon=False
+         DQMonFlags.doLucidMon=False
+         DQMonFlags.doJetTagMon=False
+         DQMonFlags.doJetMon=False
       
    # switch off monitoring if reco is off during BS reading
    if rec.readRDO() and not 'DetFlags' in dir():
@@ -246,9 +248,9 @@ if (not rec.doJetMissingETTag() or (rec.readRDO() and not jobproperties.JetRecFl
 if (not rec.doTau()):
    DQMonFlags.doTauMon=False
 
-# covered now by doJetMissingETTag
-# if (not recAlgs.doMissingET()):
-#    DQMonFlags.doMissingEtMon=False
+if not rec.doAFP() or DQMonFlags.monManDataType == 'monteCarlo':
+   DQMonFlags.doAFPMon=False
+
 
 #
 # Stream Aware Monitoring
diff --git a/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py b/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py
index 2ba251977e06a4534be3d961f030533fc9c2986a..83bcd2cbffa8cd1dcec8827aede9982b5510c5e9 100644
--- a/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py
+++ b/Control/AthenaMonitoring/share/DataQualityInit_jobOptions.py
@@ -11,7 +11,7 @@ try:
 except Exception:
    treatException("Could not load AthenaMonitoring/DQMonFlagsConfig_jobOptions.py")
 
-if DQMonFlags.doMonitoring(): 
+if DQMonFlags.doMonitoring() and not DQMonFlags.doNewMonitoring():
    if DQMonFlags.useTrigger():
       # trigger decision tool
       try:
diff --git a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
index e26b895994479194d2c03cdaf76cf79b916e7810..fababdb80e0ae6fe17a8818461bce12acbb8cc90 100644
--- a/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
+++ b/Control/AthenaMonitoring/share/DataQualitySteering_jobOptions.py
@@ -13,331 +13,371 @@ TRTELEMON=False
 local_logger = logging.getLogger('DataQualitySteering_jobOptions')
 
 if DQMonFlags.doMonitoring():
-   if DQMonFlags.useTrigger():
-      if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()):
-         local_logger.debug("trigger decision tool not found, including it now")
-         include("AthenaMonitoring/TrigDecTool_jobOptions.py")
-
-
-   # don't set up lumi access if in MC or enableLumiAccess == False
-   if globalflags.DataSource.get_Value() != 'geant4' and DQMonFlags.enableLumiAccess():
-      if athenaCommonFlags.isOnline:
-         local_logger.debug("luminosity tool not found, importing online version")
-         from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
-         LuminosityCondAlgOnlineDefault()
-      else:
-         local_logger.debug("luminosity tool not found, importing offline version")
-         from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault 
-         LuminosityCondAlgDefault()
-
-      from LumiBlockComps.LBDurationCondAlgDefault import LBDurationCondAlgDefault 
-      LBDurationCondAlgDefault()
-
-      from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault 
-      TrigLiveFractionCondAlgDefault()
-
-   from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool
-   from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
-
-   #---------------------------#
-   # Inner detector monitoring #
-   #---------------------------#
-   if DQMonFlags.doPixelMon() or DQMonFlags.doSCTMon() or DQMonFlags.doTRTMon() or \
-         DQMonFlags.doInDetGlobalMon() or DQMonFlags.doInDetAlignMon():
-      try:
-         include("InDetRecExample/InDetMonitoring.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up inner detector monitoring")
-
-   #----------------------------#
-   # Global combined monitoring #
-   #----------------------------#
-   if DQMonFlags.doGlobalMon():
-      try:
-         include("DataQualityTools/DataQualityMon_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up global monitoring")
-   
-   #--------------------#
-   # Trigger monitoring #
-   #--------------------#
-   if DQMonFlags.doLVL1CaloMon():
-      try:
-         include("TrigT1CaloMonitoring/TrigT1CaloMonitoring_forRecExCommission.py")
-         include("TrigT1Monitoring/TrigT1Monitoring_forRecExCommission.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up L1 Calo monitoring")
-
-   if DQMonFlags.doCTPMon():
-      try:
-         include("TrigT1CTMonitoring/TrigT1CTMonitoringJobOptions_forRecExCommission.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up central trigger monitoring")
-
-   if DQMonFlags.doHLTMon():
-      try:
-         include("TrigHLTMonitoring/HLTMonitoring_topOptions.py")
-         HLTMonMan = topSequence.HLTMonManager
-         HLTMonMan.FileKey = DQMonFlags.monManFileKey()  
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up HLT monitoring")
-
-   #--------------#
-   # TRT electron #
-   #--------------#
-   if DQMonFlags.doTRTElectronMon() and TRTELEMON:
-      try:
-         include("InDetPerformanceMonitoring/TRT_Monitoring_RecExCommonAddOn_jobOptions.py") 
-         TRTElMonMan = topSequence.TRTElectronMonManager
-         TRTElMonMan.FileKey     = DQMonFlags.monManFileKey()
-         TRTElMonMan.Environment = DQMonFlags.monManEnvironment()
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up TRT electron monitoring")
-
-   #----------------#
-   # ID performance #
-   #----------------#
-   if DQMonFlags.doInDetPerfMon():
-      try:
-         include("InDetPerformanceMonitoring/IDPerfMon_jobOptions.py")
-         IDPerfMonManager = topSequence.IDPerfMonManager
-         IDPerfMonManager.FileKey          = DQMonFlags.monManFileKey()
-         IDPerfMonManager.Environment      = DQMonFlags.monManEnvironment()
-         include("InDetDiMuonMonitoring/InDetDiMuMon_jobOptions.py")
-         InDetDiMuMonManager = topSequence.InDetDiMuMonManager
-         InDetDiMuMonManager.FileKey          = DQMonFlags.monManFileKey()
-         InDetDiMuMonManager.Environment      = DQMonFlags.monManEnvironment()
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up InDetPerformance/InDetDiMuon monitoring")
-
-   #--------------------#
-   # TileCal monitoring #
-   #--------------------#
-   if DQMonFlags.doTileMon():
-      try:
-      	 include("TileMonitoring/TileMon_jobOptions.py")
+   if not DQMonFlags.doNewMonitoring():
+      if DQMonFlags.useTrigger():
+         if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool()):
+            local_logger.debug("trigger decision tool not found, including it now")
+            include("AthenaMonitoring/TrigDecTool_jobOptions.py")
+
+
+      # don't set up lumi access if in MC or enableLumiAccess == False
+      if globalflags.DataSource.get_Value() != 'geant4' and DQMonFlags.enableLumiAccess():
+         if athenaCommonFlags.isOnline:
+            local_logger.debug("luminosity tool not found, importing online version")
+            from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgOnlineDefault
+            LuminosityCondAlgOnlineDefault()
+         else:
+            local_logger.debug("luminosity tool not found, importing offline version")
+            from LumiBlockComps.LuminosityCondAlgDefault import LuminosityCondAlgDefault 
+            LuminosityCondAlgDefault()
+
+         from LumiBlockComps.LBDurationCondAlgDefault import LBDurationCondAlgDefault 
+         LBDurationCondAlgDefault()
+
+         from LumiBlockComps.TrigLiveFractionCondAlgDefault import TrigLiveFractionCondAlgDefault 
+         TrigLiveFractionCondAlgDefault()
+
+      from AthenaMonitoring.AtlasReadyFilterTool import GetAtlasReadyFilterTool
+      from AthenaMonitoring.FilledBunchFilterTool import GetFilledBunchFilterTool
+
+      #---------------------------#
+      # Inner detector monitoring #
+      #---------------------------#
+      if DQMonFlags.doPixelMon() or DQMonFlags.doSCTMon() or DQMonFlags.doTRTMon() or \
+            DQMonFlags.doInDetGlobalMon() or DQMonFlags.doInDetAlignMon():
+         try:
+            include("InDetRecExample/InDetMonitoring.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up inner detector monitoring")
+
+      #----------------------------#
+      # Global combined monitoring #
+      #----------------------------#
+      if DQMonFlags.doGlobalMon():
+         try:
+            include("DataQualityTools/DataQualityMon_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up global monitoring")
+      
+      #--------------------#
+      # Trigger monitoring #
+      #--------------------#
+      if DQMonFlags.doLVL1CaloMon():
+         try:
+            include("TrigT1CaloMonitoring/TrigT1CaloMonitoring_forRecExCommission.py")
+            include("TrigT1Monitoring/TrigT1Monitoring_forRecExCommission.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up L1 Calo monitoring")
+
+      if DQMonFlags.doCTPMon():
+         try:
+            include("TrigT1CTMonitoring/TrigT1CTMonitoringJobOptions_forRecExCommission.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up central trigger monitoring")
+
+      if DQMonFlags.doHLTMon():
+         try:
+            include("TrigHLTMonitoring/HLTMonitoring_topOptions.py")
+            HLTMonMan = topSequence.HLTMonManager
+            HLTMonMan.FileKey = DQMonFlags.monManFileKey()  
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up HLT monitoring")
+
+      #--------------#
+      # TRT electron #
+      #--------------#
+      if DQMonFlags.doTRTElectronMon() and TRTELEMON:
+         try:
+            include("InDetPerformanceMonitoring/TRT_Monitoring_RecExCommonAddOn_jobOptions.py") 
+            TRTElMonMan = topSequence.TRTElectronMonManager
+            TRTElMonMan.FileKey     = DQMonFlags.monManFileKey()
+            TRTElMonMan.Environment = DQMonFlags.monManEnvironment()
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up TRT electron monitoring")
+
+      #----------------#
+      # ID performance #
+      #----------------#
+      if DQMonFlags.doInDetPerfMon():
+         try:
+            include("InDetPerformanceMonitoring/IDPerfMon_jobOptions.py")
+            IDPerfMonManager = topSequence.IDPerfMonManager
+            IDPerfMonManager.FileKey          = DQMonFlags.monManFileKey()
+            IDPerfMonManager.Environment      = DQMonFlags.monManEnvironment()
+            include("InDetDiMuonMonitoring/InDetDiMuMon_jobOptions.py")
+            InDetDiMuMonManager = topSequence.InDetDiMuMonManager
+            InDetDiMuMonManager.FileKey          = DQMonFlags.monManFileKey()
+            InDetDiMuMonManager.Environment      = DQMonFlags.monManEnvironment()
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up InDetPerformance/InDetDiMuon monitoring")
+
+      #--------------------#
+      # TileCal monitoring #
+      #--------------------#
+      if DQMonFlags.doTileMon():
+         try:
+            include("TileMonitoring/TileMon_jobOptions.py")
+      
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Tile monitoring")
+
+      #------------------#
+      # LAr monitoring   #
+      #------------------#
+      if DQMonFlags.doLArMon():
+         try:
+            LArMon = AthenaMonManager(name="LArMonManager",
+                           FileKey             = DQMonFlags.monManFileKey(),
+                           Environment         = DQMonFlags.monManEnvironment(),
+                           ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(),
+                           DataType            = DQMonFlags.monManDataType())
+            topSequence += LArMon
+            include("LArMonTools/LArAllMonitoring_jobOptions.py")
+            include("LArMonitoring/LArMonitoring_jobOption.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up LAr monitoring")
+
+      #-------------------------------------------------------------------------#
+      # Calo monitoring - cells and clusters independent of LAr or Tile origin  #
+      #-------------------------------------------------------------------------#
+      if DQMonFlags.doCaloMon():
+         try:
+            include("CaloMonitoring/CaloAllMonitoring_jobOptions.py")
+            include("CaloMonitoring/CaloNewMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Calo monitoring")
+
+      #-------------------#
+      # Egamma monitoring #
+      #-------------------#
+      if DQMonFlags.doEgammaMon():
+         try:
+            include("egammaPerformance/egammaMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Egamma monitoring")
+
+      #----------------#
+      # MET monitoring #
+      #----------------#
+      if DQMonFlags.doMissingEtMon():
+         try:
+            include("MissingETMonitoring/MissingET_Monitoring.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up ETmiss monitoring")
+
+      #----------------#
+      # Jet monitoring #
+      #----------------#
+      if DQMonFlags.doJetMon():
+         try:
+            include("JetMonitoring/JetMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Jet monitoring")
+
+      #----------------#
+      # Tau monitoring #
+      #----------------#
+      if DQMonFlags.doTauMon():
+         try:
+            include("tauMonitoring/tauMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Tau monitoring")
+
+      #--------------------#
+      # Jet tag monitoring #
+      #--------------------#
+      if DQMonFlags.doJetTagMon():
+         try:
+            include("JetTagMonitoring/JetTagMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up jet-tag monitoring")
+
+      #-----------------------------#
+      # MuonSpectrometer monitoring #
+      #-----------------------------#
+      if (DQMonFlags.doMuonRawMon() or DQMonFlags.doMuonSegmentMon()
+         or DQMonFlags.doMuonTrackMon() or DQMonFlags.doMuonAlignMon()
+         or DQMonFlags.doMuonTrkPhysMon() or DQMonFlags.doMuonPhysicsMon()):
+         try:
+            include("MuonDQAMonitoring/MuonDetMonitoring.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up Muon detector monitoring")
    
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up Tile monitoring")
-
-   #------------------#
-   # LAr monitoring   #
-   #------------------#
-   if DQMonFlags.doLArMon():
-      try:
-         LArMon = AthenaMonManager(name="LArMonManager",
-                          FileKey             = DQMonFlags.monManFileKey(),
-                          Environment         = DQMonFlags.monManEnvironment(),
-                          ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup(),
-                          DataType            = DQMonFlags.monManDataType())
-         topSequence += LArMon
-         include("LArMonTools/LArAllMonitoring_jobOptions.py")
-         include("LArMonitoring/LArMonitoring_jobOption.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up LAr monitoring")
-
-   #-------------------------------------------------------------------------#
-   # Calo monitoring - cells and clusters independent of LAr or Tile origin  #
-   #-------------------------------------------------------------------------#
-   if DQMonFlags.doCaloMon():
-      try:
-         include("CaloMonitoring/CaloAllMonitoring_jobOptions.py")
-         include("CaloMonitoring/CaloNewMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up Calo monitoring")
-
-   #-------------------#
-   # Egamma monitoring #
-   #-------------------#
-   if DQMonFlags.doEgammaMon():
-      try:
-         include("egammaPerformance/egammaMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up Egamma monitoring")
-
-   #----------------#
-   # MET monitoring #
-   #----------------#
-   if DQMonFlags.doMissingEtMon():
-      try:
-         include("MissingETMonitoring/MissingET_Monitoring.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up ETmiss monitoring")
-
-   #----------------#
-   # Jet monitoring #
-   #----------------#
-   if DQMonFlags.doJetMon():
-      try:
-         include("JetMonitoring/JetMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up Jet monitoring")
-
-   #----------------#
-   # Tau monitoring #
-   #----------------#
-   if DQMonFlags.doTauMon():
-      try:
-         include("tauMonitoring/tauMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up Tau monitoring")
-
-   #--------------------#
-   # Jet tag monitoring #
-   #--------------------#
-   if DQMonFlags.doJetTagMon():
-      try:
-         include("JetTagMonitoring/JetTagMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up jet-tag monitoring")
-
-   #-----------------------------#
-   # MuonSpectrometer monitoring #
-   #-----------------------------#
-   if (DQMonFlags.doMuonRawMon() or DQMonFlags.doMuonSegmentMon()
-       or DQMonFlags.doMuonTrackMon() or DQMonFlags.doMuonAlignMon()
-       or DQMonFlags.doMuonTrkPhysMon() or DQMonFlags.doMuonPhysicsMon()):
-     try:
-        include("MuonDQAMonitoring/MuonDetMonitoring.py")
-     except Exception:
-        treatException("DataQualitySteering_jobOptions.py: exception when setting up Muon detector monitoring")
-  
-   #------------------#
-   # LUCID monitoring #
-   #------------------#
-   if DQMonFlags.doLucidMon():
-      try:
-         include("LUCID_Monitoring/LUCIDMon_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up LUCID monitoring")
-
-   #------------------#                                                                                                                       
-   # AFP monitoring   #                                                                                                                       
-   #------------------#                                                                                                                       
-   if DQMonFlags.doAFPMon():
-      try:
-         include("AFP_Monitoring/AFPMonitoring_jobOptions.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up AFP monitoring")
-
-
-   #---------------------#
-   # HeavyIon monitoring #
-   #---------------------#
-   if DQMonFlags.doHIMon():
-      try:
-         include("HIMonitoring/HIMonitoringSteering_jo.py")
-      except Exception:
-         treatException("DataQualitySteering_jobOptions.py: exception when setting up HI monitoring")
-
-   #------------------------#
-   # Trigger chain steering #
-   #------------------------#
-   trigMap = DQMonFlags.triggerChainMap.get_Value()
-   for toolName, trigChain in six.iteritems(trigMap):
-      local_logger.debug("Applying trigger %s to %s", trigChain, toolName)
-      if hasattr(ToolSvc,toolName):
-         tool = getattr(ToolSvc,toolName)
-         tool.TriggerChain = trigChain
-      else:
-         local_logger.debug("%s is not found in ToolSvc. Cannot set trigger chain!", toolName)
-
-   #--------------------------#
-   # Post-setup configuration #
-   #--------------------------#
-   # force conditions update because the converter can't do it
-   if DQMonFlags.monManEnvironment in ('tier0ESD', 'AOD'):
-      from AthenaCommon.AlgSequence import AthSequencer
-      from AthenaMonitoring.AthenaMonitoringConf import ForceIDConditionsAlg
-      asq = AthSequencer("AthBeginSeq") 
-      asq += [ForceIDConditionsAlg()]
-
-   if rec.triggerStream()=='express':
-      include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py")
-   local_logger.debug('DQ Post-Setup Configuration')
-   import re
-   from AthenaMonitoring.EventFlagFilterTool import GetEventFlagFilterTool
-
-   # now the DQ tools are private, extract them from the set of monitoring algorithms
-   toolset = set()
-   from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
-   for _ in topSequence:
-      if isinstance(_, AthenaMonManager):
-         toolset.update(_.AthenaMonTools)
-
-         # in MT the initialization can be in random order ... force all managers to have common setup
-         _.FileKey             = DQMonFlags.monManFileKey()
-         _.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
-         _.DataType            = DQMonFlags.monManDataType()
-         _.Environment         = DQMonFlags.monManEnvironment()
-         _.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval()
-         _.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval()
-         _.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval()
-         _.ManualRunLBSetup    = DQMonFlags.monManManualRunLBSetup()
-         _.Run                 = DQMonFlags.monManRun()
-         _.LumiBlock           = DQMonFlags.monManLumiBlock()
-
-   for tool in toolset:
-      # stop lumi access if we're in MC or enableLumiAccess == False
-      if 'EnableLumi' in dir(tool):
-         if globalflags.DataSource.get_Value() == 'geant4' or not DQMonFlags.enableLumiAccess():
-            tool.EnableLumi = False
+      #------------------#
+      # LUCID monitoring #
+      #------------------#
+      if DQMonFlags.doLucidMon():
+         try:
+            include("LUCID_Monitoring/LUCIDMon_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up LUCID monitoring")
+
+      #------------------#                                                                                                                       
+      # AFP monitoring   #                                                                                                                       
+      #------------------#                                                                                                                       
+      if DQMonFlags.doAFPMon():
+         try:
+            include("AFP_Monitoring/AFPMonitoring_jobOptions.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up AFP monitoring")
+
+
+      #---------------------#
+      # HeavyIon monitoring #
+      #---------------------#
+      if DQMonFlags.doHIMon():
+         try:
+            include("HIMonitoring/HIMonitoringSteering_jo.py")
+         except Exception:
+            treatException("DataQualitySteering_jobOptions.py: exception when setting up HI monitoring")
+
+      #------------------------#
+      # Trigger chain steering #
+      #------------------------#
+      trigMap = DQMonFlags.triggerChainMap.get_Value()
+      for toolName, trigChain in six.iteritems(trigMap):
+         local_logger.debug("Applying trigger %s to %s", trigChain, toolName)
+         if hasattr(ToolSvc,toolName):
+            tool = getattr(ToolSvc,toolName)
+            tool.TriggerChain = trigChain
          else:
-            tool.EnableLumi = True
-      # if we have the FilterTools attribute, assume this is in fact a
-      # monitoring tool
-      if hasattr(tool, 'FilterTools'):
-         # if express: use ATLAS Ready filter
-         local_logger.debug('Setting up filters for tool %s', tool)
-         if rec.triggerStream()=='express':
-            local_logger.info('Stream is express and we will add ready tool for %s', tool)
-            tool.FilterTools += [GetAtlasReadyFilterTool()]
-         # if requested: configure a generic event cleaning tool
-         if not athenaCommonFlags.isOnline() and any(re.match(_, tool.name()) for _ in DQMonFlags.includeInCleaning()):
-            if tool.name() in DQMonFlags.specialCleaningConfiguration():
-               config_ = DQMonFlags.specialCleaningConfiguration()[tool.name()].copy()
-               for _ in config_:
-                  try:
-                     config_[_] = bool(config_[_])
-                  except:
-                     local_logger.error('Unable to enact special event cleaning configuration for tool %s; cannot cast %s=%s to bool', tool.name(), _, config_[_])
-               config_['name'] = 'DQEventFlagFilterTool_%s' % tool.name()
-               tool.FilterTools += [GetEventFlagFilterTool(**config_)]
-               del config_
-               local_logger.info('Configurating special event cleaning for tool %s', tool)
+            local_logger.debug("%s is not found in ToolSvc. Cannot set trigger chain!", toolName)
+
+      #--------------------------#
+      # Post-setup configuration #
+      #--------------------------#
+      # force conditions update because the converter can't do it
+      if DQMonFlags.monManEnvironment in ('tier0ESD', 'AOD'):
+         from AthenaCommon.AlgSequence import AthSequencer
+         from AthenaMonitoring.AthenaMonitoringConf import ForceIDConditionsAlg
+         asq = AthSequencer("AthBeginSeq") 
+         asq += [ForceIDConditionsAlg()]
+
+      if rec.triggerStream()=='express':
+         include("AthenaMonitoring/AtlasReadyFilterTool_jobOptions.py")
+      local_logger.debug('DQ Post-Setup Configuration')
+      import re
+      from AthenaMonitoring.EventFlagFilterTool import GetEventFlagFilterTool
+
+      # now the DQ tools are private, extract them from the set of monitoring algorithms
+      toolset = set()
+      from AthenaMonitoring.AthenaMonitoringConf import AthenaMonManager
+      for _ in topSequence:
+         if isinstance(_, AthenaMonManager):
+            toolset.update(_.AthenaMonTools)
+
+            # in MT the initialization can be in random order ... force all managers to have common setup
+            _.FileKey             = DQMonFlags.monManFileKey()
+            _.ManualDataTypeSetup = DQMonFlags.monManManualDataTypeSetup()
+            _.DataType            = DQMonFlags.monManDataType()
+            _.Environment         = DQMonFlags.monManEnvironment()
+            _.LBsInLowStatInterval = DQMonFlags.monManLBsInLowStatInterval()
+            _.LBsInMediumStatInterval = DQMonFlags.monManLBsInMediumStatInterval()
+            _.LBsInHighStatInterval = DQMonFlags.monManLBsInHighStatInterval()
+            _.ManualRunLBSetup    = DQMonFlags.monManManualRunLBSetup()
+            _.Run                 = DQMonFlags.monManRun()
+            _.LumiBlock           = DQMonFlags.monManLumiBlock()
+
+      for tool in toolset:
+         # stop lumi access if we're in MC or enableLumiAccess == False
+         if 'EnableLumi' in dir(tool):
+            if globalflags.DataSource.get_Value() == 'geant4' or not DQMonFlags.enableLumiAccess():
+               tool.EnableLumi = False
             else:
-               local_logger.info('Configuring generic event cleaning for tool %s', tool)
-               tool.FilterTools += [GetEventFlagFilterTool('DQEventFlagFilterTool')]
-         else:
-            local_logger.info('NOT configuring event cleaning for tool %s', tool)
-
-         # give all the tools the trigger translator
-         if DQMonFlags.useTrigger():
-            tool.TrigDecisionTool = monTrigDecTool
-            tool.TriggerTranslatorTool = monTrigTransTool
-
-         if DQMonFlags.monToolPostExec():
-            postprocfunc = eval(DQMonFlags.monToolPostExec())
-            local_logger.debug('Applying postexec transform to  ===> %s', tool)
-            postprocfunc(tool)
-            del postprocfunc
-
-   # # set up new-style monitoring with new-style configuration
-   # # only enable this when we understand details better...
-   # local_logger.info('Setting up new-style DQ monitoring')
-   # from AthenaMonitoring.AthenaMonitoringCfg import AthenaMonitoringCfg
-   # from AthenaCommon.Configurable import Configurable
-
-   # _ = Configurable.configurableRun3Behavior
-   # Configurable.configurableRun3Behavior = 1
-   # from AthenaConfiguration.AllConfigFlags import ConfigFlags
-   # ConfigFlags.Input.Files = jobproperties.AthenaCommonFlags.FilesInput()
-   # ConfigFlags.Output.HISTFileName = DQMonFlags.histogramFile()
-   # ConfigFlags.DQ.isReallyOldStyle = True
-   # _2 = AthenaMonitoringCfg(ConfigFlags)
-   # Configurable.configurableRun3Behavior = _
-   # _2.printConfig()
-   # _2.appendToGlobals()
-   # del _, _2
-
-del local_logger
+               tool.EnableLumi = True
+         # if we have the FilterTools attribute, assume this is in fact a
+         # monitoring tool
+         if hasattr(tool, 'FilterTools'):
+            # if express: use ATLAS Ready filter
+            local_logger.debug('Setting up filters for tool %s', tool)
+            if rec.triggerStream()=='express':
+               local_logger.info('Stream is express and we will add ready tool for %s', tool)
+               tool.FilterTools += [GetAtlasReadyFilterTool()]
+            # if requested: configure a generic event cleaning tool
+            if not athenaCommonFlags.isOnline() and any(re.match(_, tool.name()) for _ in DQMonFlags.includeInCleaning()):
+               if tool.name() in DQMonFlags.specialCleaningConfiguration():
+                  config_ = DQMonFlags.specialCleaningConfiguration()[tool.name()].copy()
+                  for _ in config_:
+                     try:
+                        config_[_] = bool(config_[_])
+                     except:
+                        local_logger.error('Unable to enact special event cleaning configuration for tool %s; cannot cast %s=%s to bool', tool.name(), _, config_[_])
+                  config_['name'] = 'DQEventFlagFilterTool_%s' % tool.name()
+                  tool.FilterTools += [GetEventFlagFilterTool(**config_)]
+                  del config_
+                  local_logger.info('Configurating special event cleaning for tool %s', tool)
+               else:
+                  local_logger.info('Configuring generic event cleaning for tool %s', tool)
+                  tool.FilterTools += [GetEventFlagFilterTool('DQEventFlagFilterTool')]
+            else:
+               local_logger.info('NOT configuring event cleaning for tool %s', tool)
+
+            # give all the tools the trigger translator
+            if DQMonFlags.useTrigger():
+               tool.TrigDecisionTool = monTrigDecTool
+               tool.TriggerTranslatorTool = monTrigTransTool
+
+            if DQMonFlags.monToolPostExec():
+               postprocfunc = eval(DQMonFlags.monToolPostExec())
+               local_logger.debug('Applying postexec transform to  ===> %s', tool)
+               postprocfunc(tool)
+               del postprocfunc
+
+   else:
+      local_logger.info("DQ: setting up ConfigFlags")
+      from AthenaConfiguration.AllConfigFlags import ConfigFlags
+      if globalflags.InputFormat() == 'bytestream':
+         ConfigFlags.Input.Files=athenaCommonFlags.BSRDOInput()
+      elif globalflags.InputFormat() == 'pool':
+         ConfigFlags.Input.Files=svcMgr.EventSelector.InputCollections
+
+      ConfigFlags.GeoModel.Align.Dynamic=InDetFlags.useDynamicAlignFolders()
+      ConfigFlags.Detector.GeometryPixel=DetFlags.pixel_on()
+      ConfigFlags.Detector.GeometrySCT=DetFlags.SCT_on()
+      ConfigFlags.Detector.GeometryTRT=DetFlags.TRT_on()
+      ConfigFlags.InDet.usePixelDCS=InDetFlags.usePixelDCS()
+
+      ConfigFlags.Output.HISTFileName=DQMonFlags.histogramFile()
+      ConfigFlags.DQ.FileKey=DQMonFlags.monManFileKey()
+      ConfigFlags.DQ.Environment=DQMonFlags.monManEnvironment()
+      ConfigFlags.DQ.useTrigger=DQMonFlags.useTrigger()
+      ConfigFlags.IOVDb.GlobalTag=globalflags.ConditionsTag()
+      ConfigFlags.DQ.isReallyOldStyle=False
+
+      from AthenaConfiguration import ComponentAccumulator
+      from AthenaMonitoring.AthenaMonitoringCfg import AthenaMonitoringCfg
+      from AthenaMonitoring.DQConfigFlags import allSteeringFlagsOff
+      from AthenaMonitoring import AthenaMonitoringConf
+
+      Steering = ConfigFlags.DQ.Steering
+      Steering.doGlobalMon=DQMonFlags.doGlobalMon()
+      Steering.doLVL1CaloMon=DQMonFlags.doLVL1CaloMon()
+      Steering.doCTPMon=DQMonFlags.doCTPMon()
+      Steering.doHLTMon=DQMonFlags.doHLTMon()
+      Steering.doPixelMon=DQMonFlags.doPixelMon()
+      Steering.doSCTMon=DQMonFlags.doSCTMon()
+      Steering.doTRTMon=DQMonFlags.doTRTMon()
+      Steering.doLArMon=DQMonFlags.doLArMon()
+      Steering.doTileMon=DQMonFlags.doTileMon()
+      Steering.doCaloGlobalMon=DQMonFlags.doCaloMon()
+      Steering.Muon.doRawMon=DQMonFlags.doMuonRawMon()
+      Steering.Muon.doTrackMon=DQMonFlags.doMuonTrackMon()
+      Steering.doMuonMon=(Steering.Muon.doRawMon or Steering.Muon.doTrackMon)
+      Steering.doLucidMon=DQMonFlags.doLucidMon()
+      Steering.doAFPMon=DQMonFlags.doAFPMon()
+      Steering.doHIMon=DQMonFlags.doHIMon()
+      Steering.doEgammaMon=DQMonFlags.doEgammaMon()
+      Steering.doJetMon=DQMonFlags.doJetMon()
+      Steering.doMissingEtMon=DQMonFlags.doMissingEtMon()
+      Steering.doTauMon=DQMonFlags.doTauMon()
+      Steering.doJetTagMon=DQMonFlags.doJetTagMon()
+
+      ConfigFlags.dump()
+      ComponentAccumulator.CAtoGlobalWrapper(AthenaMonitoringCfg, ConfigFlags)
+
+      if len([_ for _ in AthSequencer("AthCondSeq") if _.getName()=="PixelDetectorElementCondAlg"]) > 0:
+         local_logger.info("DQ: force ID conditions loading")
+         asq = AthSequencer("AthBeginSeq")
+         asq += AthenaMonitoringConf.ForceIDConditionsAlg("ForceIDConditionsAlg")
+
+del local_logger
\ No newline at end of file
diff --git a/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py b/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py
index 5d8e8bf5e25a01bc35bdca0039c703ffca073d80..e52c842f309143277e676f0dc0b7259f6fe857b8 100644
--- a/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py
+++ b/Control/AthenaMonitoring/share/TrigDecTool_jobOptions.py
@@ -21,22 +21,19 @@ if DQMonFlags.useTrigger():
          cfg = TriggerConfigGetter()
 
    if not hasattr(ToolSvc, DQMonFlags.nameTrigDecTool().split('/')[-1]):
-      tdt_local_logger.error('DQ Monitoring is being asked to set up the TrigDecisionTool for some reason.  THIS IS A TERRIBLE IDEA AND SHOULD BE CONSIDERED A BUG!')
-      from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-      monTrigDecTool = Trig__TrigDecisionTool(name=DQMonFlags.nameTrigDecTool(),
-                                              OutputLevel=ERROR,
-                                              PublicChainGroups = {"EFTau": "EF_[0-9]?tau.*",
-                                                                   "EFPhoton": "EF_[0-9]?g*",
-                                                                   "EFJets":"EF_J.*",
-                                                                  }
-                                             )
-      ToolSvc += monTrigDecTool
-      # The following should be provided automatically when setting up the tool, but is not
-      # Still needs to be provided by the trigger
-      # When trigger has a standard procedure for this, switch
-      ToolSvc.TrigDecisionTool.TrigConfigSvc = "Trig::TrigConfigSvc/TrigConfigSvc"
-      from TrigEDMConfig.TriggerEDM import EDMLibraries
-      ToolSvc.TrigDecisionTool.Navigation.Dlls = [e for e in  EDMLibraries if 'TPCnv' not in e]
+      if rec.doTrigger():
+         tdt_local_logger.error('DQ Monitoring is being asked to set up the TrigDecisionTool for some reason.  THIS IS A TERRIBLE IDEA AND SHOULD BE CONSIDERED A BUG!')
+      from AthenaMonitoring.TriggerInterface import getTrigDecisionTool
+      from AthenaConfiguration.AllConfigFlags import ConfigFlags
+      if globalflags.InputFormat() == 'bytestream':
+         ConfigFlags.Input.Files=athenaCommonFlags.BSRDOInput()
+      elif globalflags.InputFormat() == 'pool':
+         ConfigFlags.Input.Files=svcMgr.EventSelector.InputCollections
+
+      from AthenaConfiguration import ComponentAccumulator
+      ComponentAccumulator.CAtoGlobalWrapper(getTrigDecisionTool, ConfigFlags)
+
+      monTrigDecTool = getattr(ToolSvc, 'TrigDecisionTool')
    else:
       monTrigDecTool = getattr(ToolSvc, DQMonFlags.nameTrigDecTool().split('/')[-1])
    tdt_local_logger.info('Scheduled monitoring TDT %s', monTrigDecTool)
diff --git a/Database/IOVDbSvc/python/CondDB.py b/Database/IOVDbSvc/python/CondDB.py
index 61aea2f0846ec0348be4622adeaedf564d519bc1..fc854f8f1c8b0b385d1f59127965445611024eb7 100644
--- a/Database/IOVDbSvc/python/CondDB.py
+++ b/Database/IOVDbSvc/python/CondDB.py
@@ -231,7 +231,7 @@ This allows the possibility of later adding a new IOV using IOVSvc::setRange."""
         self.iovdbsvc.Folders+=[folderadd]
 
         if className:
-            key = (className, self.extractFolder(folder))
+            key = [className, self.extractFolder(folder)]
             if key not in condInputLoader.Load:
                 condInputLoader.Load += [ key ]
 
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
index 6d2cddef950c71f2164d46a35345669d813430ac..45a1de73d1b8c7f978cb6000c1f372fcb07f4e36 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/python/PixelConditionsConfig.py
@@ -20,8 +20,8 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
     CondArgs.update(
         UseCalibConditions=True,
         UseDeadmapConditions=True,
-        UseDCSStateConditions=False,
-        UseDCSStatusConditions=False,
+        UseDCSStateConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS),
+        UseDCSStatusConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS),
         UseDCSHVConditions=True,
         UseDCSTemperatureConditions=True,
         UseTDAQConditions=False,
@@ -52,137 +52,138 @@ def PixelConfigCondAlgCfg(flags, name="PixelConfigCondAlg", **kwargs):
             EndcapTimeOffset=[5.0,5.0,5.0],
             DBMTimeOffset=[5.0,5.0,5.0]
         )
-    # Digitization parameters
-    CondArgs.update(
-        BunchSpace=25.0,
-        FEI4BarrelHitDiscConfig=[2]
-    )
 
-    #====================================================================================
-    # Run-dependent SIMULATION(digitization) parameters:
-    #====================================================================================
-    # RUN2 2015/2016
-    CondArgs.update(
-        BarrelToTThreshold2016       = [   -1,    5,    5,    5],
-        FEI3BarrelLatency2016        = [    0,  151,  256,  256],
-        FEI3BarrelHitDuplication2016 = [False,False,False,False],
-        FEI3BarrelSmallHitToT2016    = [   -1,   -1,   -1,   -1],
-        FEI3BarrelTimingSimTune2016  = [   -1, 2015, 2015, 2015],
-        BarrelCrossTalk2016          = [ 0.30, 0.06, 0.06, 0.06],
-        BarrelNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8, 5e-8],
-        BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3],
-        EndcapToTThreshold2016       = [    5,    5,    5],
-        FEI3EndcapLatency2016        = [  256,  256,  256],
-        FEI3EndcapHitDuplication2016 = [False,False,False],
-        FEI3EndcapSmallHitToT2016    = [   -1,   -1,   -1],
-        FEI3EndcapTimingSimTune2016  = [ 2015, 2015, 2015],
-        EndcapCrossTalk2016          = [ 0.06, 0.06, 0.06],
-        EndcapNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
-        EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3],
-        DBMToTThreshold2016       = [   -1,   -1,   -1],
-        DBMCrossTalk2016          = [ 0.06, 0.06, 0.06],
-        DBMNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
-        DBMDisableProbability2016 = [ 9e-3, 9e-3, 9e-3],
-        IBLNoiseShape2016    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
-        BLayerNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
-        PixelNoiseShape2016  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
-        # Layer-2 noise shape                     [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2129, 0.4016, 0.5477, 0.6599, 0.7435, 0.8160, 0.8779, 0.9340, 0.9798, 1.0]
-        # So far, Gaudi::Property does not support 2D vector.
-        #EndcapNoiseShape=[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1748, 0.3409, 0.4760, 0.5850, 0.6754, 0.7538, 0.8264, 0.8962, 0.9655, 1.0],
-        #                  [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1852, 0.3528, 0.4881, 0.5961, 0.6855, 0.7640, 0.8374, 0.9068, 0.9749, 1.0],
-        #                  [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1735, 0.3380, 0.4733, 0.5829, 0.6730, 0.7516, 0.8234, 0.8916, 0.9595, 1.0]]
-    )
-    #====================================================================================
-    # RUN2 2017
-    CondArgs.update(
-        BarrelToTThreshold2017       = [   -1,    5,    5,    5],
-        FEI3BarrelLatency2017        = [    0,  151,  256,  256],
-        FEI3BarrelHitDuplication2017 = [False,False,False,False],
-        FEI3BarrelSmallHitToT2017    = [   -1,   -1,   -1,   -1],
-        FEI3BarrelTimingSimTune2017  = [   -1, 2018, 2018, 2018],
-        BarrelCrossTalk2017          = [ 0.30, 0.06, 0.06, 0.06],
-        BarrelNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8, 5e-8],
-        BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3],
-        EndcapToTThreshold2017       = [    5,    5,    5],
-        FEI3EndcapLatency2017        = [  256,  256,  256],
-        FEI3EndcapHitDuplication2017 = [False,False,False],
-        FEI3EndcapSmallHitToT2017    = [   -1,   -1,   -1],
-        FEI3EndcapTimingSimTune2017  = [ 2018, 2018, 2018],
-        EndcapCrossTalk2017          = [ 0.06, 0.06, 0.06],
-        EndcapNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
-        EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3],
-        DBMToTThreshold2017       = [   -1,   -1,   -1],
-        DBMCrossTalk2017          = [ 0.06, 0.06, 0.06],
-        DBMNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
-        DBMDisableProbability2017 = [ 9e-3, 9e-3, 9e-3],
-        IBLNoiseShape2017    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
-        BLayerNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
-        PixelNoiseShape2017  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
-    )
-    #====================================================================================
-    # RUN2 2018
-    CondArgs.update(
-        BarrelToTThreshold2018       = [   -1,    3,    5,    5],
-        FEI3BarrelLatency2018        = [    0,  151,  256,  256],
-        FEI3BarrelHitDuplication2018 = [False,False,False,False],
-        FEI3BarrelSmallHitToT2018    = [   -1,   -1,   -1,   -1],
-        FEI3BarrelTimingSimTune2018  = [   -1, 2018, 2018, 2018],
-        BarrelCrossTalk2018          = [ 0.30, 0.06, 0.06, 0.06],
-        BarrelNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8, 5e-8],
-        BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3],
-        EndcapToTThreshold2018       = [    5,    5,    5],
-        FEI3EndcapLatency2018        = [  256,  256,  256],
-        FEI3EndcapHitDuplication2018 = [False,False,False],
-        FEI3EndcapSmallHitToT2018    = [   -1,   -1,   -1],
-        FEI3EndcapTimingSimTune2018  = [ 2018, 2018, 2018],
-        EndcapCrossTalk2018          = [ 0.06, 0.06, 0.06],
-        EndcapNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
-        EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3],
-        DBMToTThreshold2018       = [   -1,   -1,   -1],
-        DBMCrossTalk2018          = [ 0.06, 0.06, 0.06],
-        DBMNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
-        DBMDisableProbability2018 = [ 9e-3, 9e-3, 9e-3],
-        IBLNoiseShape2018    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
-        BLayerNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
-        PixelNoiseShape2018  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
-    )
-    #====================================================================================
-    # RUN1
-    CondArgs.update(
-        BarrelToTThresholdRUN1       = [    3,    3,    3],
-        FEI3BarrelLatencyRUN1        = [  256,  256,  256],
-        FEI3BarrelHitDuplicationRUN1 = [ True, True, True],
-        FEI3BarrelSmallHitToTRUN1    = [    7,    7,    7],
-        FEI3BarrelTimingSimTuneRUN1  = [ 2009, 2009, 2009],
-        BarrelCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
-        BarrelNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
-        BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
-        EndcapToTThresholdRUN1       = [    3,    3,    3],
-        FEI3EndcapLatencyRUN1        = [  256,  256,  256],
-        FEI3EndcapHitDuplicationRUN1 = [ True, True, True],
-        FEI3EndcapSmallHitToTRUN1    = [    7,    7,    7],
-        FEI3EndcapTimingSimTuneRUN1  = [ 2009, 2009, 2009],
-        EndcapCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
-        EndcapNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
-        EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
-        BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
-        PixelNoiseShapeRUN1  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
-    )
-    #====================================================================================
-    # ITK
-    CondArgs.update(
-        BarrelToTThresholdITK       = [    3,    3,    3,    3,    3],
-        BarrelCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06],
-        BarrelNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
-        BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
-        EndcapToTThresholdITK       = [    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3],
-        EndcapCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06],
-        EndcapNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
-        EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
-        InnermostNoiseShapeITK     = [0.0, 1.0],
-        NextInnermostNoiseShapeITK = [0.0, 1.0],
-        PixelNoiseShapeITK         = [0.0, 1.0]
-    )
+    if flags.Input.isMC:
+        # Digitization parameters
+        CondArgs.update(
+            BunchSpace=25.0,
+            FEI4BarrelHitDiscConfig=[2]
+        )
+        #====================================================================================
+        # Run-dependent SIMULATION(digitization) parameters:
+        #====================================================================================
+        # RUN2 2015/2016
+        CondArgs.update(
+            BarrelToTThreshold2016       = [   -1,    5,    5,    5],
+            FEI3BarrelLatency2016        = [    0,  151,  256,  256],
+            FEI3BarrelHitDuplication2016 = [False,False,False,False],
+            FEI3BarrelSmallHitToT2016    = [   -1,   -1,   -1,   -1],
+            FEI3BarrelTimingSimTune2016  = [   -1, 2015, 2015, 2015],
+            BarrelCrossTalk2016          = [ 0.30, 0.06, 0.06, 0.06],
+            BarrelNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8, 5e-8],
+            BarrelDisableProbability2016 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            EndcapToTThreshold2016       = [    5,    5,    5],
+            FEI3EndcapLatency2016        = [  256,  256,  256],
+            FEI3EndcapHitDuplication2016 = [False,False,False],
+            FEI3EndcapSmallHitToT2016    = [   -1,   -1,   -1],
+            FEI3EndcapTimingSimTune2016  = [ 2015, 2015, 2015],
+            EndcapCrossTalk2016          = [ 0.06, 0.06, 0.06],
+            EndcapNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
+            EndcapDisableProbability2016 = [ 9e-3, 9e-3, 9e-3],
+            DBMToTThreshold2016       = [   -1,   -1,   -1],
+            DBMCrossTalk2016          = [ 0.06, 0.06, 0.06],
+            DBMNoiseOccupancy2016     = [ 5e-8, 5e-8, 5e-8],
+            DBMDisableProbability2016 = [ 9e-3, 9e-3, 9e-3],
+            IBLNoiseShape2016    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
+            BLayerNoiseShape2016 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
+            PixelNoiseShape2016  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
+            # Layer-2 noise shape                     [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2129, 0.4016, 0.5477, 0.6599, 0.7435, 0.8160, 0.8779, 0.9340, 0.9798, 1.0]
+            # So far, Gaudi::Property does not support 2D vector.
+            #EndcapNoiseShape=[[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1748, 0.3409, 0.4760, 0.5850, 0.6754, 0.7538, 0.8264, 0.8962, 0.9655, 1.0],
+            #                  [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1852, 0.3528, 0.4881, 0.5961, 0.6855, 0.7640, 0.8374, 0.9068, 0.9749, 1.0],
+            #                  [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.1735, 0.3380, 0.4733, 0.5829, 0.6730, 0.7516, 0.8234, 0.8916, 0.9595, 1.0]]
+        )
+        #====================================================================================
+        # RUN2 2017
+        CondArgs.update(
+            BarrelToTThreshold2017       = [   -1,    5,    5,    5],
+            FEI3BarrelLatency2017        = [    0,  151,  256,  256],
+            FEI3BarrelHitDuplication2017 = [False,False,False,False],
+            FEI3BarrelSmallHitToT2017    = [   -1,   -1,   -1,   -1],
+            FEI3BarrelTimingSimTune2017  = [   -1, 2018, 2018, 2018],
+            BarrelCrossTalk2017          = [ 0.30, 0.06, 0.06, 0.06],
+            BarrelNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8, 5e-8],
+            BarrelDisableProbability2017 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            EndcapToTThreshold2017       = [    5,    5,    5],
+            FEI3EndcapLatency2017        = [  256,  256,  256],
+            FEI3EndcapHitDuplication2017 = [False,False,False],
+            FEI3EndcapSmallHitToT2017    = [   -1,   -1,   -1],
+            FEI3EndcapTimingSimTune2017  = [ 2018, 2018, 2018],
+            EndcapCrossTalk2017          = [ 0.06, 0.06, 0.06],
+            EndcapNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
+            EndcapDisableProbability2017 = [ 9e-3, 9e-3, 9e-3],
+            DBMToTThreshold2017       = [   -1,   -1,   -1],
+            DBMCrossTalk2017          = [ 0.06, 0.06, 0.06],
+            DBMNoiseOccupancy2017     = [ 5e-8, 5e-8, 5e-8],
+            DBMDisableProbability2017 = [ 9e-3, 9e-3, 9e-3],
+            IBLNoiseShape2017    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
+            BLayerNoiseShape2017 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
+            PixelNoiseShape2017  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
+        )
+        #====================================================================================
+        # RUN2 2018
+        CondArgs.update(
+            BarrelToTThreshold2018       = [   -1,    3,    5,    5],
+            FEI3BarrelLatency2018        = [    0,  151,  256,  256],
+            FEI3BarrelHitDuplication2018 = [False,False,False,False],
+            FEI3BarrelSmallHitToT2018    = [   -1,   -1,   -1,   -1],
+            FEI3BarrelTimingSimTune2018  = [   -1, 2018, 2018, 2018],
+            BarrelCrossTalk2018          = [ 0.30, 0.06, 0.06, 0.06],
+            BarrelNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8, 5e-8],
+            BarrelDisableProbability2018 = [ 9e-3, 9e-3, 9e-3, 9e-3],
+            EndcapToTThreshold2018       = [    5,    5,    5],
+            FEI3EndcapLatency2018        = [  256,  256,  256],
+            FEI3EndcapHitDuplication2018 = [False,False,False],
+            FEI3EndcapSmallHitToT2018    = [   -1,   -1,   -1],
+            FEI3EndcapTimingSimTune2018  = [ 2018, 2018, 2018],
+            EndcapCrossTalk2018          = [ 0.06, 0.06, 0.06],
+            EndcapNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
+            EndcapDisableProbability2018 = [ 9e-3, 9e-3, 9e-3],
+            DBMToTThreshold2018       = [   -1,   -1,   -1],
+            DBMCrossTalk2018          = [ 0.06, 0.06, 0.06],
+            DBMNoiseOccupancy2018     = [ 5e-8, 5e-8, 5e-8],
+            DBMDisableProbability2018 = [ 9e-3, 9e-3, 9e-3],
+            IBLNoiseShape2018    = [0.0, 0.0330, 0.0, 0.3026, 0.5019, 0.6760, 0.8412, 0.9918, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0],
+            BLayerNoiseShape2018 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
+            PixelNoiseShape2018  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
+        )
+        #====================================================================================
+        # RUN1
+        CondArgs.update(
+            BarrelToTThresholdRUN1       = [    3,    3,    3],
+            FEI3BarrelLatencyRUN1        = [  256,  256,  256],
+            FEI3BarrelHitDuplicationRUN1 = [ True, True, True],
+            FEI3BarrelSmallHitToTRUN1    = [    7,    7,    7],
+            FEI3BarrelTimingSimTuneRUN1  = [ 2009, 2009, 2009],
+            BarrelCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
+            BarrelNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
+            BarrelDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
+            EndcapToTThresholdRUN1       = [    3,    3,    3],
+            FEI3EndcapLatencyRUN1        = [  256,  256,  256],
+            FEI3EndcapHitDuplicationRUN1 = [ True, True, True],
+            FEI3EndcapSmallHitToTRUN1    = [    7,    7,    7],
+            FEI3EndcapTimingSimTuneRUN1  = [ 2009, 2009, 2009],
+            EndcapCrossTalkRUN1          = [ 0.06, 0.06, 0.06],
+            EndcapNoiseOccupancyRUN1     = [ 5e-8, 5e-8, 5e-8],
+            EndcapDisableProbabilityRUN1 = [ 9e-3, 9e-3, 9e-3],
+            BLayerNoiseShapeRUN1 = [0.0, 0.0, 0.0, 0.0, 0.2204, 0.5311, 0.7493, 0.8954, 0.9980, 1.0],
+            PixelNoiseShapeRUN1  = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2418, 0.4397, 0.5858, 0.6949, 0.7737, 0.8414, 0.8959, 0.9414, 0.9828, 1.0],
+        )
+        #====================================================================================
+        # ITK
+        CondArgs.update(
+            BarrelToTThresholdITK       = [    3,    3,    3,    3,    3],
+            BarrelCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06],
+            BarrelNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
+            BarrelDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
+            EndcapToTThresholdITK       = [    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3,    3],
+            EndcapCrossTalkITK          = [ 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, 0.06],
+            EndcapNoiseOccupancyITK     = [ 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8, 5e-8],
+            EndcapDisableProbabilityITK = [ 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3, 9e-3],
+            InnermostNoiseShapeITK     = [0.0, 1.0],
+            NextInnermostNoiseShapeITK = [0.0, 1.0],
+            PixelNoiseShapeITK         = [0.0, 1.0]
+        )
 
     # Charge calibration parameters
     CondArgs.update(
diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py
index 77bdacc15a1688a0b7cdbe3760944e06702e4151..64331dad8eff2214ac9cfa5b9f49186049cc99ca 100644
--- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py
+++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py
@@ -70,13 +70,10 @@ def PixelMonitoringConfig(flags):
         
         PixelAthClusterMonAlgCfg(helper, pixelAthClusterMonAlg, **kwargsClusMonAlg)
 
-        from PixelMonitoring.PixelMonitoringConf import PixelAthErrorMonAlg
         from PixelMonitoring.PixelAthErrorMonAlgCfg import PixelAthErrorMonAlgCfg
-        pixelAthMonAlgErrorMonAlg = helper.addAlgorithm(PixelAthErrorMonAlg, 'PixelAthErrorMonAlg')
+        pixelAthMonAlgErrorMonAlg = helper.addAlgorithm(CompFactory.PixelAthErrorMonAlg, 'PixelAthErrorMonAlg')
         for k, v in kwargsErrMonAlg.items():
             setattr(pixelAthMonAlgErrorMonAlg, k, v)
-        from PixelConditionsTools.PixelConditionsToolsConf import PixelByteStreamErrorsTool
-        pixelAthMonAlgErrorMonAlg.PixelByteStreamErrorsTool = PixelByteStreamErrorsTool(ReadingESD = (flags.DQ.Environment == 'tier0ESD'))
         PixelAthErrorMonAlgCfg(helper, pixelAthMonAlgErrorMonAlg, **kwargsErrMonAlg)
         acc.merge(helper.result())
 
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py
index e0d34db1d10f20a294ffc2fdae866a98890920e0..7fb4538d006549bafdb09a1cc6aacba1e9474fc4 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/SCTTracksMonAlg.py
@@ -35,7 +35,7 @@ def SCTTracksMonAlgConfig(inputFlags):
         myMonAlg.FilterTools += [GetFilledBunchFilterTool()]
 
     doTrigger = False
-    if not inputFlags.isMC:
+    if not inputFlags.Input.isMC:
         if inputFlags.Trigger.doHLT:
             doTrigger = True
     myMonAlg.doTrigger = doTrigger
diff --git a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py
index c589bb357c64fc53953358605719dec1cb327c62..a66b8c0877b0c46476221270b46496095b0eae9d 100644
--- a/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py
+++ b/InnerDetector/InDetMonitoring/SCT_Monitoring/python/TrackSummaryToolWorkaround.py
@@ -20,8 +20,8 @@ def TrackSummaryToolWorkaround(flags):
     result.merge(PixelConfigCondAlgCfg(flags,
                                     UseCalibConditions=True,
                                     UseDeadmapConditions=True,
-                                    UseDCSStateConditions=False,
-                                    UseDCSStatusConditions=False,
+                                    UseDCSStateConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS),
+                                    UseDCSStatusConditions=(not flags.Input.isMC and flags.InDet.usePixelDCS),
                                     UseDCSHVConditions=True,
                                     UseDCSTemperatureConditions=True,
                                     UseTDAQConditions=False))
@@ -87,15 +87,15 @@ def TrackSummaryToolWorkaround(flags):
                                                           CountDeadModulesAfterLastHit = True,
                                                           BoundaryCheckTool=InDetBoundaryCheckTool)
     result.addPublicTool(InDetHoleSearchTool)
-    InDetPrdAssociationTool = CompFactory.InDet.InDetPRD_AssociationToolGangedPixels(name                           = "InDetPrdAssociationTool",
+    InDetPrdAssociationTool = CompFactory.InDet.InDetPRD_AssociationToolGangedPixels(name                           = "InDetPrdAssociationTool_setup",
                                                                           PixelClusterAmbiguitiesMapName = "PixelClusterAmbiguitiesMap",
                                                                           SetupCorrect                   = True,
                                                                           addTRToutliers                 = True)
     result.addPublicTool(InDetPrdAssociationTool)
     InDetTrackSummaryHelperTool = CompFactory.InDet.InDetTrackSummaryHelperTool(name            = "InDetSummaryHelper",
                                                                      AssoTool        = InDetPrdAssociationTool,
-                                                                     PixelToTPIDTool = None,
-                                                                     TestBLayerTool  = None,
+                                                                     PixelToTPIDTool = '',
+                                                                     TestBLayerTool  = '',
                                                                      RunningTIDE_Ambi = True,
                                                                      DoSharedHits    = False,
                                                                      HoleSearch      = InDetHoleSearchTool,
@@ -106,9 +106,9 @@ def TrackSummaryToolWorkaround(flags):
                                                   InDetSummaryHelperTool = InDetTrackSummaryHelperTool,
                                                   doSharedHits           = False,
                                                   doHolesInDet           = True,
-                                                  TRT_ElectronPidTool    = None,
-                                                  TRT_ToT_dEdxTool       = None,
-                                                  PixelToTPIDTool        = None)
+                                                  TRT_ElectronPidTool    = '',
+                                                  TRT_ToT_dEdxTool       = '',
+                                                  PixelToTPIDTool        = '')
     result.setPrivateTools(InDetTrackSummaryTool)
     ############################## WORKAROUND (END) ############################
 
diff --git a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py
index ceae33541b167555346b8c4f31ce3bbb82d53bb3..4ff8ded4e02d4821e7d50d05f8ffbeb456df2eb7 100644
--- a/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py
+++ b/InnerDetector/InDetMonitoring/TRTMonitoringRun3/python/TRTMonitoringRun3RAW_Alg.py
@@ -2,16 +2,28 @@
 #  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 def TRTMonitoringRun3RAW_AlgConfig(inputFlags):
-    from AthenaMonitoring import AthMonitorCfgHelperOld as AthMonitorCfgHelper
+    from AthenaConfiguration.ComponentFactory import isRun3Cfg
+    if isRun3Cfg():
+        from AthenaMonitoring import AthMonitorCfgHelper
+        isOnline = inputFlags.Common.isOnline
+        from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+        rv = ComponentAccumulator()
+    else:
+        from AthenaMonitoring import AthMonitorCfgHelperOld as AthMonitorCfgHelper
+        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+        isOnline = athenaCommonFlags.isOnline
     helper = AthMonitorCfgHelper(inputFlags, 'TRTMonitoringCfg')
 
     from AthenaConfiguration.ComponentFactory import CompFactory
     algTRTMonitoringRun3RAW = helper.addAlgorithm(CompFactory.TRTMonitoringRun3RAW_Alg,
                                                   'AlgTRTMonitoringRun3RAW',
-                                                  ByteStreamErrors= "" if inputFlags.isMC else "TRT_ByteStreamErrs"
+                                                  ByteStreamErrors= "" if inputFlags.Input.isMC else "TRT_ByteStreamErrs",
+                                                  TrackSummaryTool= "InDetTrackSummaryTool"
                                               )
 
-    from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
+    if isRun3Cfg():
+        from SCT_Monitoring.TrackSummaryToolWorkaround import TrackSummaryToolWorkaround
+        algTRTMonitoringRun3RAW.TrackSummaryTool = rv.popToolsAndMerge(TrackSummaryToolWorkaround(inputFlags))
 
     maxLumiBlock         = 200
     numberOfBarrelStacks = 32
@@ -108,7 +120,7 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags):
                 rdoEndcapGroup.defineHistogram('HitWMap_Ar_passed,HitWMap_Ar;hHitWMap_Ar_{0}'.format(side[iside]),type='TEfficiency',title='Leading Edge in Time Window: Argon Straws (E{0});Straw Number in Stack;Probability'.format(side[iside]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=strawMax[ibe],xmin=0,xmax=strawMax[ibe])   
         for iside in range(2):
             regionTag = ' (' + beId[ibe] + sideId[iside] + ')'
-            regionMarker = (beId[ibe] + sideId[iside]) if athenaCommonFlags.isOnline is True else (sideId[iside])
+            regionMarker = (beId[ibe] + sideId[iside]) if isOnline is True else (sideId[iside])
             rdoLLHLOccGroup = helper.addGroup(algTRTMonitoringRun3RAW,'RDOLLHLOccHistograms{0}{1}'.format(ibe,iside))
             rdoLLHLOccGroup.defineHistogram('AvgHLOcc_side_x,AvgHLOcc_side_y;hAvgHLOcc_{0}'.format(regionMarker),type='TProfile',title='Avg. HL Occupancy{0};{1};Occupancy'.format(regionTag,stackOrSector[ibe]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=1,xmax=33)
             rdoLLHLOccGroup.defineHistogram('AvgLLOcc_side_x,AvgLLOcc_side_y;hAvgLLOcc_{0}'.format(regionMarker),type='TProfile',title='Avg. LL Occupancy{0};{1};Occupancy'.format(regionTag,stackOrSector[ibe]),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=1,xmax=33)
@@ -209,4 +221,8 @@ def TRTMonitoringRun3RAW_AlgConfig(inputFlags):
                 shiftTrackEndcapGroup.defineHistogram('StrawEffDetPhi_E_passed,StrawEffDetPhi_E;hStrawEffDetPhi_{0}'.format(sideId[iside]),type='TEfficiency',title='Straw Efficiency on Track with {0} mm Cut vs #phi(2D){1};Stack;Avg. Straw Efficiency'.format(distance,regionTag),path='TRT/Shift/{0}'.format(barrelOrEndcap[ibe]),xbins=32,xmin=0,xmax=32)
     ### Finished Booking TRT Hits Histograms ###
 
-    return helper.result()
+    if isRun3Cfg():
+        rv.merge(helper.result())
+        return rv
+    else:
+        return helper.result()
diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py
index 1e3fae2056c420060e68968b6dda3ce6925d5295..44ff1145650a2bf9441dcb75e3178dab7ca96bf2 100644
--- a/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py
+++ b/LArCalorimeter/LArBadChannelTool/python/LArBadChannelConfig.py
@@ -4,46 +4,37 @@ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 LArBadChannelCondAlg, LArBadFebCondAlg, LArBadChannelMasker=CompFactory.getComps("LArBadChannelCondAlg","LArBadFebCondAlg","LArBadChannelMasker",)
 from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
-from IOVDbSvc.IOVDbSvcConfig import addFolders
+from IOVDbSvc.IOVDbSvcConfig import addFolders, addFoldersSplitOnline
 
-def LArBadChannelCfg(configFlags, tag=""):
+def LArBadChannelCfg(configFlags, tag=None):
 
     result=LArOnOffIdMappingCfg(configFlags)
-    
-    if configFlags.Common.isOnline or configFlags.Input.isMC:
-        foldername="/LAR/BadChannels/BadChannels"
-    else:
-        foldername="/LAR/BadChannelsOfl/BadChannels"
-        pass
-    
-    if configFlags.Common.isOnline: 
-        dbname="LAR"
-    else:
-        dbname="LAR_OFL"
+    rekey="/LAR/BadChannels/BadChannels"
 
-    result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="CondAttrListCollection"))
-    
-    theLArBadChannelCondAlgo=LArBadChannelCondAlg(ReadKey=foldername)
+    if configFlags.Input.isMC:
+        result.merge(addFolders(configFlags,"/LAR/BadChannels/BadChannels","LAR_OFL",tag=tag,
+                                className="CondAttrListCollection"))
+    else:
+        result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/BadChannels",
+                                        f"/LAR/BadChannelsOfl/BadChannels<key>{rekey}</key>",tag=tag,
+                                        className="CondAttrListCollection"))  
+    theLArBadChannelCondAlgo=LArBadChannelCondAlg(ReadKey=rekey)
     result.addCondAlgo(theLArBadChannelCondAlgo)
     return result
 
 
-def LArBadFebCfg(configFlags, tag=""):
+def LArBadFebCfg(configFlags, tag=None):
     result=ComponentAccumulator()
+    rekey="/LAR/BadChannels/MissingFEBs"
 
-    if configFlags.Common.isOnline or configFlags.Input.isMC:
-        foldername="/LAR/BadChannels/MissingFEBs"
-    else:
-        foldername="/LAR/BadChannelsOfl/MissingFEBs"
-        pass
-
-    if configFlags.Common.isOnline: 
-        dbname="LAR"
+    if configFlags.Input.isMC:
+        result.merge(addFolders(configFlags,"/LAR/BadChannels/MissingFEBs","LAR_OFL",tag=tag,
+                                className="AthenaAttributeList"))
     else:
-        dbname="LAR_OFL"
-
-    result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList"))
-    result.addCondAlgo(LArBadFebCondAlg(ReadKey=foldername))
+        result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/MissingFEBs",
+                                           f"/LAR/BadChannelsOfl/MissingFEBs<key>{rekey}</key>",tag=tag,
+                                           className="AthenaAttributeList"))  
+    result.addCondAlgo(LArBadFebCondAlg(ReadKey=rekey))
     return result
 
 
diff --git a/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py b/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py
index ce39d215f7ab9688ad9c90c8b4c86354a6ef276e..f858414092167a66cadc2ee1585474123224812d 100644
--- a/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py
+++ b/LArCalorimeter/LArBadChannelTool/python/LArBadFebsConfig.py
@@ -3,52 +3,34 @@
 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
 from AthenaConfiguration.ComponentFactory import CompFactory
 LArBadFebCondAlg=CompFactory.LArBadFebCondAlg
-from IOVDbSvc.IOVDbSvcConfig import addFolders
+from IOVDbSvc.IOVDbSvcConfig import addFoldersSplitOnline
 
-def LArKnownBadFebCfg(configFlags, tag=""):
+def LArKnownBadFebCfg(configFlags, tag=None):
     result=ComponentAccumulator()
 
     if configFlags.GeoModel.Run == "RUN1":
-        foldername=""
+        rekey=""
     else:    
-        if configFlags.Common.isOnline or configFlags.Input.isMC:
-            foldername="/LAR/BadChannels/KnownBADFEBs"
-        else:
-            foldername="/LAR/BadChannelsOfl/KnownBADFEBs"
-        pass
- 
-        if configFlags.Common.isOnline: 
-            dbname="LAR"
-        else:
-            dbname="LAR_OFL"
-        pass
-    pass    
+        rekey="/LAR/BadChannels/KnownBADFEBs"
+        result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/KnownBADFEBs",
+                                           f"/LAR/BadChannelsOfl/KnownBADFEBs<key>{rekey}</key>",tag=tag,
+                                           className="AthenaAttributeList"))  
 
-    result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList"))
-    result.addCondAlgo(LArBadFebCondAlg("LArKonwnBadFebCondAlg",ReadKey=foldername,WriteKey="LArKnownBadFEBs"))
+    result.addCondAlgo(LArBadFebCondAlg("LArKnownBadFebAlg",ReadKey=rekey,WriteKey="LArKnownBadFEBs"))
     return result
 
-def LArKnownMNBFebCfg(configFlags, tag=""):
+def LArKnownMNBFebCfg(configFlags, tag=None):
     result=ComponentAccumulator()
 
     if configFlags.GeoModel.Run == "RUN1":
-        foldername=""
-    else:    
-        if configFlags.Common.isOnline or configFlags.Input.isMC:
-            foldername="/LAR/BadChannels/KnownMNBFEBs"
-        else:
-            foldername="/LAR/BadChannelsOfl/KnownMNBFEBs"
-        pass
- 
-        if configFlags.Common.isOnline: 
-            dbname="LAR"
-        else:
-            dbname="LAR_OFL"
-        pass
-    pass    
-
-    result.merge(addFolders(configFlags,foldername + tag,detDb=dbname,className="AthenaAttributeList"))
-    result.addCondAlgo(LArBadFebCondAlg("LArKonwnMNBFebCondAlg",ReadKey=foldername,WriteKey="LArKnownMNBFEBs"))
+        rekey=""
+    else:
+        rekey="/LAR/BadChannels/KnownMNBFEBs"
+        result.merge(addFoldersSplitOnline(configFlags,"LAR","/LAR/BadChannels/KnownMNBFEBs",
+                                           f"/LAR/BadChannelsOfl/KnownMNBFEBs<key>{rekey}</key>",tag=tag,
+                                           className="AthenaAttributeList"))   
+
+    result.addCondAlgo(LArBadFebCondAlg("LArKnownMNBFebAlg",ReadKey=rekey,WriteKey="LArKnownMNBFEBs"))
     return result
 
 
diff --git a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
index 772629cab37fb7c1554ea8887514019486bb7df8..1f3db3321df7f03a4fc5731ff1a87b23b311b64b 100644
--- a/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
+++ b/LArCalorimeter/LArCalibUtils/python/LArHVScaleConfig.py
@@ -39,7 +39,7 @@ def LArHVScaleCfg(configFlags):
         result.addCondAlgo(hvpath)
 
         LArHVCondAlg=CompFactory.LArHVCondAlg
-        hvcond = LArHVCondAlg("LArHVPathologyAlg",HVPathologies="LArHVPathology",OutputHVData="LArHVData")
+        hvcond = LArHVCondAlg(HVPathologies="LArHVPathology",OutputHVData="LArHVData")
         result.addCondAlgo(hvcond)
 
         from LArConfiguration.LArElecCalibDBConfig import LArElecCalibDbCfg
diff --git a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py
index 513447a42d1d6c7e391b6a1c0fd82f66415a4df6..ac701c906374d76dabd1a368708489d543231b80 100644
--- a/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py
+++ b/LArCalorimeter/LArMonitoring/python/LArFEBMonAlg.py
@@ -12,14 +12,22 @@ def LArFEBMonConfigOld(inputFlags, cellDebug=False, dspDebug=False):
 
 
 def LArFEBMonConfig(inputFlags, cellDebug=False, dspDebug=False):
-
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     from AthenaMonitoring import AthMonitorCfgHelper
     helper = AthMonitorCfgHelper(inputFlags,'LArFEBMonAlgCfg')
 
     from AthenaConfiguration.ComponentFactory import CompFactory
     LArFEBMonConfigCore(helper, CompFactory.LArFEBMonAlg,inputFlags,cellDebug, dspDebug)
 
-    return helper.result()
+    rv = ComponentAccumulator()
+
+    # adding LArFebErrorSummary algo
+    from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
+    rv.merge(LArFebErrorSummaryMakerCfg(inputFlags))
+    
+    rv.merge(helper.result())
+
+    return rv
 
 def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebug=False):
 
@@ -74,14 +82,7 @@ def LArFEBMonConfigCore(helper,algoinstance,inputFlags, cellDebug=False, dspDebu
            conddb.addFolder (db, fld, className=obj)
        larFEBMonAlg.Run1DSPThresholdsKey = 'LArDSPThresholds'
 
-    # adding LArFebErrorSummary algo
-    if isRun3Cfg() :
-        from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
-        acc = LArFebErrorSummaryMakerCfg(inputFlags)
-        helper.resobj.merge(acc)
-    else :
-        #put here what to do else
-        pass
+
     Group = helper.addGroup(
         larFEBMonAlg,
         GroupName,
diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py
index 17a556f53384d59e7ad59a9381badecf759662ca..7c7a3050f6504eb3d8b052d47dd947bd09c6b440 100644
--- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py
+++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonTrackMonitoring/python/MuonTrackMonitorAlgorithm.py
@@ -16,7 +16,7 @@ def MuonTrackConfig(inputFlags, isOld=False):
 
     helper = AthMonitorCfgHelper(inputFlags, "MuonTrackMonitoringConfig")
 
-    muonTrackAlg = helper.addAlgorithm(MuonTrackMonitorAlgorithm, "MuonTrackMonitorAlgorithm")
+    muonTrackAlg = helper.addAlgorithm(MuonTrackMonitorAlgorithm, "MuonTrackMonitorAlg")
 
     myGroup = helper.addGroup(muonTrackAlg, "MuonTrackMonitorAlgorithm", "MuonPhysics/")
 
diff --git a/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py b/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py
index 3b53019c7f02f38a5f44f0c2d9b64a75c17e8063..bfcb72281de758f7230cb5ddf14af94be970524b 100644
--- a/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py
+++ b/PhysicsAnalysis/JetTagging/JetTagMonitoring/python/JetTagMonitorAlgorithm.py
@@ -16,8 +16,12 @@ def JetTagMonitorConfig(inputFlags):
     ### STEP 1 ###
     # Define one top-level monitoring algorithm. The new configuration 
     # framework uses a component accumulator.
-    #from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
-    #result = ComponentAccumulator()
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+
+    # do not run monitoring in RAWtoESD
+    if inputFlags.DQ.Environment == 'tier0Raw':
+        return result
 
     # The following class will make a sequence, configure algorithms, and link
     # them to GenericMonitoringTools
@@ -307,7 +311,8 @@ def JetTagMonitorConfig(inputFlags):
     # and the sequence containing the created algorithms. If we haven't called
     # any configuration other than the AthMonitorCfgHelper here, then we can 
     # just return directly (and not create "result" above)
-    return helper.result()
+    result.merge(helper.result())
+    return result
     
     # # Otherwise, merge with result object and return
     # acc, seq = helper.result()
diff --git a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
index c04cef28d225b778b017dd8bcc6071acdd4a9a59..6378161ce16afee25dc0e8a566f8a5e85a61b31a 100644
--- a/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
+++ b/Reconstruction/Jet/JetMonitoring/python/JetMonitoringStandard.py
@@ -9,7 +9,7 @@
 '''
 
 from __future__ import print_function
-from JetMonitoring.JetMonitoringConfig import JetMonAlgSpec, HistoSpec,  SelectSpec, ToolSpec
+from JetMonitoring.JetMonitoringConfig import JetMonAlgSpec, HistoSpec,  SelectSpec
 
 
 # *********************************************
@@ -145,6 +145,13 @@ def standardJetMonitoring(inputFlags):
     Details of what goes into jet monitoring is implemented by dedicated functions such as jetMonAlgConfig().
     """
 
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    rv = ComponentAccumulator()
+
+    # do not run monitoring in RAWtoESD
+    if inputFlags.DQ.Environment == 'tier0Raw':
+        return rv
+
     from AthenaMonitoring import AthMonitorCfgHelper
     helper = AthMonitorCfgHelper(inputFlags,'JetMonitoring')
 
@@ -161,4 +168,5 @@ def standardJetMonitoring(inputFlags):
     for conf in jetAlgConfs:        
         conf.toAlg(helper) # adds the conf as a JetMonitoringAlg to the helper
     
-    return helper.result() # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system.
+    rv.merge(helper.result())  # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system.
+    return rv
diff --git a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
index 934393e2f38623a8878f63308fcdb26f7257fe4d..a01eac977871d09fdb9b3cf0d212325fda98dac9 100644
--- a/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
+++ b/Reconstruction/MissingETMonitoring/python/METMonitorAlgorithm.py
@@ -49,8 +49,12 @@ def defineHistogramsCalo(monAlg, group,helper,histoNameSuffix=""):
 def METMonitoringConfig(inputFlags):    
 # '''Function to configures some algorithms in the monitoring system.'''
 
-#    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator  
-#    result = ComponentAccumulator()
+    from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+    result = ComponentAccumulator()
+
+    # do not run monitoring in RAWtoESD
+    if inputFlags.DQ.Environment == 'tier0Raw':
+        return result
 
     from AthenaMonitoring import AthMonitorCfgHelper     
 #    helper = AthMonitorCfgHelper(inputFlags,'AthMonitorCfg') 
@@ -289,4 +293,6 @@ def METMonitoringConfig(inputFlags):
     BadJetsGroup = helper.addGroup(BadJets_EMTopoMETMonAlg,"METMonitor","MissingEt/AllTriggers/BadJets/MET_Calo/EMTopo")
     for mets in emtopomet_types:
         defineHistograms(BadJets_EMTopoMETMonAlg, BadJetsGroup,helper,mets)
-    return helper.result()
+
+    result.merge(helper.result())
+    return result
diff --git a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
index 98d249a73373ce64cf3b782c2ce1380dfa4bfec2..2fd95abd9dc0f196b3cbe862719f8a876ca36fd5 100644
--- a/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
+++ b/Reconstruction/RecExample/RecExCommon/share/RecExCommon_topOptions.py
@@ -676,20 +676,6 @@ if rec.doESD() and not rec.readESD() and rec.doBeamBackgroundFiller():
 if recAlgs.doMonteCarloReact():
     protectedInclude ("MonteCarloReactTools/MonteCarloReact_for_RecExCommon.py")
 
-# run monitoring
-# ----------------------------------------------------------------------------
-# Monitoring Algorithms and Tools
-# ----------------------------------------------------------------------------
-
-pdr.flag_domain('monitoring')
-if rec.doMonitoring():
-    protectedInclude ("AthenaMonitoring/DataQualitySteering_jobOptions.py")
-
-
-
-# run"Fast Phsyics Monitoring"
-if rec.doFastPhysMonitoring():
-    protectedInclude("FastPhysMonExample/FastPhysicsMonitoring_jobOptions.py")
 
 # ----------------------------------------------------------------------------
 
@@ -981,6 +967,7 @@ if rec.doFileMetaData():
 
     pass
 
+
 ##--------------------------------------------------------
 ###=== Only run reco on events that pass selected triggers
 ##--------------------------------------------------------
@@ -1611,6 +1598,21 @@ if rec.readAOD():
     ServiceMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100
     logRecExCommon_topOptions.info("AOD reading case: Set EventPrintoutInterval=100")
 
+# run monitoring
+# ----------------------------------------------------------------------------
+# Monitoring Algorithms and Tools
+# ----------------------------------------------------------------------------
+
+pdr.flag_domain('monitoring')
+if rec.doMonitoring():
+    protectedInclude ("AthenaMonitoring/DataQualitySteering_jobOptions.py")
+
+
+
+# run"Fast Phsyics Monitoring"
+if rec.doFastPhysMonitoring():
+    protectedInclude("FastPhysMonExample/FastPhysicsMonitoring_jobOptions.py")
+
 
 ###################
 ## Common Utils  ##
diff --git a/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py b/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py
index a2cb5d279c747b56356208d740ffa655c25c782b..4f802ce165cbc9e82db1e83af25e322cff735e53 100644
--- a/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py
+++ b/Reconstruction/tauMonitoring/python/TauMonitoringConfig.py
@@ -6,7 +6,9 @@ def TauMonitoringConfig(flags):
     from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
     result = ComponentAccumulator()
 
-    from .tauMonitorAlgorithm import tauMonitoringConfig
-    result.merge(tauMonitoringConfig(flags))
+    # the following should not run in RAW to ESD, if we're in two-step
+    if flags.DQ.Environment != 'tier0Raw':
+        from .tauMonitorAlgorithm import tauMonitoringConfig
+        result.merge(tauMonitoringConfig(flags))
 
     return result
diff --git a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
index cdc26888927730087c9fc352544a624c34ba6904..15455299d151c55db73ee5a7403f1b05e36618fc 100644
--- a/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
+++ b/TileCalorimeter/TileConditions/python/TileInfoConfigurator.py
@@ -381,11 +381,11 @@ class _TileInfoConfigurator( TileInfoLoader ):
             dbConnStr = 'DCS_OFL'
             from IOVDbSvc.CondDB import conddb
             if useHV:
-                conddb.addFolder(dbConnStr, "/TILE/DCS/HV", className = 'CondAttrListCollection')
+                conddb.addFolder(dbConnStr, "/TILE/DCS/HV<key>/TILE/DCS/HV</key>", className = 'CondAttrListCollection')
             if useHVSET:
-                conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET", className = 'CondAttrListCollection')
+                conddb.addFolder(dbConnStr, "/TILE/DCS/HVSET<key>/TILE/DCS/HVSET</key>", className = 'CondAttrListCollection')
             if useSTATUS:
-                conddb.addFolder(dbConnStr, "/TILE/DCS/STATES", className = 'CondAttrListCollection')
+                conddb.addFolder(dbConnStr, "/TILE/DCS/STATES<key>/TILE/DCS/STATES</key>", className = 'CondAttrListCollection')
 
             from TileConditions.TileConditionsConf import TileDCSCondAlg
             condSequence += TileDCSCondAlg(name = dcsCondAlg,
diff --git a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
index 83b62e933e583965a483e13379b8ce75a5510809..502cc03b192a45f444d9d8e7200c2d6c2fcb22d6 100644
--- a/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
+++ b/TileCalorimeter/TileConditions/share/TileConditions_jobOptions.py
@@ -143,12 +143,7 @@ if not 'TileCommissioning' in dir():
     if jobproperties.Beam.beamType != 'collisions':
         TileCommissioning = True
     else:
-        try:
-            from RecExConfig.RecFlags import rec
-            TileCommissioning = rec.Commissioning()
-        except:
-            msg.info("No RecFlags available - looks like a simulation job")
-            TileCommissioning = False
+        TileCommissioning = False
         
 if TileCommissioning:
     msg.info("Adjusting TileInfo to return cell noise for Opt.Filter with iterations")
diff --git a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
index 814312213c790cae9fa4b85d3f79a81da9f979e7..d0adaf914a41f03ea473ad2f5be75c6a3087aeb2 100644
--- a/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
+++ b/Trigger/TrigAlgorithms/TrigT2CaloCommon/python/TrigCaloDataAccessConfig.py
@@ -49,9 +49,9 @@ def trigCaloDataAccessSvcCfg( flags ):
     acc.merge( createLArRoI_Map( flags ) )
 
     # Needed by bad channel maskers, refrerenced from LArCellCont.
-    from IOVDbSvc.IOVDbSvcConfig import addFolders
-    acc.merge(addFolders(flags, ['/LAR/BadChannels/BadChannels'], 'LAR'))
-    acc.merge(addFolders(flags, ['/LAR/BadChannels/MissingFEBs'], 'LAR'))
+    from LArBadChannelTool.LArBadChannelConfig import LArBadChannelCfg, LArBadFebCfg
+    acc.merge(LArBadChannelCfg(flags))
+    acc.merge(LArBadFebCfg(flags))
 
     from TileConditions.TileEMScaleConfig import TileEMScaleCondAlgCfg
     acc.merge( TileEMScaleCondAlgCfg(flags) )