diff --git a/LArCalorimeter/LArCafJobs/CMakeLists.txt b/LArCalorimeter/LArCafJobs/CMakeLists.txt
index 954785b1a3bca5a2c14fb3c5e48e8b0e75f3809c..071cf7cad895336e04469dd648ffdd30db2805bf 100644
--- a/LArCalorimeter/LArCafJobs/CMakeLists.txt
+++ b/LArCalorimeter/LArCafJobs/CMakeLists.txt
@@ -33,7 +33,7 @@ atlas_add_library( LArCafJobsLib
                    PUBLIC_HEADERS LArCafJobs
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthAnalysisToolsLib AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloIdentifier CaloInterfaceLib GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions StoreGateLib TrigAnalysisInterfaces TrigConfInterfaces TrigDecisionToolLib egammaEvent
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthAnalysisToolsLib AthenaBaseComps AthenaKernel CaloConditions CaloDetDescrLib CaloIdentifier CaloInterfaceLib GaudiKernel Identifier LArCablingLib LArElecCalib LArIdentifier LArRawConditions LArRawEvent LArRecConditions StoreGateLib TrigAnalysisInterfaces TrigConfInterfaces TrigDecisionToolLib egammaEvent LumiBlockData
                    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} AthenaPoolUtilities CaloEvent CaloGeoHelpers LArRecEvent NavFourMom TrigSteeringEvent TrigT1Result xAODEventInfo )
 
 atlas_add_component( LArCafJobs
diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h
index 2e265461eded6751bb3259c281438da6750e436b..fe16ecf63c1c1d5fcdd732fc2e9427e5bc4eab69 100644
--- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h
+++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArHECNoise.h
@@ -63,6 +63,7 @@ class LArHECNoise : public AthAlgorithm  {
    TTree* m_tree;
 
    SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
+   SG::ReadCondHandleKey<ILArPedestal> m_pedKey{this,"PedestalKey","LArPedestal","SG Key of Pedestal obj"};
    /*Tools*/
    ToolHandle<Trig::IBunchCrossingTool> m_bc_tool;
 
@@ -109,7 +110,7 @@ class LArHECNoise : public AthAlgorithm  {
    std::vector<std::string> m_TriggerLines;
    int m_MinDigitADC;
    int m_MaxDeltaT;
-   const ILArPedestal* m_ped;
+
 
 };
 
diff --git a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
index 686717cf45d1ff6466f48d86e07d3772420f309d..ba5eeefded2da7f4d02dc39dfd61603495c37420 100755
--- a/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
+++ b/LArCalorimeter/LArCafJobs/LArCafJobs/LArShapeDumper.h
@@ -31,13 +31,16 @@
 #include "TTree.h"
 #include "TRandom.h"
 #include "TrigConfInterfaces/ITrigConfigSvc.h"
-#include "TrigAnalysisInterfaces/IBunchCrossingTool.h"
 #include "LArCafJobs/ILArShapeDumperTool.h"
 #include "StoreGate/ReadCondHandleKey.h"
 #include "LArRecConditions/LArBadChannelCont.h"
 #include "LArCabling/LArOnOffIdMapping.h"
 #include "CaloConditions/CaloNoise.h"
 
+#include "LArRawConditions/LArADC2MeV.h"
+#include "LumiBlockData/BunchCrossingCondData.h"
+
+
 
 class MsgStream;
 class StoreGateSvc;
@@ -97,10 +100,11 @@ class LArShapeDumper : public AthAlgorithm
   bool m_dumpDisc;
   std::vector<std::string> m_triggerNames;
 
-  ToolHandle<ILArShapeDumperTool> m_dumperTool;
+  ToolHandle<ILArShapeDumperTool> m_dumperTool{this,"LArShapeDumperTool","LArShapeDumperTool"};
   ToolHandle<ILArBadChannelMasker> m_badChannelMasker;
-  ToolHandle<ILArADC2MeVTool> m_adc2mevTool; 
-  //  ToolHandle<LArOFPeakRecoTool> m_peakReco;
+
+  SG::ReadCondHandleKey<LArADC2MeV>   m_adc2mevKey{this,"ADC2MeVKey","LArADC2MeV","SG Key of ADC2MeV conditions object"};
+ 
   ToolHandle<Trig::TrigDecisionTool> m_trigDec;
 
   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
@@ -109,8 +113,11 @@ class LArShapeDumper : public AthAlgorithm
 
   ServiceHandle<TrigConf::ITrigConfigSvc> m_configSvc;  // for tests...
 
-  ToolHandle<Trig::IBunchCrossingTool> m_bcidTool;
- 
+  SG::ReadCondHandleKey<BunchCrossingCondData> m_bcDataKey {this, "BunchCrossingCondDataKey", "BunchCrossingData" ,"SG Key of BunchCrossing CDO"};
+
+
+  SG::ReadCondHandleKey<ILArPedestal> m_pedestalKey{this,"PedestalKey","LArPedestal","SG Key of LArPedestal object"};
+
   const ILArPedestal* m_larPedestal;
   const CaloDetDescrManager* m_caloDetDescrMgr;
   const LArOnlineID* m_onlineHelper;
diff --git a/LArCalorimeter/LArCafJobs/python/LArCafJobsConfig.py b/LArCalorimeter/LArCafJobs/python/LArCafJobsConfig.py
deleted file mode 100644
index c56c65cf178d596c7f41a999a237d57f1fbb245b..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArCafJobs/python/LArCafJobsConfig.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-from __future__ import print_function
-
-# -*- coding: utf-8 -*-
-from LArCafJobs.LArCafJobsConf import LArShapeDumperTool, LArShapeDumper
-from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker
-
-triggersToCheck = [ 'EF_g[0-9].*',  'EF_.*_larcalib', 'EF_e[0-9].*', 'EF_j[0-9].*', 'EF_fj[0-9].*' ]
-
-#FIXME: Auto-check number of samples
-
-class DefaultShapeDumperTool(LArShapeDumperTool) :
-  def __init__(self, name = 'LArShapeDumperTool', doShape = True) :
-    super(LArShapeDumperTool, self).__init__(name)
-
-    self.DoShape = doShape    
-    if doShape:
-      from LArConditionsCommon.LArCool import larcool
-      if larcool is not None:
-        nSamples=larcool.nSamples()
-      else:
-        print ("WARNING, can't determine number of samples for this run! Assume 4")
-        nSamples=4
-        
-      from AthenaCommon.AppMgr import ServiceMgr as svcMgr
-      svcMgr.PoolSvc.ReadCatalog += ["apcfile:poolcond/PoolCat_comcond_castor.xml"]
-      from IOVDbSvc.CondDB import conddb
-
-      #Run 1 version:
-      #conddb.addFolder('LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/5samples3bins17phases<tag>LARElecCalibOflShapeRTM5samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape5samples3bins17phases</key>')
-      if (nSamples>=5):
-        conddb.addFolder('LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/5samples3bins17phases<tag>LARElecCalibOflShapeRTM5samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>')
-      elif (nSamples==4):
-        conddb.addFolder('LAR_OFL', '/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases<tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>')
-      else:
-        print ("ERROR: Unexpected number of samples, got ",nSamples)
-        pass
-      pass
-    pass
-  pass
-
-class DefaultShapeDumper(LArShapeDumper) :
-
-  def __init__(self, name = 'LArShapeDumper', digitsKey = 'FREE', noiseSignifCut = 3,
-               doStream = False, doShape = True, doTrigger = True, doOFCIter = True, prescale = 1, 
-               triggerNames = triggersToCheck, caloType = 'EMHECFCAL', dumpChannelInfos = False,
-               addToAlgSeq = True) :
-    super(LArShapeDumper, self).__init__(name)
-
-    theDumperTool = DefaultShapeDumperTool(doShape=doShape)
-    self.LArShapeDumperTool = theDumperTool 
-
-    if doStream :
-      from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream
-      StreamLArSamples = AthenaPoolOutputStream('StreamLArSamples', 'LArSamples.root', True)
-      StreamLArSamples.MetadataItemList += ['LArSamplesContainer#Samples']
-      StreamLArSamples.WriteOnExecute = False
-      StreamLArSamples.WriteOnFinalize = True
-
-    self.CaloType = caloType
-    self.Prescale = prescale
-    self.NoiseSignifCut = noiseSignifCut
-    self.DoTrigger = doTrigger
-    self.DoStream = doStream
-    self.DoOFCIter = doOFCIter
-    self.DumpChannelInfos = dumpChannelInfos
-    self.DumpDisconnected = dumpChannelInfos
-    #self.ChannelsKey = 'LArRawChannels_FromDigits'
-    self.ChannelsKey = 'LArRawChannels'
-    self.TriggerNames = triggerNames
-
-    from AthenaCommon.AppMgr import ToolSvc
-    from LArRecUtils.LArADC2MeVToolDefault import LArADC2MeVToolDefault
-    theADC2MeVTool = LArADC2MeVToolDefault()
-    ToolSvc += theADC2MeVTool
-    self.ADC2MeVTool = theADC2MeVTool
-
-    if doShape :
-      from IOVDbSvc.CondDB import conddb
-      conddb.addFolder('LAR_OFL', '/LAR/ElecCalibOfl/AutoCorrs/AutoCorr<tag>LARElecCalibOflAutoCorrsAutoCorr-RUN2-UPD3-00</tag>')
-      # use the shapes without residual corrections by default (makes it easier to compute new residuals)
-      conddb.addOverride('/LAR/ElecCalibOfl/Shape/RTM/5samples1phase','LARElecCalibOflShapeRTM5samples1phase-RUN2-UPD1-04')
-    masker = LArBadChannelMasker('LArBadChannelMasker')
-    masker.DoMasking=True
-    masker.ProblemsToMask=[
-         'deadReadout', 'deadPhys',
-         'almostDead', 'short',
-         'highNoiseHG','highNoiseMG','highNoiseLG'
-           ]
-    self.BadChannelMasker = masker
-
-    self.DigitsKey = digitsKey
-
-    if doOFCIter :
-      from AthenaCommon.AppMgr import ToolSvc
-      if hasattr(ToolSvc, 'LArRawChannelBuilderToolOFCIter') :
-        ToolSvc.LArRawChannelBuilderToolOFCIter.StoreTiming = True
-
-    if addToAlgSeq :
-      from AthenaCommon.AlgSequence import AlgSequence
-      topSequence = AlgSequence()
-      topSequence += self
-      print (self)
-
-  def setDefaults(self, handle):
-    pass
diff --git a/LArCalorimeter/LArCafJobs/python/LArShapeDumperConfig.py b/LArCalorimeter/LArCafJobs/python/LArShapeDumperConfig.py
new file mode 100644
index 0000000000000000000000000000000000000000..38744b3b46a0ee65291ddc6571eb79f89e890f15
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/python/LArShapeDumperConfig.py
@@ -0,0 +1,105 @@
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
+from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
+from AthenaConfiguration.ComponentFactory import CompFactory 
+
+def LArShapeDumperCfg(flags):
+
+    result=ComponentAccumulator()
+
+    
+    from LArGeoAlgsNV.LArGMConfig import LArGMCfg
+    result.merge(LArGMCfg(flags))
+    from TileGeoModel.TileGMConfig import TileGMCfg
+    result.merge(TileGMCfg(flags))
+
+    #Setup cabling
+    from LArCabling.LArCablingConfig import LArOnOffIdMappingCfg
+    result.merge(LArOnOffIdMappingCfg(flags))
+
+    from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
+    result.merge(LArRawDataReadingCfg(flags))
+
+    from LArROD.LArRawChannelBuilderAlgConfig import LArRawChannelBuilderAlgCfg
+    result.merge(LArRawChannelBuilderAlgCfg(flags))
+    result.getEventAlgo("LArRawChannelBuilder").StoreTiming=True
+    
+    from LArCellRec.LArTimeVetoAlgConfig import LArTimeVetoAlgCfg
+    result.merge(LArTimeVetoAlgCfg(flags))
+
+    from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
+    result.merge(BunchCrossingCondAlgCfg(flags))
+    
+    from CaloTools.CaloNoiseCondAlgConfig import CaloNoiseCondAlgCfg
+    result.merge(CaloNoiseCondAlgCfg(flags,"totalNoise"))
+
+    from LArROD.LArFebErrorSummaryMakerConfig import LArFebErrorSummaryMakerCfg
+    result.merge(LArFebErrorSummaryMakerCfg(flags))
+    result.getEventAlgo("LArFebErrorSummaryMaker").CheckAllFEB=False
+
+    from IOVDbSvc.IOVDbSvcConfig import addFolders 
+    result.merge(addFolders(flags,
+                            '/LAR/ElecCalibOfl/Shape/RTM/4samples3bins17phases<tag>LARElecCalibOflShapeRTM4samples3bins17phases-RUN2-UPD3-00</tag><key>LArShape17phases</key>',
+                            'LAR_OFL'))
+
+    result.getService("PoolSvc").ReadCatalog += ["apcfile:poolcond/PoolCat_comcond_castor.xml"]
+
+    if flags.LArShapeDump.doTrigger:
+        from AthenaMonitoring.TriggerInterface import getTrigDecisionTool
+        result.merge(getTrigDecisionTool(flags))
+        result.getPublicTool("TrigDecisionTool").TrigConfigSvc="TrigConf::TrigConfigSvc/TrigConfigSvc"
+
+        from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1TriggerByteStreamDecoderCfg
+        result.merge(L1TriggerByteStreamDecoderCfg(flags))
+
+    
+    masker = CompFactory.LArBadChannelMasker('LArBadChannelMasker')
+    masker.DoMasking=True
+    masker.ProblemsToMask=[
+         'deadReadout', 'deadPhys',
+         'almostDead', 'short',
+         'highNoiseHG','highNoiseMG','highNoiseLG'
+    ]
+
+
+    result.merge(addFolders(flags,'/LAR/ElecCalibOfl/AutoCorrs/AutoCorr<tag>LARElecCalibOflAutoCorrsAutoCorr-RUN2-UPD3-00</tag>','LAR_OFL'))
+    result.getService("IOVDbSvc").overrideTags+=['<prefix>/LAR/ElecCalibOfl/Shape/RTM/5samples1phase</prefix><tag>LARElecCalibOflShapeRTM5samples1phase-RUN2-UPD1-04</tag>']
+
+    
+    dumperAlg=CompFactory.LArShapeDumper("LArShapeDumper")
+    dumperAlg.CaloType = flags.LArShapeDump.caloType
+    dumperAlg.Prescale = flags.LArShapeDump.prescale
+    dumperAlg.NoiseSignifCut = flags.LArShapeDump.noiseSignifCut
+    dumperAlg.DoTrigger = flags.LArShapeDump.doTrigger
+    dumperAlg.DoStream = flags.LArShapeDump.doStream
+    dumperAlg.DoOFCIter = flags.LArShapeDump.doOFCIter
+    dumperAlg.DumpChannelInfos = flags.LArShapeDump.dumpChannelInfos
+    dumperAlg.DumpDisconnected = False
+    dumperAlg.DigitsKey = flags.LArShapeDump.digitsKey
+    dumperAlg.BadChannelMasker = masker
+    dumperAlg.LArShapeDumperTool=CompFactory.LArShapeDumperTool(DoShape=True)
+    dumperAlg.FileName=flags.LArShapeDump.outputNtup
+    dumperAlg.TriggerNames = flags.LArShapeDump.triggerNames
+    result.addEventAlgo(dumperAlg)
+
+    if (flags.LArShapeDump.HECNoiseNtup!=""):
+        result.addEventAlgo(CompFactory.LArHECNoise())
+        result.addService(CompFactory.THistSvc(Output=["HEC DATAFILE='"+flags.LArShapeDump.HECNoiseNtup+"' OPT='RECREATE'",]))
+
+    return result
+
+
+if __name__=="__main__":
+    
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags
+    from LArShapeDumperFlags import addShapeDumpFlags
+    addShapeDumpFlags(ConfigFlags)
+    ConfigFlags.Input.Files=['/scratch/wlampl/data18_13TeV/data18_13TeV.00357750.physics_Main.daq.RAW._lb0102._SFO-2._0003.data']
+    ConfigFlags.LAr.ROD.forceIter=True
+
+    from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+    
+    cfg=MainServicesCfg(ConfigFlags)
+    cfg.merge(LArShapeDumperCfg(ConfigFlags))
+
+    cfg.run(10)
diff --git a/LArCalorimeter/LArCafJobs/python/LArShapeDumperFlags.py b/LArCalorimeter/LArCafJobs/python/LArShapeDumperFlags.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d1f4223526d019f15d61fbff372d66a7fe7d25
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/python/LArShapeDumperFlags.py
@@ -0,0 +1,24 @@
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
+_triggersToCheck = [ 'EF_g[0-9].*',  'EF_.*_larcalib', 'EF_e[0-9].*', 'EF_j[0-9].*', 'EF_fj[0-9].*' ]
+
+def addShapeDumpFlags(flags):
+    
+    flags.Input.isMC=False
+
+    flags.addFlag("LArShapeDump.digitsKey","FREE")
+    flags.addFlag("LArShapeDump.noiseSignifCut",3)
+    flags.addFlag("LArShapeDump.doShape",True)
+    flags.addFlag("LArShapeDump.doStream",False)
+    flags.addFlag("LArShapeDump.doTrigger",True)
+    flags.addFlag("LArShapeDump.doOFCIter",lambda prev: prev.LAr.ROD.forceIter)
+    flags.addFlag("LArShapeDump.prescale",1)
+    flags.addFlag("LArShapeDump.triggerNames",_triggersToCheck)
+    flags.addFlag("LArShapeDump.caloType","EMHECFCAL")
+    flags.addFlag("LArShapeDump.dumpChannelInfos",False)
+    flags.addFlag("LArShapeDump.outputNtup","out.root")
+    flags.addFlag("LArShapeDump.HECNoiseNtup","")
+    
+
+
+
diff --git a/LArCalorimeter/LArCafJobs/python/LArShapeDumperSkeleton.py b/LArCalorimeter/LArCafJobs/python/LArShapeDumperSkeleton.py
new file mode 100644
index 0000000000000000000000000000000000000000..499a270059eff92feaa1ad9450ef9ff22e648c80
--- /dev/null
+++ b/LArCalorimeter/LArCafJobs/python/LArShapeDumperSkeleton.py
@@ -0,0 +1,40 @@
+# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
+
+import sys
+
+from PyJobTransforms.CommonRunArgsToFlags import commonRunArgsToFlags
+from PyJobTransforms.TransformUtils import processPreExec, processPreInclude, processPostExec, processPostInclude
+from LArCafJobs.LArShapeDumperConfig import LArShapeDumperCfg
+from AthenaConfiguration.MainServicesConfig import MainServicesCfg
+
+
+def fromRunArgs(runArgs):
+    from AthenaConfiguration.AllConfigFlags import ConfigFlags    
+
+    from LArCafJobs.LArShapeDumperFlags import addShapeDumpFlags
+    addShapeDumpFlags(ConfigFlags)
+
+    commonRunArgsToFlags(runArgs, ConfigFlags)
+
+    processPreInclude(runArgs, ConfigFlags)
+    processPreExec(runArgs, ConfigFlags)
+
+    ConfigFlags.LAr.ROD.forceIter=True
+    ConfigFlags.Input.Files=runArgs.inputBSFile
+    ConfigFlags.LArShapeDump.outputNtup=runArgs.outputNTUP_SAMPLESMONFile
+
+    if hasattr(runArgs,"outputNTUP_HECNOISEFile"):
+        ConfigFlags.LArShapeDump.HECNoiseNtup=runArgs.outputNTUP_HECNOISEFile
+        
+
+    ConfigFlags.lock()
+    
+    cfg=MainServicesCfg(ConfigFlags)
+    cfg.merge(LArShapeDumperCfg(ConfigFlags))
+
+    processPostInclude(runArgs, ConfigFlags, cfg)
+    processPostExec(runArgs, ConfigFlags, cfg)
+
+    # Run the final accumulator
+    sc = cfg.run()
+    sys.exit(not sc.isSuccess())
diff --git a/LArCalorimeter/LArCafJobs/share/LArCAF_tf.py b/LArCalorimeter/LArCafJobs/share/LArCAF_tf.py
index 851f2996ab1db4b16719cf3429aea54b2c3a7c3c..3332fe1cf01e5091f6d5eb3e850533b7cd862622 100755
--- a/LArCalorimeter/LArCafJobs/share/LArCAF_tf.py
+++ b/LArCalorimeter/LArCafJobs/share/LArCAF_tf.py
@@ -14,7 +14,8 @@ import PyJobTransforms.trfArgClasses as trfArgClasses
 if __name__ == '__main__':
 
     executorSet = set()
-    executorSet.add(athenaExecutor(name = 'LArCAFcalib', skeletonFile = 'LArCafJobs/skeleton.LArCAF.py',
+    executorSet.add(athenaExecutor(name = 'LArCAFcalib', skeletonFile = None,
+                                   skeletonCA='LArCafJobs.LArShapeDumperSkeleton',
                                    substep = 'r2e', inData = ['BS',], outData = ['NTUP_SAMPLESMON','NTUP_HECNOISE']))
     
     trf = transform(executor = executorSet)  
diff --git a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py b/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
deleted file mode 100644
index 9b8a4e28718acdad576738572e802c1a39b60068..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArCafJobs/share/skeleton.LArCAF.py
+++ /dev/null
@@ -1,302 +0,0 @@
-# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
-
-import sys
-
-#  'conditionsTag', 'geometryVersion',
-#  'maxEvents', 'skipEvents', 'RunNumber', 
-
-#if not 'CafJobInputs' in dir():
-#    CafJobInputs=[["data11_7TeV.00189288.calibration_LArCells.daq.RAW._lb0000._SFO-10._0001.data"]]
-#    printfunc ("No input file given, use ",CafJobInputs[0])
-
-
-#if not 'CafJobOutputs' in dir():
-#    CafJobOutputs=["LArTiming.root"]
-
-from AthenaCommon.AppMgr import (theApp, ServiceMgr as svcMgr,ToolSvc)
-from AthenaCommon.AlgSequence import AlgSequence
-topSequence = AlgSequence()
-
-#############################################################33
-#include("LArConditionsCommon/LArMinimalSetup.py")
-
-
-
-from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
-from AthenaCommon.GlobalFlags import globalflags
-globalflags.DetGeo.set_Value_and_Lock('atlas')
-#globalflags.Luminosity.set_Value_and_Lock('zero')
-globalflags.DataSource.set_Value_and_Lock('data')
-globalflags.InputFormat.set_Value_and_Lock('bytestream')
-#globalflags.DatabaseInstance.set_Value_and_Lock('CONDBR2')
-athenaCommonFlags.BSRDOInput.set_Value_and_Lock(runArgs.inputBSFile)
-
-from RecExConfig.RecFlags import rec
-from RecExConfig.AutoConfiguration import GetProjectName,ConfigureTriggerStream
-rec.projectName=GetProjectName()
-rec.doWriteESD=False
-rec.doWriteAOD=False
-
-ConfigureTriggerStream()
-#printfunc (rec.triggerStream())
-
-from AthenaCommon.JobProperties import jobproperties
-if hasattr(runArgs,'geometryVersion'):
-    jobproperties.Global.DetDescrVersion = runArgs.geometryVersion
-else:
-    defaultGeoVersion="ATLAS-R2-2015-02-00-00"
-    printfunc ("No geometryVersion given, use default value of",defaultGeoVersion)
-    jobproperties.Global.DetDescrVersion = defaultGeoVersion
-    
-
-from AthenaCommon.DetFlags import DetFlags
-DetFlags.Calo_setOn()
-DetFlags.ID_setOff()
-DetFlags.Muon_setOff()
-DetFlags.Truth_setOff()
-DetFlags.LVL1_setOff()
-DetFlags.digitize.all_setOff()
-DetFlags.Print()
-
-if hasattr(runArgs,"preExec"):
-    recoLog.info("transform pre-exec")
-    for cmd in runArgs.preExec:
-        recoLog.info(cmd)
-        exec(cmd)
- 
- ## Pre-include
-if hasattr(runArgs,"preInclude"): 
-    for fragment in runArgs.preInclude:
-        include(fragment)
-
-
-#from RecExConfig.RecFlags import rec
-
-#if hasattr(runArgs,"InputBSFile"):
-athenaCommonFlags.BSRDOInput.set_Value_and_Lock(runArgs.inputBSFile)
-#athenaCommonFlags.FilesInput.set_Value_and_Lock(runArgs.inputBSFile)
-    #rec.readRDO.set_Value_and_Lock(true)
-
-from AtlasGeoModel import SetGeometryVersion
-from AtlasGeoModel import GeoModelInit
-from AtlasGeoModel import SetupRecoGeometry
-
-#Get identifier mapping
-include( "LArConditionsCommon/LArIdMap_comm_jobOptions.py" )
-include( "LArIdCnv/LArIdCnv_joboptions.py" )
-
-from ByteStreamCnvSvc import ReadByteStream
-###############################################################
-
-from LArConditionsCommon.LArCondFlags import larCondFlags 
-include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
-
-
-
-if not hasattr(runArgs,"conditionsTag") or runArgs.conditionsTag=="CURRENT":
-    printfunc ("Resolving 'CURRENT' express conditions tag ...")
-    sys.path.append('/afs/cern.ch/user/a/atlcond/utils/python/')
-    from AtlCoolBKLib import resolveAlias
-    resolver=resolveAlias()
-    currentGlobalES=resolver.getCurrentES().replace("*","ST")
-    printfunc ("Found ",currentGlobalES)
-    svcMgr.IOVDbSvc.GlobalTag=currentGlobalES
-else:
-    svcMgr.IOVDbSvc.GlobalTag=runArgs.conditionsTag
-#"COMCOND-BLKP-005-05"
-
-#Specify the input file(s)
-svcMgr.EventSelector.Input=athenaCommonFlags.BSRDOInput()
-if hasattr(runArgs,"skipEvents"):
-    svcMgr.EventSelector.SkipEvents=runArgs.skipEvents
-
-if hasattr(runArgs,"maxEvents"):
-    theApp.EvtMax=runArgs.maxEvents
-
-# Specify the object you want to read from ByteStream
-theByteStreamAddressProviderSvc = svcMgr.ByteStreamAddressProviderSvc
-theByteStreamAddressProviderSvc.TypeNames += ["LArDigitContainer/FREE"]
-theByteStreamAddressProviderSvc.TypeNames += ["LArFebHeaderContainer/LArFebHeader"]
-
-from xAODEventInfoCnv.xAODEventInfoCreator import xAODMaker__EventInfoCnvAlg
-topSequence+=xAODMaker__EventInfoCnvAlg()
-
-include("LArROD/LArFebErrorSummaryMaker_jobOptions.py")
-febSummaryMaker.CheckAllFEB=False
-
-from LArROD.LArRODConf import LArRawChannelBuilderDriver
-theLArRawChannelBuilder=LArRawChannelBuilderDriver("LArRawChannelBuilder")
-topSequence += theLArRawChannelBuilder
-# The first tool filters out bad channels
-from LArROD.LArRODConf import LArRawChannelBuilderToolBadChannelTool
-theLArRawChannelBuilderToolBadChannel=LArRawChannelBuilderToolBadChannelTool()
-from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelMasker
-theLArRCBMasker=LArBadChannelMasker("LArRCBMasker")
-theLArRCBMasker.DoMasking=True
-theLArRCBMasker.ProblemsToMask=[
-    "deadReadout","deadPhys","almostDead","short",
-    "lowNoiseHG","highNoiseHG","unstableNoiseHG",
-    "lowNoiseMG","highNoiseMG","unstableNoiseMG",
-    "lowNoiseLG","highNoiseLG","unstableNoiseLG"
-    ]
-ToolSvc+=theLArRCBMasker
-theLArRawChannelBuilderToolBadChannel.BadChannelMask=theLArRCBMasker
-theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolBadChannel,]#[theLArRawChannelBuilderToolBadChannel.getFullName()]
-ToolSvc+=theLArRawChannelBuilderToolBadChannel
-
-from LArROD.LArRODConf import LArRawChannelBuilderToolOFCIter
-theLArRawChannelBuilderToolOFCIter=LArRawChannelBuilderToolOFCIter()
-
-## # look for max in this range
-theLArRawChannelBuilderToolOFCIter.minSample = 2 
-theLArRawChannelBuilderToolOFCIter.maxSample = 12
-theLArRawChannelBuilderToolOFCIter.minADCforIterInSigma=3 # ADCmax at least 3 sigma above noise for iteration
-theLArRawChannelBuilderToolOFCIter.minADCforIter=15 # min adc for iteration (only if no pedestalRMS found)
-theLArRawChannelBuilderToolOFCIter.defaultPhase=12  # starting delay, also the fixed delay for ADC below min.
-theLArRawChannelBuilderToolOFCIter.StoreTiming=True
-theLArRawChannelBuilder.BuilderTools += [theLArRawChannelBuilderToolOFCIter,]#.getFullName()]
-ToolSvc += theLArRawChannelBuilderToolOFCIter
-
-
-from LArROD.LArRODConf import LArRawChannelBuilderPedestalDataBase
-theLArRawChannelBuilderPedestalDataBase=LArRawChannelBuilderPedestalDataBase()
-theLArRawChannelBuilderPedestalDataBase.LArPedestalKey = "Pedestal"
-theLArRawChannelBuilder.PedestalTools  = [theLArRawChannelBuilderPedestalDataBase,]#.getFullName()]
-ToolSvc += theLArRawChannelBuilderPedestalDataBase
-
-from LArRecUtils.LArADC2MeVToolDefault import LArADC2MeVToolDefault
-theLArADC2MeVTool=LArADC2MeVToolDefault("LArADC2MeVTool")
-ToolSvc+=theLArADC2MeVTool
-
-from LArROD.LArRODConf import LArRawChannelBuilderADC2EDataBase
-theLArRawChannelBuilderADC2EDataBase=LArRawChannelBuilderADC2EDataBase()
-theLArRawChannelBuilder.ADCtoEnergyTools  = [theLArRawChannelBuilderADC2EDataBase,]#.getFullName()]
-theLArRawChannelBuilderADC2EDataBase.ADC2MeVTool = theLArADC2MeVTool
-ToolSvc += theLArRawChannelBuilderADC2EDataBase
-
-from LArRecUtils.LArRecUtilsConf import LArOFPeakRecoTool
-theLArOFPeakRecoTool=LArOFPeakRecoTool()
-theLArOFPeakRecoTool.UseShape=True 
-ToolSvc += theLArOFPeakRecoTool
-
-
-include("LArCellRec/LArTimeVetoAlg_jobOptions.py")
-
-
-####################
-from TriggerJobOpts.TriggerFlags import TriggerFlags as tf
-tf.readBS=True
-tf.doID=False
-
-# trigger configuration
-from TriggerJobOpts.TriggerConfigGetter import TriggerConfigGetter
-cfg = TriggerConfigGetter()
-
-from TriggerJobOpts.Lvl1ResultBuilderGetter import Lvl1ResultBuilderGetter
-lvl1 = Lvl1ResultBuilderGetter()
-
-from TriggerJobOpts.HLTTriggerResultGetter import ByteStreamUnpackGetter
-bsu=ByteStreamUnpackGetter()
-
-# TDT
-from AthenaCommon.AppMgr import ToolSvc
-from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
-tdt = Trig__TrigDecisionTool("TrigDecisionTool")
-ToolSvc += tdt
-
-from TrigDecisionMaker.TrigDecisionMakerConfig import WriteTrigDecision
-trigDecWriter = WriteTrigDecision()
-
-
-#This tool is apparently instanciated by TrkDetElementSurface/ DetElementSurfaceCnv_p1.h
-from TrkEventCnvTools import TrkEventCnvToolsConf
-EventCnvSuperTool = TrkEventCnvToolsConf.Trk__EventCnvSuperTool('EventCnvSuperTool')
-EventCnvSuperTool.DoMuons = False
-EventCnvSuperTool.DoID = False
-ToolSvc += EventCnvSuperTool
-
-###################
-
-
-
-from TrigBunchCrossingTool.BunchCrossingTool import BunchCrossingTool
-
-svcMgr.ByteStreamAddressProviderSvc.TypeNames += [
-    "MuCTPI_RDO/MUCTPI_RDO",
-    "CTP_RDO/CTP_RDO",
-    'HLT::HLTResult/HLTResult_L2',
-    'HLT::HLTResult/HLTResult_EF',
-    ]
-
-theApp.HistogramPersistency = "ROOT"
-from GaudiSvc.GaudiSvcConf import THistSvc
-svcMgr += THistSvc()
-
-if hasattr(runArgs,"outputNTUP_SAMPLESMONFile"):
-    from CaloTools.CaloNoiseCondAlg import CaloNoiseCondAlg
-    CaloNoiseCondAlg(noisetype="totalNoise")
-    from LArCafJobs.LArCafJobsConfig import DefaultShapeDumper
-    DefaultShapeDumper('LArShapeDumper', 'FREE', noiseSignifCut = 5, doShape = True, doTrigger = True, caloType = 'EMHECFCAL')
-    topSequence.LArShapeDumper.TrigDecisionTool=tdt
-    topSequence.LArShapeDumper.FileName=runArgs.outputNTUP_SAMPLESMONFile
-    topSequence.LArShapeDumper.OutputLevel=DEBUG
-    topSequence.LArShapeDumper.BunchCrossingTool=BunchCrossingTool()
-
-    if ("Empty" in rec.triggerStream()):
-       printfunc ("LArCellsEmpty: Process only empty bunch crossings")
-       topSequence.LArShapeDumper.onlyEmptyBC=True 
-
-    svcMgr.THistSvc.Output += ["AANT DATAFILE='"+runArgs.outputNTUP_SAMPLESMONFile+"' OPT='RECREATE'"]
-
-if hasattr(runArgs,"outputNTUP_HECNOISEFile"):
-    from LArCafJobs.LArCafJobsConf import LArHECNoise
-    topSequence += LArHECNoise('LArHECNoise')
-    #topSequence.LArHECNoise.OutputLevel=DEBUG
-    svcMgr.THistSvc.Output += ["HEC DATAFILE='"+runArgs.outputNTUP_HECNOISEFile+"' OPT='RECREATE'"]
-
-
-from AthenaServices.AthenaServicesConf import AthenaEventLoopMgr
-svcMgr += AthenaEventLoopMgr()
-svcMgr.AthenaEventLoopMgr.EventPrintoutInterval = 100
-
-
-theAuditorSvc = svcMgr.AuditorSvc
-theAuditorSvc.Auditors  += [ "ChronoAuditor"]
- 
-#svcMgr.ChronoStatSvc.ChronoDestinationCout = True
-
-svcMgr.ChronoStatSvc.PrintUserTime     = True
-svcMgr.ChronoStatSvc.PrintSystemTime   = True
-svcMgr.ChronoStatSvc.PrintEllapsedTime = True
-#svcMgr.ChronoStatSvc.NumberOfSkippedEventsForMemStat = 1
-
-#svcMgr.ChronoStatSvc.AsciiStatsOutputFile = "chronoStats.ascii"
-
-#svcMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True
-
-theApp.AuditAlgorithms = True
-
-
-
-
-svcMgr.MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
-#svcMgr.MessageSvc.defaultLimit = 9999999  # all messages
-#svcMgr.MessageSvc.useColors = False
-#svcMgr.MessageSvc.OutputLevel=DEBUG
-
-#svcMgr.StoreGateSvc.Dump=True
-#svcMgr.ToolSvc.OutputLevel=DEBUG
-
-## Post-include
-if hasattr(runArgs,"postInclude"): 
-    for fragment in runArgs.postInclude:
-        include(fragment)
- 
-## Post-exec
-if hasattr(runArgs,"postExec"):
-    printfunc ("transform post-exec")
-    for cmd in runArgs.postExec:
-        printfunc (cmd)
-        exec(cmd)
-    
-
diff --git a/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx b/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx
index bac20ab7e2f88878be8544dd91bb00e6a679aa1a..45a1e4c13a65215ac3a0c56a504a2476b3a3e5be 100644
--- a/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx
+++ b/LArCalorimeter/LArCafJobs/src/LArHECNoise.cxx
@@ -92,8 +92,7 @@ LArHECNoise::LArHECNoise(const std::string& name,
     m_nt_z(0),
     m_nt_r(0),
     m_nt_ped(0),
-    m_nt_pedRMS(0),
-    m_ped(nullptr)
+    m_nt_pedRMS(0)
  {
 
    // Trigger
@@ -106,8 +105,8 @@ LArHECNoise::LArHECNoise(const std::string& name,
    declareProperty("MinDigitADC",m_MinDigitADC=20);
    declareProperty("MaxDeltaT",m_MaxDeltaT=5);
 
-    m_nt_prescale = new float(m_TriggerLines.size());
-    m_nt_trigger = new bool(m_TriggerLines.size());
+    m_nt_prescale = new float[m_TriggerLines.size()];
+    m_nt_trigger = new bool[m_TriggerLines.size()];
  }
 
 
@@ -122,6 +121,7 @@ StatusCode LArHECNoise::initialize() {
   ATH_CHECK(m_trigDec.retrieve());
   
   ATH_CHECK( m_cablingKey.initialize() );
+  ATH_CHECK( m_pedKey.initialize() );
 
   // Retrieve online ID helper
   const LArOnlineID* LArOnlineIDHelper = nullptr;
@@ -225,8 +225,14 @@ StatusCode LArHECNoise::execute() {
      return StatusCode::FAILURE;
   }
 
-  // retrieve pedestals
-  ATH_CHECK( detStore()->retrieve(m_ped,"Pedestal") );
+
+  SG::ReadCondHandle<ILArPedestal> pedHdl{m_pedKey};
+  const ILArPedestal* ped{*pedHdl};
+  if(!ped) {
+     ATH_MSG_ERROR("Do not have pedestal object " << m_pedKey.key() );
+     return StatusCode::FAILURE;
+  }
+
 
   const LArDigitContainer* ld = 0;
   if (evtStore()->contains<LArDigitContainer>("LArDigitContainer")) {
@@ -279,8 +285,8 @@ StatusCode LArHECNoise::execute() {
               m_nt_gain = pLArDigit->gain();
               Identifier oid = cabling->cnvToIdentifier(hid);
               m_nt_OID = pLArDigit->channelID().get_compact();
-              m_nt_ped = m_ped->pedestal(pLArDigit->channelID(),pLArDigit->gain());
-              m_nt_pedRMS = m_ped->pedestalRMS(pLArDigit->channelID(),pLArDigit->gain());
+              m_nt_ped = ped->pedestal(pLArDigit->channelID(),pLArDigit->gain());
+              m_nt_pedRMS = ped->pedestalRMS(pLArDigit->channelID(),pLArDigit->gain());
               m_nt_side = m_calocell_id->pos_neg(oid);
               m_nt_samp = m_calocell_id->sampling(oid);
               m_nt_reg = m_calocell_id->region(oid);
diff --git a/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx b/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx
index 660a5cd1ba4877a8427dfca8cd9575996743f698..f9b9912b5a28d5869467ab8fb23fe17fd1e82445 100755
--- a/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx
+++ b/LArCalorimeter/LArCafJobs/src/LArShapeDumper.cxx
@@ -5,9 +5,7 @@
 #include "LArCafJobs/LArShapeDumper.h"
 #include "StoreGate/StoreGateSvc.h"
 #include "LArRawEvent/LArDigit.h"
-#include "GaudiKernel/IToolSvc.h"
 #include "GaudiKernel/INTupleSvc.h"
-#include "GaudiKernel/MsgStream.h"
 #include "LArRawEvent/LArOFIterResultsContainer.h"
 #include "LArRawEvent/LArFebErrorSummary.h"
 #include "LArElecCalib/ILArPedestal.h"
@@ -17,7 +15,6 @@
 #include "LArRawConditions/LArShapeComplete.h"
 #include "LArRawConditions/LArAutoCorrComplete.h"
 #include "LArRecConditions/ILArBadChannelMasker.h"
-#include "LArElecCalib/ILArADC2MeVTool.h"
 
 #include "CaloDetDescr/CaloDetDescrManager.h"
 #include "CaloDetDescr/CaloDetDescriptor.h"
@@ -52,13 +49,9 @@ LArShapeDumper::LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocat
   m_nPrescaledAway(0),
   m_nLArError(0),
   m_nNoDigits(0),
-  m_dumperTool("LArShapeDumperTool"),
   m_badChannelMasker("BadChannelMasker", this),
-  m_adc2mevTool("LArADC2MeVTool"),
   m_trigDec("Trig::TrigDecisionTool/TrigDecisionTool"),
   m_configSvc("TrigConf::TrigConfigSvc/TrigConfigSvc", name),
-  m_bcidTool("BunchCrossingTool"),
-  m_larPedestal(nullptr),
   m_caloDetDescrMgr(nullptr),
   m_onlineHelper(nullptr),
   m_doEM(false),
@@ -79,8 +72,6 @@ LArShapeDumper::LArShapeDumper(const std::string & name, ISvcLocator * pSvcLocat
   declareProperty("Gains", m_gainSpec = "HIGH,MEDIUM,LOW");
   declareProperty("DumpDisconnected", m_dumpDisc = false);
   declareProperty("BadChannelMasker", m_badChannelMasker);
-  declareProperty("ADC2MeVTool", m_adc2mevTool);
-  declareProperty("BunchCrossingTool",m_bcidTool);
   declareProperty("DoStream", m_doStream = false);
   declareProperty("DoTrigger", m_doTrigger = true);
   declareProperty("DoOFCIter", m_doOFCIter = true);
@@ -108,9 +99,11 @@ StatusCode LArShapeDumper::initialize()
   ATH_CHECK( m_cablingKey.initialize() );
   ATH_CHECK( m_BCKey.initialize() );
   ATH_CHECK( m_noiseCDOKey.initialize() );
+  ATH_CHECK( m_adc2mevKey.initialize() );
+  ATH_CHECK( m_pedestalKey.initialize() );
+  ATH_CHECK( m_bcDataKey.initialize() );
 
   ATH_CHECK( m_badChannelMasker.retrieve() );
-  ATH_CHECK( m_adc2mevTool.retrieve() );
   ATH_CHECK( detStore()->retrieve(m_onlineHelper, "LArOnlineID") );
   ATH_CHECK( detStore()->retrieve(m_caloDetDescrMgr) );
 
@@ -135,8 +128,8 @@ StatusCode LArShapeDumper::initialize()
   m_gains[CaloGain::LARMEDIUMGAIN] = (m_gainSpec.find("MEDIUM") != std::string::npos);
   m_gains[CaloGain::LARLOWGAIN]    = (m_gainSpec.find("LOW")    != std::string::npos);
   
-  if (m_onlyEmptyBC)
-    ATH_CHECK(m_bcidTool.retrieve());
+  //if (m_onlyEmptyBC)
+  //ATH_CHECK(m_bcidTool.retrieve());
 
   return StatusCode::SUCCESS; 
 }
@@ -218,7 +211,7 @@ StatusCode LArShapeDumper::start()
 StatusCode LArShapeDumper::execute()
 {    
   m_count++;
-
+  const EventContext& ctx = Gaudi::Hive::currentContext();
   if ((m_prescale > 1 && m_random.Rndm() > 1.0/m_prescale) || m_prescale <= 0) {
     ATH_MSG_VERBOSE ( "======== prescaling event "<< m_count << " ========" );
     m_nPrescaledAway++;
@@ -236,21 +229,30 @@ StatusCode LArShapeDumper::execute()
   int bunchId   = eventInfo->bcid();
 
   
-  if (m_onlyEmptyBC) {
-    const Trig::IBunchCrossingTool::BunchCrossingType bcType=m_bcidTool->bcType(bunchId);
-    if (bcType!=Trig::IBunchCrossingTool::BunchCrossingType::Empty) {
-      ATH_MSG_DEBUG("Ignoring Event with bunch crossing type " << bcType);
-      m_nWrongBunchGroup++;
-      return StatusCode::SUCCESS;
-    }
-  }
-
   if (eventInfo->errorState(xAOD::EventInfo::LAr)==xAOD::EventInfo::Error) {
     ATH_MSG_DEBUG("Ignoring Event b/c of LAr ERROR");
     m_nLArError++;
     return StatusCode::SUCCESS;
   }
 
+
+  SG::ReadCondHandle<BunchCrossingCondData> bccd (m_bcDataKey,ctx);
+  const BunchCrossingCondData* bunchCrossing=*bccd;
+  if (!bunchCrossing) {
+    ATH_MSG_ERROR("Failed to retrieve Bunch Crossing obj");
+    return StatusCode::FAILURE;
+  }
+  
+
+  if (m_onlyEmptyBC) {
+    if (!bccd->isFilled(bunchId)) {
+      ATH_MSG_DEBUG("Ignoring Event with bunch crossing type ");
+      m_nWrongBunchGroup++;
+      return StatusCode::SUCCESS;
+    }
+   }
+
+
   EventData* eventData = 0;
   int eventIndex = -1;
   if (m_doAllEvents) {
@@ -273,8 +275,7 @@ StatusCode LArShapeDumper::execute()
   const LArRawChannelContainer* rawChannelContainer = 0;
   ATH_CHECK( evtStore()->retrieve(rawChannelContainer, m_channelsKey) );
   
-  ATH_CHECK( detStore()->retrieve(m_larPedestal) );
-
+  
   SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
   const LArOnOffIdMapping* cabling=*cablingHdl;
   if(!cabling) {
@@ -282,6 +283,20 @@ StatusCode LArShapeDumper::execute()
      return StatusCode::FAILURE;
   }
 
+  SG::ReadCondHandle<LArADC2MeV> adc2mevHdl(m_adc2mevKey, ctx);
+  const LArADC2MeV* adc2MeV=*adc2mevHdl;
+  if(!adc2MeV) {
+     ATH_MSG_ERROR( "Failed to retreive ADC2MeV cond obj" );
+     return StatusCode::FAILURE;
+  }
+
+  SG::ReadCondHandle<ILArPedestal> pedHdl(m_pedestalKey, ctx);
+  const ILArPedestal* pedestals=*pedHdl;
+  if (!pedestals) {
+    ATH_MSG_ERROR("Failed to retrieve pedestal cond obj");
+     return StatusCode::FAILURE;
+  }
+  
   const LArOFIterResultsContainer* ofIterResult = 0;
   if (m_doOFCIter) {
     ATH_CHECK( evtStore()->retrieve(ofIterResult, "LArOFIterResult") );
@@ -365,8 +380,8 @@ StatusCode LArShapeDumper::execute()
     if (!connected && !m_dumpDisc) continue;
    
     // Check ADCMax selection
-    float pedestal = m_larPedestal->pedestal(channelID, gain);
-    float pedestalRMS = m_larPedestal->pedestalRMS(channelID, gain);
+    float pedestal = pedestals->pedestal(channelID, gain);
+    float pedestalRMS = pedestals->pedestalRMS(channelID, gain);
     if (m_minADCMax > 0 || m_noiseSignifCut > 0) {
       const std::vector<short>& samples = (*digit)->samples();
       double maxValue = -1;
@@ -395,7 +410,7 @@ StatusCode LArShapeDumper::execute()
     unsigned int status = 0xFFFFFFFF;
     if (connected) {
       if (!caloDetElement) caloDetElement = m_caloDetDescrMgr->get_element(id);
-      noise = noiseCDO->getNoise(channelID,gain);
+      noise = noiseCDO->getNoise(id,gain);
       status = bcCont->status(channelID).packedData();
       HWIdentifier febId = m_onlineHelper->feb_Id(m_onlineHelper->feedthrough_Id(channelID), m_onlineHelper->slot(channelID));
       std::map<unsigned int,uint16_t>::const_iterator findError = febErrorMap.find(febId.get_identifier32().get_compact());
@@ -443,7 +458,7 @@ StatusCode LArShapeDumper::execute()
 //           << " not found. (size was " << ofcResultPosition.size() << ")" << endmsg;
     
    
-    const std::vector<float>& ramp=m_adc2mevTool->ADC2MEV(channelID,gain); //dudu
+    const auto ramp=adc2MeV->ADC2MEV(channelID,gain); //dudu
     data->setADCMax(rawChannel->energy()/ramp[1]); //pow(ADCPeak,i); //dudu
 	    
 
diff --git a/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py b/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py
index 2aa7f03a3acbfee9e3a624a4f36bd97a81cb9e3a..5045d9a47e68c2b6c6de5d785fd6f57064bc02bc 100644
--- a/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py
+++ b/LArCalorimeter/LArROD/python/LArRawChannelBuilderDefault.py
@@ -4,7 +4,7 @@ from LArROD.LArRODFlags import larRODFlags
 from AthenaCommon.GlobalFlags import globalflags
 from LArByteStream.LArByteStreamConf import LArRawDataReadingAlg
 
-def LArRawChannelBuilderDefault():
+def LArRawChannelBuilderDefault(forceIter=False):
     from AthenaCommon.AlgSequence import AlgSequence
     topSequence = AlgSequence()
 
@@ -17,11 +17,15 @@ def LArRawChannelBuilderDefault():
 
         LArADC2MeVCondAlgDefault()
 
-        from LArConditionsCommon.LArRunFormat import getLArFormatForRun
-        from RecExConfig.AutoConfiguration import GetRunNumber
-        runNum = GetRunNumber()
-        lri=getLArFormatForRun(runNum)
-        if lri is not None and lri.runType() is not None and lri.runType()==0:
+        if not forceIter:
+            from LArConditionsCommon.LArRunFormat import getLArFormatForRun
+            from RecExConfig.AutoConfiguration import GetRunNumber
+            runNum = GetRunNumber()
+            lri=getLArFormatForRun(runNum)
+            if lri is not None and lri.runType() is not None and lri.runType()==0:
+                forceIter=True
+                
+        if forceIter:
            from LArROD.LArRODConf import LArRawChannelBuilderIterAlg
            theLArRawChannelBuilder=LArRawChannelBuilderIterAlg()
            theLArRawChannelBuilder.minSample=2
@@ -29,8 +33,8 @@ def LArRawChannelBuilderDefault():
            theLArRawChannelBuilder.minADCforIterInSigma=4
            theLArRawChannelBuilder.minADCforIter=15
            theLArRawChannelBuilder.defaultPhase=12
-           from AthenaCommon.Constants import DEBUG
-           theLArRawChannelBuilder.OutputLevel=DEBUG
+           #from AthenaCommon.Constants import DEBUG
+           #theLArRawChannelBuilder.OutputLevel=DEBUG
         else:
            from LArROD.LArRODConf import LArRawChannelBuilderAlg
            theLArRawChannelBuilder=LArRawChannelBuilderAlg()