diff --git a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
index d6238ea04d7d2447c40ab6e78b7afbc335cda88d..d95db880597d087d6632d6e769d8b54c4548acaa 100644
--- a/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
+++ b/Calorimeter/CaloCondPhysAlgs/CMakeLists.txt
@@ -19,6 +19,8 @@ atlas_depends_on_subdirs( PUBLIC
                           LArCalorimeter/LArCabling
                           LArCalorimeter/LArElecCalib
                           LArCalorimeter/LArIdentifier
+                          LArCalorimeter/LArRecUtils
+                          LArCalorimeter/LArTools
                           Trigger/TrigAnalysis/TrigDecisionTool
                           PRIVATE
                           Calorimeter/CaloConditions
@@ -47,5 +49,5 @@ atlas_add_component( CaloCondPhysAlgs
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
-atlas_install_scripts( share/CaloRescaleNoiseHV.sh share/CaloNoise_fillDB.py share/CaloPedestalShift.sh share/CaloPedestal_fillDB.py )
+atlas_install_scripts( share/CaloRescaleNoiseHV.sh share/CaloNoise_fillDB.py share/CaloPedestalShift.sh share/CaloPedestal_fillDB.py share/CaloScaleNoise_jobOptions.py )
 
diff --git a/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/LArHVMapTool.h b/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/LArHVMapTool.h
new file mode 100644
index 0000000000000000000000000000000000000000..1b30d744984d63213352084e2784580988b4b438
--- /dev/null
+++ b/Calorimeter/CaloCondPhysAlgs/CaloCondPhysAlgs/LArHVMapTool.h
@@ -0,0 +1,52 @@
+/*
+  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+*/
+#ifndef LARHVMAPTOOL_H
+#define LARHVMAPTOOL_H
+
+#include "GaudiKernel/ToolHandle.h"
+#include "StoreGate/DataHandle.h"
+#include "AthenaBaseComps/AthAlgTool.h"
+
+#include "LArCabling/LArHVCablingTool.h"
+
+class CaloDetDescrManager;
+class Identifier;
+class CaloIdManager;
+class LArEM_ID;
+class LArHEC_ID;
+class LArFCAL_ID;
+//class LArHVCablingTool;
+
+static const InterfaceID IID_LArHVMapTool("LArHVMapTool", 1 ,0);
+
+class LArHVMapTool: public AthAlgTool
+{
+
+     public:
+          LArHVMapTool(const std::string& type, const std::string& name,
+                                      const IInterface* parent);
+
+          virtual ~LArHVMapTool(){};
+
+          static const InterfaceID& interfaceID() { return IID_LArHVMapTool; }
+
+          virtual StatusCode initialize();
+          virtual StatusCode execute();
+          virtual StatusCode finalize(){return StatusCode::SUCCESS;}
+
+
+          std::vector<int> GetHVLines(const Identifier& id);
+
+     private:
+
+          const DataHandle<CaloIdManager> m_caloIdMgr;
+          const DataHandle<CaloDetDescrManager> m_calodetdescrmgr;
+          const LArEM_ID* m_larem_id;
+          const LArHEC_ID* m_larhec_id;
+          const LArFCAL_ID* m_larfcal_id;
+
+          ToolHandle<LArHVCablingTool> m_hvCablingTool;
+};
+
+#endif
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloCellPosition2Ntuple.py b/Calorimeter/CaloCondPhysAlgs/share/CaloCellPosition2Ntuple.py
index 800d421804e58fd27a9cd8454f4d6f82dc24d757..4d5f3e63de683b1373b73fa69c6df25682bb8e29 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloCellPosition2Ntuple.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloCellPosition2Ntuple.py
@@ -71,7 +71,7 @@ svcMgr.IOVDbSvc.GlobalTag = GlobalTag
 
 from IOVDbSvc.CondDB import conddb
 conddb.blockFolder("/LAR/LArCellPositionShift")
-conddb.addFolder("","<dbConnection>"+InputDB+"</dbConnection>"+Folder+"<tag>"+FolderTag+"</tag>")
+conddb.addFolder("","<dbConnection>"+InputDB+"</dbConnection>"+Folder+"<tag>"+FolderTag+"</tag>",True)
 #--------------------------------------------------------------
 # Private Application Configuration options
 #--------------------------------------------------------------
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloFillCellPositionShift.py b/Calorimeter/CaloCondPhysAlgs/share/CaloFillCellPositionShift.py
index 6c0385ad5d51931da732fae981dcd11afc571be4..d8a7200c6c68d332a06136029a11d026a7454abf 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloFillCellPositionShift.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloFillCellPositionShift.py
@@ -71,6 +71,7 @@ include( "TileIdCnv/TileIdCnv_jobOptions.py" )
 include( "LArDetDescr/LArDetDescr_joboptions.py" )
 include("TileConditions/TileConditions_jobOptions.py" )
 include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
+conddb.blockFolder("/LAR/LArCellPositionShift")
 
 conddb.blockFolder("/LAR/LArCellPositionShift")
 
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloNoise2Ntuple_data.py b/Calorimeter/CaloCondPhysAlgs/share/CaloNoise2Ntuple_data.py
index 57dc3836e40df3cb675184c34325f9a321390f61..b272eccf19df896d9085998da90333c610274a83 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloNoise2Ntuple_data.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloNoise2Ntuple_data.py
@@ -69,9 +69,6 @@ include( "LArDetDescr/LArDetDescr_joboptions.py" )
 include("TileConditions/TileConditions_jobOptions.py" )
 include("LArConditionsCommon/LArConditionsCommon_comm_jobOptions.py")
 
-if "folderTag" in dir():
-   conddb.addOverride("/LAR/NoiseOfl/CellNoise",folderTag)
-
 svcMgr.IOVDbSvc.GlobalTag = GlobalTag
 
 from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
@@ -79,6 +76,12 @@ theCaloNoiseTool = CaloNoiseToolDefault()
 theCaloNoiseTool.RescaleForHV=False
 ToolSvc += theCaloNoiseTool
 
+if "dbNoise" in dir():
+   conddb.addMarkup("/LAR/NoiseOfl/CellNoise","<db>"+dbNoise+"</db>")
+
+if "folderTag" in dir():
+   conddb.addOverride("/LAR/NoiseOfl/CellNoise",folderTag)
+
 #--------------------------------------------------------------
 # Private Application Configuration options
 #--------------------------------------------------------------
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloNoise_fillDB.py b/Calorimeter/CaloCondPhysAlgs/share/CaloNoise_fillDB.py
index 611140da64d9f8fc12b1d1fc2178ddb907d5d9d1..a216f27de34e4fe93326cb449c27dc9cefc28185 100755
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloNoise_fillDB.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloNoise_fillDB.py
@@ -7,7 +7,7 @@ def usage():
    print "Syntax for UPD4 open-end IoV noise update"
    print " The first parameter is the run number of IoV start, the second parameter is the lumiblock number for IoV start"
    print " The third and fourth parameter are the Run/lb for IoV end (if run is -1, uses open ended IoV)"
-   print " The fith parameter is the upd4 tag name"
+   print " The fifth parameter is the upd4 tag name"
    print " The sixth parameter is input text file name (default calonoise.txt)"
    print " The seventh parameter is output sqlite file name (default caloSqlite.db)"
    print " The eigth parameter is output DB  name (default CONDBR2)"
@@ -25,12 +25,15 @@ lbkSince = sys.argv[2]
 runUntil = sys.argv[3]
 lbkUntil = sys.argv[4]
 tag = sys.argv[5]
-if len(sys.argv)>=6:
+if len(sys.argv)>6:
    inputFile=sys.argv[6]
 else:
    inputFile="calonoise.txt"
+
 if len(sys.argv)>7:
    filename=sys.argv[7]
+else:
+   filename="larnoisesqlite.db"
 
 if len(sys.argv)>8:
    dbname=sys.argv[8]
@@ -43,8 +46,8 @@ else:
    folderPath = "/LAR/NoiseOfl/CellNoise"
 
 if len(sys.argv)>10:
-   mu = int(sys.argv[10])
-else:
+   mu = int(sys.argv[10]
+else:         
    mu = -1
 
 if len(sys.argv)>11:
@@ -52,10 +55,16 @@ if len(sys.argv)>11:
 else:
    dt = -1
 
+if len(sys.argv)>11:
+   dt = int(sys.argv[11])
+else:
+   dt = -1
+
 
 print "input:  ",inputFile
 print "runUntil ", runUntil, lbkUntil
 print "output:",filename
+print "input:  ",inputFile
 
 import ROOT
 import cppyy
@@ -187,6 +196,13 @@ try:
               noiseB /= math.sqrt(mu/29.*10.) 
         pass
         flt.setData(hash,gain,0,noiseA)
+        if mu > 0 and dt > 0:
+           # new normalization
+           if dt > 25:
+              noiseB /= math.sqrt(mu/53.*10.)
+           else:
+              noiseB /= math.sqrt(mu/29.*10.) 
+        pass
         flt.setData(hash,gain,1,noiseB)
         
     #=== write to DB
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloRescaleNoise_online_jobOptions.py b/Calorimeter/CaloCondPhysAlgs/share/CaloRescaleNoise_online_jobOptions.py
index 71b5204507f3b1c160fe369a6d32e039d75e8b38..321fb2f8ad85f36c17da60ac1fa398311b3a1a74 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloRescaleNoise_online_jobOptions.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloRescaleNoise_online_jobOptions.py
@@ -40,10 +40,10 @@ if "RunNumberOld" not in dir():
 
 
 if "GlobalTag" not in dir():
-    GlobalTag =  'COMCOND-BLKPA-2014-02'
+    GlobalTag =  'COMCOND-BLKPA-2017-09'
 
 if "Geometry" not in dir():
-    Geometry = 'ATLAS-R2-2015-02-00-00'
+    Geometry = 'ATLAS-R2-2015-04-00-00'
 
 from RecExConfig.RecFlags import rec
 rec.RunNumber.set_Value_and_Lock(int(RunNumberOld))
diff --git a/Calorimeter/CaloCondPhysAlgs/share/CaloScaleNoise_jobOptions.py b/Calorimeter/CaloCondPhysAlgs/share/CaloScaleNoise_jobOptions.py
index 6b9434d5b48761a48ff805e8aeb78865637fec95..3cd9d0945acbb2f663db80e002c4dccf102934a2 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/CaloScaleNoise_jobOptions.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/CaloScaleNoise_jobOptions.py
@@ -54,10 +54,10 @@ if "dt" not in dir():
 print "Using dt: ",dt
 
 if "GlobalTag" not in dir():
-    GlobalTag =  'COMCOND-BLKPA-2015-05'
+    GlobalTag =  'COMCOND-BLKPA-2017-09'
 
 if "Geometry" not in dir():
-    Geometry = 'ATLAS-R2-2015-02-00-00'
+    Geometry = 'ATLAS-R2-2015-04-00-00'
 
 from RecExConfig.RecFlags import rec
 rec.RunNumber.set_Value_and_Lock(int(RunNumberOld))
@@ -120,12 +120,19 @@ if "sqliteHVCorr" in dir():
    conddb.addMarkup("/LAR/ElecCalibFlat/HVScaleCorr","<db>sqlite://;schema="+sqliteHVCorr+";dbname=CONDBR2</db>")
 
 if mu==0:
-   conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc0_25ns")
+   #conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc0_25ns")
+   # for 2017:
+   conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise-mc16-ofc25mc15mu0-25ns-A3MinBias_1phi_v2")
 else:   
    if dt==25:
-      conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc25mu20_25ns")
+      #conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc25mu20_25ns")
+      # for the 2017 running:
+      conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise-mc16-ofc25mc15mu20-25ns-A3MinBias_1phi_v2")
    else:   
-      conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc25mu20_50ns")
+      #conddb.addOverride("/LAR/NoiseOfl/CellNoise","LARNoiseOflCellNoisenoise_2015_ofc25mu20_50ns")
+      # not possible for 2017:
+      print "Could not handle 50ns in 2017"
+      sys.exit(-1)
 
 from CaloTools.CaloNoiseToolDefault import CaloNoiseToolDefault
 theCaloNoiseTool = CaloNoiseToolDefault()
diff --git a/Calorimeter/CaloCondPhysAlgs/share/EMB-EMEC_PS_Energy_Rescale.py b/Calorimeter/CaloCondPhysAlgs/share/EMB-EMEC_PS_Energy_Rescale.py
index 17897ba4822cce069fadc36a9a2175683aec0a32..5ce33f1185f1a8effb2057721d450b809d63597e 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/EMB-EMEC_PS_Energy_Rescale.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/EMB-EMEC_PS_Energy_Rescale.py
@@ -9,13 +9,14 @@ sqlite="EMB-EMEC_PS_CellEnergyCorrection.db"
 
 # write here the run number and lumiblock of a time after temperature drop
 
-RunNumber = 212393
+RunNumber = 275429
 LumiBlock = 1
 
 #LastRunNumber = 999999
 
-GlobalTag =  'COMCOND-ES1PA-006-02'
-Geometry = 'ATLAS-GEO-18-00-00'
+#GlobalTag =  'COMCOND-ES1PA-006-02'
+GlobalTag =  'CONDBR2-ES1PA-2017-09'
+Geometry = 'ATLAS-R2-2015-04-00-00'
 
 from RecExConfig.RecFlags import rec
 rec.RunNumber.set_Value_and_Lock(RunNumber)
@@ -23,7 +24,7 @@ rec.RunNumber.set_Value_and_Lock(RunNumber)
 from PyCool import cool
 from CoolConvUtilities.AtlCoolLib import indirectOpen
 
-trigDB=indirectOpen('COOLONL_TRIGGER/COMP200',oracle=True)
+trigDB=indirectOpen('COOLONL_TRIGGER/CONDBR2',oracle=True)
 trigfolder=trigDB.getFolder('/TRIGGER/LUMI/LBLB')
 runiov=(RunNumber << 32)+ LumiBlock
 print " runiov ", runiov
@@ -144,7 +145,7 @@ theOutputConditionsAlg.LB1 = 1
 #theOutputConditionsAlg.Run2 = LastRunNumber + 1
 #theOutputConditionsAlg.LB2 = 0
 	
-svcMgr.IOVDbSvc.dbConnection  = "sqlite://;schema="+sqlite+";dbname=COMP200"
+svcMgr.IOVDbSvc.dbConnection  = "sqlite://;schema="+sqlite+";dbname=CONDBR2"
 from RegistrationServices.RegistrationServicesConf import IOVRegistrationSvc
 svcMgr += IOVRegistrationSvc()
 svcMgr.IOVRegistrationSvc.RecreateFolders = True #Allow add in a second tag
diff --git a/Calorimeter/CaloCondPhysAlgs/share/EMB_EMEC_PS_HV_Energy_Rescale.py b/Calorimeter/CaloCondPhysAlgs/share/EMB_EMEC_PS_HV_Energy_Rescale.py
index b26a2cca97f4f139de0853b2641875c059785446..6b91080b522d88fadc8421ccda3de7b0f260c4e8 100644
--- a/Calorimeter/CaloCondPhysAlgs/share/EMB_EMEC_PS_HV_Energy_Rescale.py
+++ b/Calorimeter/CaloCondPhysAlgs/share/EMB_EMEC_PS_HV_Energy_Rescale.py
@@ -9,13 +9,13 @@ sqlite="EMB_EMEC_PS_800HV_CellEnergyCorrection.db"
 
 # write here the run number and lumiblock of a time after temperature drop
 
-RunNumber = 212588
+RunNumber = 274936
 LumiBlock = 1
 
 #LastRunNumber = 999999
 
-GlobalTag =  'COMCOND-ES1PA-006-02'
-Geometry = 'ATLAS-GEO-18-00-00'
+GlobalTag =  'CONDBR2-ES1PA-2017-09'
+Geometry = 'ATLAS-R2-2015-04-00-00'
 
 from RecExConfig.RecFlags import rec
 rec.RunNumber.set_Value_and_Lock(RunNumber)
@@ -23,7 +23,7 @@ rec.RunNumber.set_Value_and_Lock(RunNumber)
 from PyCool import cool
 from CoolConvUtilities.AtlCoolLib import indirectOpen
 
-trigDB=indirectOpen('COOLONL_TRIGGER/COMP200',oracle=True)
+trigDB=indirectOpen('COOLONL_TRIGGER/CONDBR2',oracle=True)
 trigfolder=trigDB.getFolder('/TRIGGER/LUMI/LBLB')
 runiov=(RunNumber << 32)+ LumiBlock
 print " runiov ", runiov
@@ -107,6 +107,10 @@ theRescaler.HVvalues = [ 0.992, 0.992, 0.992, 0.992, 0.992, 0.992, 0.992, 0.992,
 
 topSequence += theRescaler
 
+from CaloCondPhysAlgs.CaloCondPhysAlgsConf import LArHVMapTool
+theLArHV=LArHVMapTool("LArHVMapTool")
+ToolSvc += theLArHV
+
 #--------------------------------------------------------------
 #--- Dummy event loop parameters
 #--------------------------------------------------------------
@@ -146,7 +150,7 @@ theOutputConditionsAlg.LB1 = 1
 #theOutputConditionsAlg.Run2 = LastRunNumber + 1
 #theOutputConditionsAlg.LB2 = 0
 	
-svcMgr.IOVDbSvc.dbConnection  = "sqlite://;schema="+sqlite+";dbname=COMP200"
+svcMgr.IOVDbSvc.dbConnection  = "sqlite://;schema="+sqlite+";dbname=CONDBR2"
 from RegistrationServices.RegistrationServicesConf import IOVRegistrationSvc
 svcMgr += IOVRegistrationSvc()
 svcMgr.IOVRegistrationSvc.RecreateFolders = True #Allow add in a second tag
diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
index a4f1d71692960f0d160635d3d29cd4329783f4c5..7bd889ca070967e5ab5ff70c37c4581d87270e17 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellCalcEnergyCorr.cxx
@@ -34,7 +34,7 @@
 #include "CoolKernel/types.h"
 #include "CoolKernel/Record.h"
 #include "CoralBase/AttributeListSpecification.h"
-
+#include "CaloCondPhysAlgs/LArHVMapTool.h"
 
 CaloCellCalcEnergyCorr::CaloCellCalcEnergyCorr( const std::string& name, 
 						ISvcLocator* pSvcLocator ) : 
diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx
index 3ab1be2fd49dd4a6b447c869b7c90c6b3f7f372f..915af88dd21f1e111c013318438883de28ff20b4 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellNoiseAlg.cxx
@@ -491,8 +491,8 @@ StatusCode CaloCellNoiseAlg::fitNoise()
           for (int phi=phimin;phi<=phimax;phi++) {
             Identifier id2 = m_calo_id->cell_id(regionId,eta,phi);
             if (id2.is_valid()) {
-              if(msgLvl(MSG::DEBUG))
-                msg() << MSG::DEBUG << "     cell in ring " << m_calo_id->show_to_string(id2) ;
+               if(msgLvl(MSG::DEBUG))
+                 msg() << MSG::DEBUG << "     cell in ring " << m_calo_id->show_to_string(id2) ;
                IdentifierHash idHash2 = m_calo_id->calo_cell_hash(id2);
                int index = (int)(idHash2);
                if (index>=0 && index<m_ncell) {
diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx
index 667e626eb6103807712ef6d54743c8cfee62dff9..5e290612b3216e31281b2a6a74a6305e78fe40b7 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.cxx
@@ -25,6 +25,7 @@ CaloCellPosition2Ntuple::CaloCellPosition2Ntuple(const std::string& name, ISvcLo
   m_dx(0),
   m_dy(0),
   m_dz(0),
+  m_volume(0), 
   m_tree(NULL)
 {
   declareProperty("inputKey",m_key,"Key for CaloCellPositionShift");
@@ -57,6 +58,7 @@ StatusCode CaloCellPosition2Ntuple::initialize()
   m_tree->Branch("dx",&m_dx,"DeltaX/F");
   m_tree->Branch("dy",&m_dy,"DeltaY/F");
   m_tree->Branch("dz",&m_dz,"DeltaZ/F");
+  m_tree->Branch("volume",&m_volume,"volume/F");
 
   ATH_CHECK( m_thistSvc->regTree("/file1/cellpos/mytree",m_tree) );
 
@@ -105,6 +107,7 @@ StatusCode CaloCellPosition2Ntuple::stop()
        m_dx = m_cellPos->deltaX(i);
        m_dy = m_cellPos->deltaY(i);
        m_dz = m_cellPos->deltaZ(i);
+       m_volume = calodde->volume();
 
        m_tree->Fill();
 
diff --git a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h
index 36ddf23c40eef1c8b0f3c8109bd7099e584117fb..341db36bfe2f9d090644056074717bbf42d3caf5 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h
+++ b/Calorimeter/CaloCondPhysAlgs/src/CaloCellPosition2Ntuple.h
@@ -63,6 +63,7 @@ class CaloCellPosition2Ntuple : public AthAlgorithm {
   float m_dx;
   float m_dy;
   float m_dz;
+  float m_volume;
   TTree* m_tree;
 
 };
diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArHVMapTool.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArHVMapTool.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..454b11b7b6f979ecb253990dcfff9c5a60a28900
--- /dev/null
+++ b/Calorimeter/CaloCondPhysAlgs/src/LArHVMapTool.cxx
@@ -0,0 +1,169 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "CaloCondPhysAlgs/LArHVMapTool.h"
+#include "CaloDetDescr/CaloDetDescrManager.h"
+#include "CaloDetDescr/CaloDetectorElements.h"
+#include "CaloIdentifier/LArEM_ID.h"
+#include "CaloIdentifier/LArHEC_ID.h"
+#include "CaloIdentifier/LArFCAL_ID.h"
+#include "CaloIdentifier/CaloIdManager.h"
+
+#include "LArHV/EMBHVElectrode.h"
+#include "LArHV/EMBPresamplerHVModule.h"
+#include "LArHV/EMECHVElectrode.h"
+#include "LArHV/EMECPresamplerHVModule.h"
+#include "LArHV/HECHVSubgap.h"
+#include "LArHV/FCALHVLine.h"
+#include "LArReadoutGeometry/EMECCell.h"
+#include "LArReadoutGeometry/HECCell.h"
+#include "LArReadoutGeometry/EMBCell.h"
+#include "LArReadoutGeometry/FCALTile.h"
+#include "LArReadoutGeometry/EMBCellConstLink.h"
+#include "LArReadoutGeometry/EMECCellConstLink.h"
+#include "LArReadoutGeometry/HECCellConstLink.h"
+#include "LArReadoutGeometry/FCALTubeConstLink.h"
+
+#include "LArHV/LArHVManager.h"
+
+
+
+LArHVMapTool::LArHVMapTool(const std::string& type, const std::string& name, const IInterface* parent)
+  : AthAlgTool(type,name,parent)
+     {
+     declareInterface<LArHVMapTool>( this );
+     }
+
+StatusCode LArHVMapTool::initialize(){
+
+  CHECK(detStore()->retrieve(m_caloIdMgr));
+
+  m_larem_id   = m_caloIdMgr->getEM_ID();
+  m_larhec_id   = m_caloIdMgr->getHEC_ID();
+  m_larfcal_id   = m_caloIdMgr->getFCAL_ID();
+
+  CHECK(detStore()->retrieve(m_calodetdescrmgr));
+
+
+   return StatusCode::SUCCESS;
+}
+
+StatusCode LArHVMapTool::execute() {
+
+
+  CHECK(m_hvCablingTool.retrieve());
+
+  IdentifierHash h=0;
+  Identifier offId;
+  m_larem_id->get_id(h,offId);
+  std::vector<int> hvlineId = GetHVLines(offId);
+  //std::cout<<"LArHVMapTool::execute "<<offId.getString()<<" : "<<hvlineId.size()<<std::endl;
+  //if(hvlineId.size()>0) std::cout<<hvlineId[0]<<std::endl;
+
+   return StatusCode::SUCCESS;
+}
+
+
+std::vector<int> LArHVMapTool::GetHVLines(const Identifier& id) {
+  std::set<int> hv;
+
+  int counter=0;
+  // LAr EMB
+  if (m_larem_id->is_lar_em(id) && m_larem_id->sampling(id)>0) {
+    if (abs(m_larem_id->barrel_ec(id))==1) {
+      const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(m_calodetdescrmgr->get_element(id));
+      if (embElement) {
+	const EMBCellConstLink cell = embElement->getEMBCell();
+	unsigned int nelec = cell->getNumElectrodes();
+	for (unsigned int i=0;i<nelec;i++) {
+	  const EMBHVElectrode& electrode = cell->getElectrode(i);
+	  for (unsigned int igap=0;igap<2;igap++) {
+	    hv.insert(electrode.hvLineNo(igap));
+	  }
+	}
+      }
+      else {
+	ATH_MSG_ERROR( "Failed d'cast to EMBDetectorElement" );
+      }
+    } else { // LAr EMEC
+      const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(m_calodetdescrmgr->get_element(id));
+      if (emecElement) {
+	const EMECCellConstLink cell = emecElement->getEMECCell();
+	unsigned int nelec = cell->getNumElectrodes();
+	for (unsigned int i=0;i<nelec;i++) {
+	  const EMECHVElectrode& electrode = cell->getElectrode(i);
+	  for (unsigned int igap=0;igap<2;igap++) hv.insert(electrode.hvLineNo(igap));
+	}
+      }
+      else {
+	ATH_MSG_ERROR( "Failed d'cast to EMECDetectorElement" );
+      }
+    } 
+  } else if (m_larhec_id->is_lar_hec(id)) { // LAr HEC
+    const HECDetectorElement* hecElement = dynamic_cast<const HECDetectorElement*>(m_calodetdescrmgr->get_element(id));
+    if (hecElement) {
+      const HECCellConstLink cell = hecElement->getHECCell();
+      unsigned int nsubgaps = cell->getNumSubgaps();
+      for (unsigned int igap=0;igap<nsubgaps;igap++) {
+	const HECHVSubgap& subgap = cell->getSubgap(igap);
+	hv.insert(subgap.hvLineNo());
+      }
+    }
+    else {
+      ATH_MSG_ERROR( "Failed d'cast to HECDetectorElement" );
+    }
+  } else if (m_larfcal_id->is_lar_fcal(id)) { // LAr FCAL
+    const FCALDetectorElement* fcalElement = dynamic_cast<const FCALDetectorElement*>(m_calodetdescrmgr->get_element(id));
+    if (fcalElement) {
+      const FCALTile* tile = fcalElement->getFCALTile();
+      unsigned int nlines = tile->getNumHVLines();
+      unsigned int nlines_found=0;
+      for (unsigned int i=0;i<nlines;i++) {
+	const FCALHVLine* line = tile->getHVLine(i);
+	if (line) nlines_found++;
+      }
+      if ( nlines_found>0 ) {
+	for (unsigned int i=0;i<nlines;i++) {
+	  const FCALHVLine* line = tile->getHVLine(i);
+	  if (!line) continue;
+	  hv.insert(line->hvLineNo());
+	}
+      }
+    }
+    else {
+      ATH_MSG_ERROR( "Failed d'cast to FCALDetectorElement" );
+    }
+ 
+  } else if (m_larem_id->is_lar_em(id) && m_larem_id->sampling(id)==0) { // Presamplers
+    if (abs(m_larem_id->barrel_ec(id))==1) {
+      const EMBDetectorElement* embElement = dynamic_cast<const EMBDetectorElement*>(m_calodetdescrmgr->get_element(id));
+      if (embElement) {
+	const EMBCellConstLink cell = embElement->getEMBCell();
+	const EMBPresamplerHVModule& hvmodule = cell->getPresamplerHVModule();
+	for (unsigned int igap=0;igap<2;igap++) hv.insert(hvmodule.hvLineNo(igap));
+      }
+      else {
+	ATH_MSG_ERROR( "Failed d'cast to EMBDetectorElement (for presampler)" );
+      }
+    } else {
+      const EMECDetectorElement* emecElement = dynamic_cast<const EMECDetectorElement*>(m_calodetdescrmgr->get_element(id));
+      if (emecElement) {
+	const EMECCellConstLink cell = emecElement->getEMECCell();
+	const EMECPresamplerHVModule& hvmodule = cell->getPresamplerHVModule ();
+	for (unsigned int igap=0;igap<2;igap++) hv.insert(hvmodule.hvLineNo(igap));
+      }
+      else {
+	ATH_MSG_ERROR( "Failed d'cast to EMECDetectorElement (for presampler)" );
+      }
+    }
+  }
+
+  std::vector<int> hvlines;
+  for (std::set<int>::iterator i=hv.begin();i!=hv.end();++i) hvlines.push_back(*i);
+  //std::cout<<"LArHVMapTool hvlines size: "<<hvlines.size()<<std::endl;
+  //if(hvlines.size()>0) std::cout<<hvlines[0]<<std::endl;
+  return hvlines;
+}
+
+
diff --git a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
index c397d4c9e48c963b8dbc6cf16b1c17899da6c6de..5236823be771143aa16ab4f98699d5fab1676e1a 100644
--- a/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
+++ b/Calorimeter/CaloCondPhysAlgs/src/LArMinBiasAlg.cxx
@@ -51,6 +51,8 @@
     m_tree->Branch("ncell",&m_nsymcell,"ncell/I");
     m_tree->Branch("nevt_total",&m_nevt_total,"nevt_total/I");
     m_tree->Branch("identifier",m_identifier,"identifier[ncell]/I");
+    m_tree->Branch("region",m_region,"region[ncell]/I");
+    m_tree->Branch("ieta",m_ieta,"ieta[ncell]/I");
     m_tree->Branch("layer",m_layer,"layer[ncell]/I");
     m_tree->Branch("region",m_region,"region[ncell]/I");
     m_tree->Branch("ieta",m_ieta,"ieta[ncell]/I");
@@ -157,6 +159,8 @@
            const CaloDetDescrElement* calodde = m_calodetdescrmgr->get_element(id);
            cell.eta =  calodde->eta();
            cell.phi = calodde->phi();
+           cell.region = m_calo_id->region(id);
+           cell.ieta = m_calo_id->eta(id);
            cell.layer = m_calo_id->calo_sample(id);
            cell.region = m_calo_id->region(id);
            cell.ieta = m_calo_id->eta(id);
@@ -171,7 +175,7 @@
         }
       }
       ATH_MSG_INFO(" --- number of symmetric cells found " << nsym << " " << m_CellList.size());
-      if (nsym>=MAX_SYM_CELLS) ATH_MSG_ERROR(" More than allowed number of symmetric cells... Fix array size for ntuple writing !!!! ");
+      if (nsym>=MAX_SYM_CELLS) ATH_MSG_ERROR(" More than "<<MAX_SYM_CELLS<<" number of symmetric cells... Fix array size for ntuple writing !!!! ");
       m_nsymcell=nsym;
       m_first=false;
     }
diff --git a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelMasker.h b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelMasker.h
index 819f62e4f487eeddeba8fbf1057d48f7ee51bece..33343df3000da94a4f90c3739781b766501c3c19 100644
--- a/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelMasker.h
+++ b/LArCalorimeter/LArBadChannelTool/LArBadChannelTool/LArBadChannelMasker.h
@@ -81,8 +81,8 @@ inline bool LArBadChannelMasker::statusShouldBeMasked(const LArBadChannel& cellS
    if(cellStatus.good())
       return false;
 
-//   log << MSG::VERBOSE << "gain: " << gain << " bitMask: 0x" << MSG::hex << m_bitMask 
-//      << " cellStatus: 0x" << cellStatus.packedData() << MSG::dec << endmsg; 
+   ATH_MSG_VERBOSE( "gain: " << gain << " bitMask: 0x" << MSG::hex << m_bitMask 
+      << " cellStatus: 0x" << cellStatus.packedData() << MSG::dec ); 
 
    if (gain==CaloGain::LARHIGHGAIN) 
       return (m_bitMask & cellStatus.packedData() & m_highGainMask) != 0;
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py b/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
index 6d83c860580d327ab0641ae064c95e5fc50bfc29..259c3cbd4748d4133aa5021e2ef2367b621dc5a3 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArBadChannel2Ascii.py
@@ -4,12 +4,15 @@ if 'OutputFile' not in dir():
 if 'DBInstance' not in dir():
    DBInstance="CONDBR2"
 
+if 'DBString' not in dir():
+   DBString="<db>COOLOFL_LAR/"
+
 if 'sqlite' in dir():
     dbStr="<db>sqlite://;schema="+sqlite+";dbname="+DBInstance+"</db>"
     if not 'tag' in dir():
         tag="LARBadChannelsOflBadChannels-UPD4-00"
 else:
-    dbStr="<db>COOLOFL_LAR/"+DBInstance+"</db>"
+    dbStr=DBString+DBInstance+"</db>"
 
 if 'tag' in dir():
     tagStr="<tag>"+tag+"</tag>"
@@ -22,6 +25,8 @@ if not 'IOVEndRun' in dir():
 if not 'IOVEndLB' in dir():
    IOVEndLB = -1
 
+if not 'folderStr' in dir():
+   folderStr="/LAR/BadChannelsOfl/BadChannels"
 
 if not 'ExecutiveSummaryFile' in dir():
     ExecutiveSummaryFile=""
@@ -32,10 +37,11 @@ import AthenaCommon.AtlasUnixGeneratorJob
 from AthenaCommon.GlobalFlags import  globalflags
 globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
-globalflags.DatabaseInstance=DBInstance
+if 'OFLP' not in DBInstance:
+   globalflags.DatabaseInstance=DBInstance
 	
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArBadChannelDBAlg.py b/LArCalorimeter/LArBadChannelTool/share/LArBadChannelDBAlg.py
index eea8f1b47b1b65ca03c51a7304b485aaec2b9c29..44be3b5836701d5d22b241280651fc3e8a9096f7 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArBadChannelDBAlg.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArBadChannelDBAlg.py
@@ -33,10 +33,11 @@ import AthenaCommon.AtlasUnixGeneratorJob
 from AthenaCommon.GlobalFlags import  globalflags
 globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
-globalflags.DatabaseInstance=DBInstance
+if "OFLP" not in DBInstance:
+   globalflags.DatabaseInstance=DBInstance
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-01"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArBuildMissingFebDB.sh b/LArCalorimeter/LArBadChannelTool/share/LArBuildMissingFebDB.sh
index 2e61266e64487821f57e9a7a343f675d13935056..6898328a1c8bb8bdab9b5939cf1b1c11442efedd 100755
--- a/LArCalorimeter/LArBadChannelTool/share/LArBuildMissingFebDB.sh
+++ b/LArCalorimeter/LArBadChannelTool/share/LArBuildMissingFebDB.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [[ $# < 2 ]];
+if [[ $# < 4 ]];
 then
-  echo "Syntax: $0 [-append] [-offline] [-onerun] <Run> <LB> File1 File2 ..."
+  echo "Syntax: $0 [-append] [-offline] [-onerun] <Run> <LBb> <LBe> File1 File2 ..."
   exit
 fi
 
@@ -60,6 +60,17 @@ else
     exit
 fi
 
+if [ $onerun == 1 ]
+then
+  if echo $1 | grep -q "^[0-9]*$";
+  then
+    lbnumbere=$1
+    shift
+  else
+    echo "ERROR: Expected a lumi-block-number, got $1"
+    exit
+  fi
+fi
 
 if ! which AtlCoolCopy.exe 1>/dev/null 2>&1
 then
@@ -119,7 +130,7 @@ done
 #Get UPD4-nn tag connected to 'current':
 echo "Resolving current folder-level tag suffix for /LAR/BadChannelsOfl/MissingFEBs...."
 fulltag=`getCurrentFolderTag.py "COOLOFL_LAR/CONDBR2" /LAR/BadChannelsOfl/MissingFEBs` 
-upd4TagName=`echo $fulltag | grep -o "UPD4-[0-9][0-9]"` 
+upd4TagName=`echo $fulltag | grep -o "RUN2-UPD4-[0-9][0-9]"` 
 echo "Found $upd4TagName"
 
 
@@ -140,8 +151,10 @@ if [ $? -ne 0 ];  then
 fi
 
 if [ $onerun -eq 1 ]; then
- prefix=$[ $runnumber + 1]
- prefix="IOVEndRun=${prefix};IOVEndLB=0;"
+ #prefix=$[ $runnumber + 1]
+ #prefix="IOVEndRun=${prefix};IOVEndLB=0;"
+ endlb=$[ $lbnumbere + 1]
+ prefix="IOVEndRun=${runnumber};IOVEndLB=$endlb;"
 else 
  prefix=""
 fi
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebDbAlg.py b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebDbAlg.py
index e22f069465ca5406ebb25d7225bcbbf06e70846d..b80fbfe66006b44a5a5af45665185b6251f0407f 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebDbAlg.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebDbAlg.py
@@ -35,7 +35,7 @@ globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
 	
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-01"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
@@ -65,7 +65,7 @@ svcMgr.EventSelector.RunNumber         =  IOVBeginRun
 svcMgr.EventSelector.FirstEvent        = 1
 #svcMgr.EventSelector.InitialTimeStamp  = 0
 #svcMgr.EventSelector.TimeStampInterval = 5
-svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2016-04"
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2017-04"
 
 
 ## get a handle to the default top-level algorithm sequence
diff --git a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
index 3bb5952a731a16701158b2c384aca10dd3b28538..99754e768f01e82bbb9f4d2a2e3f1e0cb70c9f32 100644
--- a/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
+++ b/LArCalorimeter/LArBadChannelTool/share/LArMissingFebs2Ascii.py
@@ -30,7 +30,7 @@ globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
 	
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-03-01-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
@@ -76,7 +76,7 @@ condSeq += theCLI
 import StoreGate.StoreGateConf as StoreGateConf
 svcMgr += StoreGateConf.StoreGateSvc("ConditionStore")
 
-svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2014-01"
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2017-04" 
 
 from LArBadChannelTool.LArBadFebAccess import LArBadFebAccess
 LArBadFebAccess(dbString="/LAR/BadChannelsOfl/MissingFEBs"+dbStr+tagStr)
diff --git a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
index da227b24599e54551fb5eb5b7b46506e6d495f99..d02e4fd3a8e1342eb7e0e30308b3e47271b49b44 100644
--- a/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
+++ b/LArCalorimeter/LArBadChannelTool/src/LArBadChannelDecoder.cxx
@@ -96,8 +96,7 @@ HWIdentifier LArBadChannelDecoder::constructChannelId( const std::vector<int>& i
     return hwid;
   } 
   catch( LArOnlID_Exception& idException) {
-    log << MSG::ERROR << "Failed to produce a HWIdentifier for ";  insertExpandedID( intVec, log);
-    log << endmsg;
+    log << MSG::ERROR << "Failed to produce a HWIdentifier for ";  insertExpandedID( intVec, log) << endmsg;
   }
   return invalid;
 }
diff --git a/LArCalorimeter/LArCalibTools/CMakeLists.txt b/LArCalorimeter/LArCalibTools/CMakeLists.txt
index 4264fce1759b78a52330bcdd238d701e0589d486..8096dffc99ef9ff7a26e982b8ef8a638bd67db15 100644
--- a/LArCalorimeter/LArCalibTools/CMakeLists.txt
+++ b/LArCalorimeter/LArCalibTools/CMakeLists.txt
@@ -21,6 +21,8 @@ atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaKernel
                           Database/AthenaPOOL/AthenaPoolUtilities
                           Event/EventInfo
+                          Trigger/TrigAnalysis/TrigDecisionTool
+                          LumiBlock/LumiBlockData
                           LArCalorimeter/LArCOOLConditions
                           LArCalorimeter/LArRawEvent
                           LArCalorimeter/LArTools )
@@ -34,7 +36,7 @@ atlas_add_component( LArCalibTools
                      src/*.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier LArRawConditions LArRecConditions CaloCondBlobObjs AthenaKernel AthenaPoolUtilities EventInfo LArCOOLConditions LArRawEvent LArToolsLib )
+                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} CaloIdentifier AthenaBaseComps StoreGateLib SGtests GaudiKernel LArCablingLib LArIdentifier LumiBlockData LArRawConditions LArRecConditions CaloCondBlobObjs AthenaKernel TrigDecisionTool AthenaPoolUtilities EventInfo LArCOOLConditions LArRawEvent LArToolsLib )
 
 # Install files from the package:
 atlas_install_headers( LArCalibTools )
diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h
index 9eb8d2c3ecbd6da5de02b4a70cd6441a11aa73e6..3721e0d34787884f22613f0a662eb0fc85b0ebf0 100644
--- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h
+++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArCond2NtupleBase.h
@@ -65,7 +65,6 @@ class LArCond2NtupleBase : public AthAlgorithm {
   
   NTuple::Item<float> m_FEBTemp1, m_FEBTemp2;
 
-  MsgStream* m_log;
 
   StoreGateSvc* m_detStore; 
   const LArEM_Base_ID* m_emId;
diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArDSPConfig2Ntuple.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArDSPConfig2Ntuple.h
index 4463714239327d4e20329d995380c4cb0a33470d..463839d9f76b55e8ac6b895d8a9fa3b6a8b0d729 100644
--- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArDSPConfig2Ntuple.h
+++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArDSPConfig2Ntuple.h
@@ -24,8 +24,9 @@ class LArDSPConfig2Ntuple : public LArCond2NtupleBase
    std::string m_folder;
 
    NTuple::Item<short> m_peakSample;
+   NTuple::Item<short> m_useHgIntercept;
    NTuple::Item<short> m_useMgIntercept;
- 
+   NTuple::Item<short> m_useLgIntercept;
 };
 
 #endif
diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArFillDSPConfig.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArFillDSPConfig.h
index 3a6f5368e5b6b99f447e8f7b57cbd0fe6f5b12cb..efc0c9d20e64cbf34be65b9b37848c4cab011235 100644
--- a/LArCalorimeter/LArCalibTools/LArCalibTools/LArFillDSPConfig.h
+++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArFillDSPConfig.h
@@ -40,6 +40,7 @@ class LArFillDSPConfig: public AthAlgorithm
 
   std::string m_folderName;
   bool m_dump;
+  bool m_lowmu;
 }; 
 
 #endif 
diff --git a/LArCalorimeter/LArCalibTools/LArCalibTools/LArPulseShape.h b/LArCalorimeter/LArCalibTools/LArCalibTools/LArPulseShape.h
new file mode 100644
index 0000000000000000000000000000000000000000..a39633c8e6070264625d4580fea578e9f3ff1fd9
--- /dev/null
+++ b/LArCalorimeter/LArCalibTools/LArCalibTools/LArPulseShape.h
@@ -0,0 +1,135 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARPULSESHAPE_H
+#define LARPULSESHAPE_H
+
+#include "AthenaBaseComps/AthAlgorithm.h"
+#include "GaudiKernel/NTuple.h"
+
+#include "xAODEventInfo/EventInfo.h"
+#include "LArElecCalib/ILArFEBTempTool.h"
+#include "LArCalibTools/LArCond2NtupleBase.h"
+
+#include "CaloIdentifier/CaloIdManager.h"
+#include "CaloIdentifier/CaloCell_ID.h"
+#include "TrigDecisionTool/TrigDecisionTool.h"
+#include <iostream>
+#include "TProfile.h"
+#include "TH1.h"
+
+#include "LumiBlockData/LuminosityCondData.h"
+#include "LArRawEvent/LArDigitContainer.h"
+#include "LArCabling/LArOnOffIdMapping.h"
+#include "LArRecConditions/LArBadChannelCont.h"
+#include "LumiBlockData/LuminosityCondData.h"
+#include "LArElecCalib/ILArPedestal.h"
+#include "StoreGate/ReadCondHandleKey.h"
+
+class HWIdentifier;
+class LArOnlineID_Base;
+class StoreGateSvc;
+class LArEM_Base_ID;
+class LArHEC_Base_ID;
+class LArFCAL_Base_ID;
+class CaloCell_ID;
+
+class LArPulseShape : public AthAlgorithm {
+
+ public:
+  LArPulseShape(const std::string & name, ISvcLocator * pSvcLocator);
+  ~LArPulseShape();
+
+  //Standard algo methods
+  virtual StatusCode initialize() override;
+  virtual StatusCode execute() override; 
+  //Finalize needs to be implemented by the deriving class
+  virtual StatusCode stop() override;
+
+ std::map<std::string, TProfile*>::const_iterator TEffbegin() const { return m_effhistos.begin(); }
+ std::map<std::string, TProfile*>::const_iterator TEffend()   const { return m_effhistos.end(); }
+ std::map<int, TProfile*>::const_iterator TCellbegin() const { return m_cellHistos.begin(); }
+ std::map<int, TProfile*>::const_iterator TCellend()   const { return m_cellHistos.end(); } 
+ 
+ std::map<std::string, TH1*>::const_iterator THbegin() const { return m_histos.begin(); }
+ std::map<std::string, TH1*>::const_iterator THend()   const { return m_histos.end(); }
+
+ private:
+   bool m_initialized;
+   std::string m_ntname; 
+   std::string m_folder;
+   const CaloCell_ID*       m_calo_id;
+   NTuple::Item<short> m_peakSample;
+   NTuple::Item<short> m_useHgIntercept;
+   NTuple::Item<short> m_useMgIntercept;
+   NTuple::Item<short> m_useLgIntercept;
+   long m_event;
+   const DataHandle<CaloIdManager> m_caloIdMgr;
+   int m_OffId;  
+   int m_OffId_conv;     
+   const char * m_id_char;  
+   int m_isample;
+   int m_mindist;
+   int m_closestBC;
+
+   ToolHandle<Trig::TrigDecisionTool> m_trigDec;  
+
+   SG::ReadCondHandleKey<LuminosityCondData> m_lumiDataKey{this,"LumiKey", "LuminosityCondData","SG Key of LuminosityCondData object"};  
+   SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
+   SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
+   SG::ReadHandleKey<xAOD::EventInfo> m_evtInfoKey { this, "EventInfo", "EventInfo", "" };
+
+   const ILArPedestal* m_larPedestal;
+
+   std::map<std::string, TProfile*> m_effhistos;  
+   std::map<int, TProfile*> m_cellHistos;     
+   TProfile* m_TProfpulse; 
+   TProfile* m_TProfpulse_diff;    
+   std::map<std::string, TH1*> m_histos;
+   TProfile** m_cellsP;
+   TH1D* m_BCID;
+   TH1D* m_diffBCID;   
+   TH1D* m_actualInt;
+   TH1D* m_;   
+  void addHistogram( TH1* h ) {
+    std::string name = h->GetName();
+    m_histos.insert( std::map<std::string, TH1*>::value_type( name, h) );
+  } 
+  void addHistogram( TProfile* h ) {
+    std::string name = h->GetName();
+    m_effhistos.insert( std::map<std::string, TProfile*>::value_type( name, h) );
+  }
+  
+ protected:   
+  bool  m_addBC, m_addFEBTemp;
+  enum {NOT_VALID = -999};
+
+  std::string m_ntpath, m_ntTitle;
+
+  //Ntuple pointer
+  NTuple::Tuple* m_nt;
+
+  //Ntuple variables:
+  NTuple::Item<long> m_detector, m_region, m_layer, m_eta, m_phi, m_onlChanId, m_oflChanId;
+  NTuple::Item<long> m_pos_neg, m_barrel_ec, m_FT, m_slot, m_channel;
+  NTuple::Item<long> m_calibLine,m_badChanWord;
+  NTuple::Item<long> m_isConnected;
+  NTuple::Item<long> m_chanHash, m_febHash, m_oflHash;
+  
+  NTuple::Item<float> m_FEBTemp1, m_FEBTemp2;
+
+
+  const LArEM_Base_ID* m_emId;
+  const LArHEC_Base_ID* m_hecId;
+  const LArFCAL_Base_ID* m_fcalId;
+  const LArOnlineID_Base* m_onlineId;
+  const CaloCell_ID* m_caloId;
+
+  bool m_isSC;
+  bool m_isFlat;
+
+  bool m_addHash;
+
+};
+#endif
diff --git a/LArCalorimeter/LArCalibTools/share/CaloCondBlob2Ntuple.py b/LArCalorimeter/LArCalibTools/share/CaloCondBlob2Ntuple.py
index 05f4843e182ee1f2cedb58cce69db0aadda1000a..74421ab3a6fddbd5b34063a2fb8f91bac89d18ec 100644
--- a/LArCalorimeter/LArCalibTools/share/CaloCondBlob2Ntuple.py
+++ b/LArCalorimeter/LArCalibTools/share/CaloCondBlob2Ntuple.py
@@ -31,7 +31,7 @@ globalflags.InputFormat="bytestream"
 
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-21-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArCalibTools/share/ConvertDSPThrePooltoCool.py b/LArCalorimeter/LArCalibTools/share/ConvertDSPThrePooltoCool.py
index f9e1ad279e8c8f2ca6133e55e34d15b4513e4e3f..cf15c33934ec89a76800ac3668c63f2f3b4e76bd 100644
--- a/LArCalorimeter/LArCalibTools/share/ConvertDSPThrePooltoCool.py
+++ b/LArCalorimeter/LArCalibTools/share/ConvertDSPThrePooltoCool.py
@@ -21,10 +21,10 @@ topSequence = AlgSequence()
 from AthenaCommon.GlobalFlags import  globalflags
 globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
-globalflags.DatabaseInstance="COMP200"
+globalflags.DatabaseInstance="CONDBR2"
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArCalibTools/share/ConvertPoolToCoolInline.py b/LArCalorimeter/LArCalibTools/share/ConvertPoolToCoolInline.py
index 5a24d329769b5c6ccca17df554f4f759afa7e34d..86400ac8fbb27938c056fa97dad8d5a407c4edd2 100644
--- a/LArCalorimeter/LArCalibTools/share/ConvertPoolToCoolInline.py
+++ b/LArCalorimeter/LArCalibTools/share/ConvertPoolToCoolInline.py
@@ -8,10 +8,10 @@ topSequence = AlgSequence()
 from AthenaCommon.GlobalFlags import  globalflags
 globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
-globalflags.DatabaseInstance="COMP200"
+globalflags.DatabaseInstance="CONDBR2"
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArCalibTools/share/LArCommConditions2Ntuple.py b/LArCalorimeter/LArCalibTools/share/LArCommConditions2Ntuple.py
index 9cba58c3d3b998032f1bb94ed1ac6672a810a778..51585f952d2732db8319389cc58a7476b4c57a29 100644
--- a/LArCalorimeter/LArCalibTools/share/LArCommConditions2Ntuple.py
+++ b/LArCalorimeter/LArCalibTools/share/LArCommConditions2Ntuple.py
@@ -79,7 +79,7 @@ else:
   globalflags.DatabaseInstance="CONDBR2"
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArCalibTools/share/LArDSPThresholds2Ntuple.py b/LArCalorimeter/LArCalibTools/share/LArDSPThresholds2Ntuple.py
index 3e1a08136561ffac899d136aa0907301d5642784..1fe531024e6d20ad330b81c9786dd9e9cb0389dd 100644
--- a/LArCalorimeter/LArCalibTools/share/LArDSPThresholds2Ntuple.py
+++ b/LArCalorimeter/LArCalibTools/share/LArDSPThresholds2Ntuple.py
@@ -1,11 +1,11 @@
 if 'inputfolder' not in dir():
-   inputfolder="/LAR/Configuration/DSPThreshold/Thresholds"
+   inputfolder="/LAR/Configuration/DSPThresholdFlat/Thresholds"
 
 if 'inputtag' not in dir():
    inputtag=""
 
 if 'inputdb' not in dir():
-   inputdb="COOLONL_LAR/COMP200"
+   inputdb="COOLONL_LAR/CONDBR2"
 
 import AthenaCommon.AtlasUnixGeneratorJob #use MC event selector
 from string import split,join
@@ -21,7 +21,7 @@ globalflags.DataSource.set_Value_and_Lock('data')
 globalflags.InputFormat.set_Value_and_Lock('bytestream')
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
@@ -37,13 +37,13 @@ from AtlasGeoModel import GeoModelInit
 
 #Get identifier mapping (needed by LArConditionsContainer)
                            
-svcMgr.IOVDbSvc.GlobalTag="LARCALIB-000-02"
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-BLKPA-2017-05"
 include( "LArConditionsCommon/LArIdMap_comm_jobOptions.py" )
 
 theApp.EvtMax = 1
 svcMgr.EventSelector.RunNumber = 500000
 svcMgr.EventSelector.InitialTimeStamp=int(time())
-dbname="<db>COOLOFL_LAR/COMP200</db>"
+dbname="<db>COOLOFL_LAR/CONDBR2</db>"
 
 conddb.addFolder("","/LAR/BadChannelsOfl/BadChannels<key>/LAR/BadChannels/BadChannels</key>"+dbname)
 conddb.addFolder("","/LAR/BadChannelsOfl/MissingFEBs<key>/LAR/BadChannels/MissingFEBs</key>"+dbname)
@@ -72,7 +72,7 @@ svcMgr += NTupleSvc()
 svcMgr.NTupleSvc.Output = [ "FILE1 DATAFILE='DSPthresholds.root' OPT='NEW'" ]
 
 #svcMgr.DetectorStore.Dump=True
-svcMgr.MessageSvc.OutputLevel = DEBUG
+svcMgr.MessageSvc.OutputLevel = WARNING
 
 svcMgr.IOVDbSvc.DBInstance=""
 svcMgr.PoolSvc.ReadCatalog += ["xmlcatalog_file:/afs/cern.ch/user/l/larcalib/w0/stableConds/PoolCat_stable.xml",
@@ -82,4 +82,4 @@ svcMgr.PoolSvc.ReadCatalog += ["xmlcatalog_file:/afs/cern.ch/user/l/larcalib/w0/
 
 svcMgr.MessageSvc.debugLimit = 5000000
 
-svcMgr.IOVDbSvc.OutputLevel=DEBUG
+#svcMgr.IOVDbSvc.OutputLevel=DEBUG
diff --git a/LArCalorimeter/LArCalibTools/share/LArFillDSPConfig.py b/LArCalorimeter/LArCalibTools/share/LArFillDSPConfig.py
index b1dfb8cbaf7804f75d2605e791a564cbf7b26790..2d07b1a732d328672f6bed90d883238b24e68038 100644
--- a/LArCalorimeter/LArCalibTools/share/LArFillDSPConfig.py
+++ b/LArCalorimeter/LArCalibTools/share/LArFillDSPConfig.py
@@ -1,7 +1,8 @@
 
-DSPConfigFolder="/LAR/Configuration/DSPConfiguration"
+if not 'OutputSqliteFile' in dir():
+   OutputSqliteFile="dspconfig.db"
 
-OutputSqliteFile="dspconfig.db"
+DSPConfigFolder="/LAR/Configuration/DSPConfiguration"
 
 include("AthenaCommon/Atlas_Gen.UnixStandardJob.py")
 
diff --git a/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py b/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py
index 44edf30ec9fb013aaef234f47993e537eadb6d03..b18d70e36cc4e33259b2ad9ccf254c713bba047e 100644
--- a/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py
+++ b/LArCalorimeter/LArCalibTools/share/LArGainThresholds2Ntuple.py
@@ -28,7 +28,7 @@ from AtlasGeoModel import GeoModelInit
 
 #Get identifier mapping (needed by LArConditionsContainer)
                            
-svcMgr.IOVDbSvc.GlobalTag="LARCALIB-RUN2-02"
+svcMgr.IOVDbSvc.GlobalTag="CONDBR2-ES1PA-2017-04"
 include( "LArConditionsCommon/LArIdMap_comm_jobOptions.py" )
 
 theApp.EvtMax = 1
diff --git a/LArCalorimeter/LArCalibTools/src/CaloCellGroup2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/CaloCellGroup2Ntuple.cxx
index 48100dcee72acb4b462ba1c44f91122bea5183ea..bebffcfbd6d0f2e81a433f9dd8558a864b835982 100644
--- a/LArCalorimeter/LArCalibTools/src/CaloCellGroup2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/CaloCellGroup2Ntuple.cxx
@@ -29,13 +29,13 @@ StatusCode CaloCellGroup2Ntuple::stop () {
 
   sc=m_nt->addItem("nvalues",nValues,0,1000);
   if (sc!=StatusCode::SUCCESS)
-    {(*m_log)  << MSG::ERROR << "addItem 'nvalues' failed" << endmsg;
+    {ATH_MSG_ERROR( "addItem 'nvalues' failed" );
     return StatusCode::FAILURE;
     }
  
   sc=m_nt->addItem("values",nValues,values);
   if (sc!=StatusCode::SUCCESS)
-    {(*m_log)  << MSG::ERROR << "addItem 'values' failed" << endmsg;
+    {ATH_MSG_ERROR( "addItem 'values' failed" );
     return StatusCode::FAILURE;
     }
 
@@ -45,13 +45,13 @@ StatusCode CaloCellGroup2Ntuple::stop () {
   const CaloCell_ID* caloCellId;
   sc = m_detStore->retrieve(caloCellId,"CaloCell_ID");
   if (sc.isFailure()) {
-    (*m_log) << MSG::ERROR << "Could not get CaloCellID helper !" << endmsg;
+    ATH_MSG_ERROR( "Could not get CaloCellID helper !" );
     return StatusCode::FAILURE;
   }
   
-  bool stat=m_cellGroupList.setDefinition(caloCellId,m_groupInit,*m_log);
+  bool stat=m_cellGroupList.setDefinition(caloCellId,m_groupInit,msg());
   if (!stat) {
-    (*m_log) << MSG::ERROR << "CaloCellGroupList::setDefinition failed!" << endmsg;
+    ATH_MSG_ERROR( "CaloCellGroupList::setDefinition failed!" );
     return StatusCode::FAILURE;
   }
   m_cellGroupList.printDef();
@@ -78,12 +78,12 @@ StatusCode CaloCellGroup2Ntuple::stop () {
      //cellCounter++;
      sc=ntupleSvc()->writeRecord(m_nt);
      if (sc!=StatusCode::SUCCESS) {
-       (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return StatusCode::FAILURE;
      }
    }//end if isConnected
   }//end loop over online ID
 
- (*m_log)  << MSG::INFO << "CaloCellGroup2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "CaloCellGroup2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/CaloCondBlob2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/CaloCondBlob2Ntuple.cxx
index c43b590ab7c4fb21a3eb43ff0839470b9d6d8bf0..8f9269cc01c98b8b222eb2e1781c8db9ebdf1823 100644
--- a/LArCalorimeter/LArCalibTools/src/CaloCondBlob2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/CaloCondBlob2Ntuple.cxx
@@ -31,13 +31,13 @@ StatusCode CaloCondBlob2Ntuple::stop () {
 
 //   sc=m_nt->addItem("nvalues",nValues,0,1000);
 //   if (sc!=StatusCode::SUCCESS)
-//     {(*m_log)  << MSG::ERROR << "addItem 'nvalues' failed" << endmsg;
+//     {ATH_MSG_ERROR( "addItem 'nvalues' failed" );
 //     return StatusCode::FAILURE;
 //     }
  
 //   sc=m_nt->addItem("values",nValues,values);
 //   if (sc!=StatusCode::SUCCESS)
-//     {(*m_log)  << MSG::ERROR << "addItem 'values' failed" << endmsg;
+//     {ATH_MSG_ERROR( "addItem 'values' failed" );
 //     return StatusCode::FAILURE;
 //     }
 
@@ -45,14 +45,14 @@ StatusCode CaloCondBlob2Ntuple::stop () {
   NTuple::Item<float> value;
   sc=m_nt->addItem("value",value,0,100);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'values' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'values' failed" );
     return StatusCode::FAILURE;
   }
   
   const AthenaAttributeList* attrList=0;
   sc=detStore()->retrieve(attrList,m_folder);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to retrieve AthenaAttributeList with key " << m_folder << endmsg;
+    ATH_MSG_ERROR( "Failed to retrieve AthenaAttributeList with key " << m_folder );
     return sc;
   }
 
@@ -69,7 +69,7 @@ StatusCode CaloCondBlob2Ntuple::stop () {
   const CaloCell_ID* caloCellId;
   sc = m_detStore->retrieve(caloCellId,"CaloCell_ID");
   if (sc.isFailure()) {
-    (*m_log) << MSG::ERROR << "Could not get CaloCellID helper !" << endmsg;
+    ATH_MSG_ERROR( "Could not get CaloCellID helper !" );
     return StatusCode::FAILURE;
   }
   
@@ -93,11 +93,11 @@ StatusCode CaloCondBlob2Ntuple::stop () {
      
      sc=ntupleSvc()->writeRecord(m_nt);
      if (sc!=StatusCode::SUCCESS) {
-       (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return StatusCode::FAILURE;
      }
   }//end loop over hash ids
 
- (*m_log)  << MSG::INFO << "CaloCondBlob2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "CaloCondBlob2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArAccumulatedDigits2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArAccumulatedDigits2Ntuple.cxx
index 134cc95a685c7947e6377c3c75629892e31b12d2..8d8eda51ecf2f944409f261d558a81de76bfd094 100644
--- a/LArCalorimeter/LArCalibTools/src/LArAccumulatedDigits2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArAccumulatedDigits2Ntuple.cxx
@@ -27,11 +27,11 @@ LArAccumulatedDigits2Ntuple::~LArAccumulatedDigits2Ntuple()
 
 StatusCode LArAccumulatedDigits2Ntuple::initialize()
 {
-   msg(MSG::INFO) << "in initialize" << endmsg; 
+   ATH_MSG_INFO( "in initialize" ); 
 
    StatusCode sc=LArCond2NtupleBase::initialize();
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "Base init failed" << endmsg;
+     ATH_MSG_ERROR( "Base init failed" );
      return StatusCode::FAILURE;
    }
 
@@ -39,49 +39,49 @@ StatusCode LArAccumulatedDigits2Ntuple::initialize()
 
   sc=m_nt->addItem("IEvent",m_IEvent,0,3000);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'IEvent' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'IEvent' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("Ntrigger",m_Ntrigger,0,500); 
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Ntrigger' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Ntrigger' failed" );
       return sc;
     }
   
   sc=m_nt->addItem("Nsamples",m_ntNsamples,0,32);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Nsamples' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Nsamples' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("sum",m_Nsamples,m_sum);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'sum' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'sum' failed" );
       return sc;
     }
   
   sc=m_nt->addItem("sumsq",m_Nsamples,m_sumsq);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'sumsq' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'sumsq' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("mean",m_mean);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'mean' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'mean' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("rms",m_rms);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'rms' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'rms' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("covr",m_Nsamples-1,m_covr);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'covr' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'covr' failed" );
       return sc;
     }
 
@@ -99,17 +99,17 @@ StatusCode LArAccumulatedDigits2Ntuple::execute()
 
   StatusCode sc;
   
-  msg(MSG::DEBUG) << "in execute" << endmsg; 
+  ATH_MSG_DEBUG( "in execute" ); 
 
   m_event++;
   
   const LArAccumulatedDigitContainer* accuDigitContainer = NULL;
   sc=detStore()->retrieve(accuDigitContainer,m_contKey);  
   if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::WARNING) << "Unable to retrieve LArAccumulatedDigitContainer with key " << m_contKey << " from DetectorStore. " << endmsg;
+     ATH_MSG_WARNING( "Unable to retrieve LArAccumulatedDigitContainer with key " << m_contKey << " from DetectorStore. " );
     } 
   else
-     msg(MSG::DEBUG) << "Got LArAccumulatedDigitContainer with key " << m_contKey << endmsg;
+     ATH_MSG_DEBUG( "Got LArAccumulatedDigitContainer with key " << m_contKey );
   
  
  if (accuDigitContainer) { 
@@ -118,10 +118,10 @@ StatusCode LArAccumulatedDigits2Ntuple::execute()
    LArAccumulatedDigitContainer::const_iterator it_e=accuDigitContainer->end();
 
     if(it == it_e) {
-      msg(MSG::DEBUG) << "LArAccumulatedDigitContainer with key=" << m_contKey << " is empty " << endmsg;
+      ATH_MSG_DEBUG( "LArAccumulatedDigitContainer with key=" << m_contKey << " is empty " );
       return StatusCode::SUCCESS;
     }else{
-      msg(MSG::DEBUG) << "LArAccumulatedDigitContainer with key=" << m_contKey << " has " <<accuDigitContainer->size() << " entries" <<endmsg;
+      ATH_MSG_DEBUG( "LArAccumulatedDigitContainer with key=" << m_contKey << " has " <<accuDigitContainer->size() << " entries" );
     }
 
    unsigned cellCounter=0;
@@ -136,7 +136,7 @@ StatusCode LArAccumulatedDigits2Ntuple::execute()
 
      if(trueMaxSample>m_Nsamples){
        if(!m_ipass){
-	 msg(MSG::WARNING) << "The number of samples in data is larger than the one specified by JO: " << trueMaxSample << " > " << m_Nsamples << " --> only " << m_Nsamples << " will be available in the ntuple " << endmsg;
+	 ATH_MSG_WARNING( "The number of samples in data is larger than the one specified by JO: " << trueMaxSample << " > " << m_Nsamples << " --> only " << m_Nsamples << " will be available in the ntuple " );
 	 m_ipass=1;
        }
        trueMaxSample = m_Nsamples;
@@ -159,12 +159,12 @@ StatusCode LArAccumulatedDigits2Ntuple::execute()
      fillFromIdentifier((*it)->hardwareID());      
      sc=ntupleSvc()->writeRecord(m_nt);
      if (sc!=StatusCode::SUCCESS) {
-       msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return sc;
      }
      cellCounter++;
    } 
  } 
- msg(MSG::DEBUG) << "LArAccumulatedDigits2Ntuple has finished." << endmsg;
+ ATH_MSG_DEBUG( "LArAccumulatedDigits2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArAutoCorr2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArAutoCorr2Ntuple.cxx
index 06948fdab509a8af7dfff0edeb807d307f384b0f..10a795300a9e702ed4b7f39a06b19415aa19fdb7 100755
--- a/LArCalorimeter/LArCalibTools/src/LArAutoCorr2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArAutoCorr2Ntuple.cxx
@@ -30,27 +30,27 @@ StatusCode LArAutoCorr2Ntuple::stop() {
  NTuple::Item<long> gain, cellIndex;
  sc=m_nt->addItem("gain",gain,0,3);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'gain' failed" );
    return StatusCode::FAILURE;
  }
 
  sc=m_nt->addItem("cellIndex",cellIndex,0,200000);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "addItem 'cellIndex' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'cellIndex' failed" );
    return StatusCode::FAILURE;
  }
 
  sc=m_nt->addItem("covr",m_nsamples-1,cov);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "addItem 'covr' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'covr' failed" );
    return StatusCode::FAILURE;
  }
 
  const ILArAutoCorr* larAutoCorr;
  sc=m_detStore->retrieve(larAutoCorr,m_objKey);
  if (sc!=StatusCode::SUCCESS){
-   (*m_log) << MSG::ERROR << "Unable to retrieve ILArAutoCorr with key " 
-       << m_objKey << " from DetectorStore" << endmsg;
+   ATH_MSG_ERROR( "Unable to retrieve ILArAutoCorr with key " 
+       << m_objKey << " from DetectorStore" );
    return StatusCode::FAILURE;
  } 
 
@@ -73,7 +73,7 @@ StatusCode LArAutoCorr2Ntuple::stop() {
 
        sc = ntupleSvc()->writeRecord(m_nt);
        if (sc!=StatusCode::SUCCESS) {
-	 (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	 ATH_MSG_ERROR( "writeRecord failed" );
 	 return StatusCode::FAILURE;
        }
        cellCounter++;
@@ -81,7 +81,7 @@ StatusCode LArAutoCorr2Ntuple::stop() {
    }//end if loop over cells
  }//end if loop over gains
  
- (*m_log) << MSG::INFO << "LArAutoCorr2Ntuple has finished, " << cellCounter << "records written, " << cellZeroCounter << " zero length vectors" << endmsg;
+ ATH_MSG_INFO( "LArAutoCorr2Ntuple has finished, " << cellCounter << "records written, " << cellZeroCounter << " zero length vectors" );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCalibTools/src/LArCaliWaves2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArCaliWaves2Ntuple.cxx
index b1f077ca862ab2f829cf475dcf5d2f23f275309b..f661986ba2def090324cb9b1fbb798db7c36d7fc 100755
--- a/LArCalorimeter/LArCalibTools/src/LArCaliWaves2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArCaliWaves2Ntuple.cxx
@@ -43,28 +43,28 @@ StatusCode LArCaliWaves2Ntuple::stop()
   
   // Check DACSatur jobOption consistency, in case setup default values
   if ( m_dacSaturSkip && m_dacSaturLayer0.size()<3 ) {
-     (*m_log) << MSG::WARNING << "DACSaturPS     jobOption has wrong size. Will use default." << endmsg ;
+     ATH_MSG_WARNING( "DACSaturPS     jobOption has wrong size. Will use default." ) ;
      m_dacSaturLayer0.resize(3);
      m_dacSaturLayer0[0] = 15000 ; 
      m_dacSaturLayer0[1] = 50000 ;
      m_dacSaturLayer0[2] = 65000 ;
   }
   if ( m_dacSaturSkip && m_dacSaturLayer1.size()<3 ) {
-     (*m_log) << MSG::WARNING << "DACSaturStrips jobOption has wrong size. Will use default." << endmsg ;
+     ATH_MSG_WARNING( "DACSaturStrips jobOption has wrong size. Will use default." ) ;
      m_dacSaturLayer1.resize(3);
      m_dacSaturLayer1[0] = 800 ; 
      m_dacSaturLayer1[1] = 8000 ;
      m_dacSaturLayer1[2] = 65000 ;
   }
   if ( m_dacSaturSkip && m_dacSaturLayer2.size()<3 ) {
-     (*m_log) << MSG::WARNING << "DACSaturMiddle jobOption has wrong size. Will use default." << endmsg ;
+     ATH_MSG_WARNING( "DACSaturMiddle jobOption has wrong size. Will use default." ) ;
      m_dacSaturLayer2.resize(3);
      m_dacSaturLayer2[0] = 1000 ; 
      m_dacSaturLayer2[1] = 10000 ;
      m_dacSaturLayer2[2] = 65000 ;
   }
   if ( m_dacSaturSkip && m_dacSaturLayer3.size()<3 ) {
-     (*m_log) << MSG::WARNING << "DACSaturBack   jobOption has wrong size. Will use default." << endmsg ;
+     ATH_MSG_WARNING( "DACSaturBack   jobOption has wrong size. Will use default." ) ;
      m_dacSaturLayer3.resize(3);
      m_dacSaturLayer3[0] = 800 ; 
      m_dacSaturLayer3[1] = 8000 ;
@@ -74,32 +74,32 @@ StatusCode LArCaliWaves2Ntuple::stop()
   StatusCode sc;
   sc=m_nt->addItem("DAC",m_dac,0,64000);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'DAC' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'DAC' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=m_nt->addItem("gain",m_gain,0,3);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=m_nt->addItem("nPulsedCalibLines",m_nPulsedCalibLines,0,4);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'nPulsedCalibLines' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'nPulsedCalibLines' failed" );
     return StatusCode::FAILURE;
   }
     
   sc=m_nt->addItem("pulsedCalibLines",4,m_pulsedCalibLines);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'pulsedCalibLines' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'pulsedCalibLines' failed" );
     return StatusCode::FAILURE;
   }
   
   if (m_saveJitter) {
     sc=m_nt->addItem("Jitter",m_jitter,0.,1.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'Jitter' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Jitter' failed" );
       return StatusCode::FAILURE;
     } 
   }
@@ -107,7 +107,7 @@ StatusCode LArCaliWaves2Ntuple::stop()
   if (m_addCorrUndo) {
     sc=m_nt->addItem("corrUndo",m_corrUndo,0,1);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'corrUndo' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'corrUndo' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -123,27 +123,27 @@ StatusCode LArCaliWaves2Ntuple::stop()
     const std::string& key = m_keylist[k] ;
 
 
-    (*m_log) << MSG::INFO << "Processing WaveContainer from StoreGate! key=" << m_keylist[k] << endmsg; 
+    ATH_MSG_INFO( "Processing WaveContainer from StoreGate! key=" << m_keylist[k] ); 
     const LArCaliWaveContainer* caliWaveContainer;
     StatusCode sc = m_detStore->retrieve(caliWaveContainer,key);	    
     if (sc.isFailure()) {
-      (*m_log) << MSG::ERROR << "Cannot read LArCaliWaveContainer from StoreGate! key=" << key << endmsg;
+      ATH_MSG_ERROR( "Cannot read LArCaliWaveContainer from StoreGate! key=" << key );
       return StatusCode::FAILURE;
     } else 
-      (*m_log) << MSG::INFO << "Read LArCaliWaveContainer from StoreGate! key= "  << key << endmsg;
+      ATH_MSG_INFO( "Read LArCaliWaveContainer from StoreGate! key= "  << key );
     
     if (m_applyCorr) {
       if (!caliWaveContainer->correctionsApplied()) {
 	LArCaliWaveContainer* caliWaveContainer_nc=const_cast<LArCaliWaveContainer*>(caliWaveContainer);
 	sc=caliWaveContainer_nc->applyCorrections();
 	if (sc.isFailure()) {
-	  (*m_log) << MSG::ERROR << "Failed to apply corrections to LArCaliWaveContainer!" << endmsg;
+	  ATH_MSG_ERROR( "Failed to apply corrections to LArCaliWaveContainer!" );
 	}
 	else
-	  (*m_log) << MSG::INFO << "Applied corrections to LArCaliWaveContainer" << endmsg;
+	  ATH_MSG_INFO( "Applied corrections to LArCaliWaveContainer" );
       }
       else {
-	(*m_log) << MSG::WARNING << "Corrections already applied. Can't apply twice!" << endmsg;
+	ATH_MSG_WARNING( "Corrections already applied. Can't apply twice!" );
       }
     }// end if applyCorr
 
@@ -167,7 +167,7 @@ StatusCode LArCaliWaves2Ntuple::stop()
 	  if (skip) continue;
 	  sc=ntupleSvc()->writeRecord(m_nt);
 	  if (sc!=StatusCode::SUCCESS) {
-	    (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	    ATH_MSG_ERROR( "writeRecord failed" );
 	    return sc;
 	  }
 	}//End loop over DAC 
@@ -192,7 +192,7 @@ StatusCode LArCaliWaves2Ntuple::stop()
 	    if (skip) continue;
 	    sc=ntupleSvc()->writeRecord(m_nt);
 	    if (sc!=StatusCode::SUCCESS) {
-	      (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	      ATH_MSG_ERROR( "writeRecord failed" );
 	      return sc;
 	    }
 	  }//end loop over DAC
@@ -200,7 +200,7 @@ StatusCode LArCaliWaves2Ntuple::stop()
       }//end loop over gain
     }//end if addUndoCorr
   }//end loop over container keys
-  (*m_log) << MSG::INFO << "LArWave2Ntuple has finished." << endmsg;
+  ATH_MSG_INFO( "LArWave2Ntuple has finished." );
   return StatusCode::SUCCESS;
 } // end finalize-method.
 
@@ -234,7 +234,7 @@ bool LArCaliWaves2Ntuple::writeEntry(const HWIdentifier chid, const unsigned gai
   if ( !m_isSC ) {
   const std::vector<HWIdentifier>& calibLineV = clCont->calibSlotLine(chid);
   if ( calibLineV.size()>0 ) {
-    (*m_log) << MSG::DEBUG << "wave.getIsPulsedInt() " << wave.getIsPulsedInt()<<" : "<< calibLineV.size()<< endmsg;
+    ATH_MSG_DEBUG( "wave.getIsPulsedInt() " << wave.getIsPulsedInt()<<" : "<< calibLineV.size());
     for(int i=0;i<4;i++)
       m_pulsedCalibLines[i] = NOT_VALID;
     std::vector<HWIdentifier>::const_iterator calibLineIt = calibLineV.begin();
@@ -248,7 +248,7 @@ bool LArCaliWaves2Ntuple::writeEntry(const HWIdentifier chid, const unsigned gai
       }
       iCalibLine++;
     }
-    (*m_log) << MSG::DEBUG << "m_pulsedCalibLines: "<<m_pulsedCalibLines[0]<<"/"<<m_pulsedCalibLines[1]<<"/"<<m_pulsedCalibLines[2]<<"/"<<m_pulsedCalibLines[3]<<endmsg;
+    ATH_MSG_DEBUG( "m_pulsedCalibLines: "<<m_pulsedCalibLines[0]<<"/"<<m_pulsedCalibLines[1]<<"/"<<m_pulsedCalibLines[2]<<"/"<<m_pulsedCalibLines[3]);
   }else { 
     m_nPulsedCalibLines = 0 ;
     m_pulsedCalibLines[0] = NOT_VALID;
diff --git a/LArCalorimeter/LArCalibTools/src/LArCompleteToFlat.cxx b/LArCalorimeter/LArCalibTools/src/LArCompleteToFlat.cxx
index e8f3345cb51a34bda0a54ae716acbac78e7f0c03..dceea24d81392a4439c872dde9ce22773b93df3f 100644
--- a/LArCalorimeter/LArCalibTools/src/LArCompleteToFlat.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArCompleteToFlat.cxx
@@ -123,13 +123,13 @@ CondAttrListCollection* LArCompleteToFlat::singleFloatFlat(const char* blobName,
     //delete attrList;//???
   }
 
-  msg(MSG::INFO) << "Converted " << blobName << " to inline storage. Total number of channels=" << nChannels << endmsg;
-  msg(MSG::INFO) << "Number of channels filled with default value (1.0) " << nDefault << " (including disconnected)" << endmsg;
+  ATH_MSG_INFO( "Converted " << blobName << " to inline storage. Total number of channels=" << nChannels );
+  ATH_MSG_INFO( "Number of channels filled with default value (1.0) " << nDefault << " (including disconnected)" );
   if (nCopiedEMPS) 
-    msg(MSG::INFO) << "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS << endmsg;  
+    ATH_MSG_INFO( "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS );  
   StatusCode sc=detStore()->record(coll,outputName);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection with key" << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection with key" << outputName );
     return NULL;
   }
   return coll;
@@ -138,7 +138,7 @@ CondAttrListCollection* LArCompleteToFlat::singleFloatFlat(const char* blobName,
 
 
 CondAttrListCollection* LArCompleteToFlat::pedestalFlat(const ILArPedestal* input, const std::string& outputName) { 
-  msg(MSG::INFO)<<"LArCompleteToFlat::pedestalFlat, starting"<<endmsg;
+  ATH_MSG_INFO("LArCompleteToFlat::pedestalFlat, starting");
 
   unsigned nChannels=0;
   unsigned nCopiedEMPS=0;
@@ -179,12 +179,12 @@ CondAttrListCollection* LArCompleteToFlat::pedestalFlat(const ILArPedestal* inpu
    
   StatusCode sc=detStore()->record(collPed,outputName);//"/LAR/ElecCalibFlat/Pedestal");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection for pedestal with key " << outputName << endmsg;
-    return NULL;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection for pedestal with key " << outputName );
+    return nullptr;
   }
-  msg(MSG::INFO) << "Converted Pedestal to inline storage. Total number of channels=" << nChannels << endmsg;
+  ATH_MSG_INFO( "Converted Pedestal to inline storage. Total number of channels=" << nChannels );
   if (nCopiedEMPS) 
-    msg(MSG::INFO) << "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS << endmsg;    
+    ATH_MSG_INFO( "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS );    
 
   return collPed;
 }
@@ -192,7 +192,7 @@ CondAttrListCollection* LArCompleteToFlat::pedestalFlat(const ILArPedestal* inpu
 
 CondAttrListCollection* LArCompleteToFlat::ofcFlat(const ILArOFC* input, const std::string& outputName) {
 
-  msg(MSG::INFO)<<"LArCompleteToFlat::ofcFlat, starting"<<endmsg;
+  ATH_MSG_INFO("LArCompleteToFlat::ofcFlat, starting");
   unsigned nChannels=0;
   unsigned nCopiedEMPS=0;
   unsigned nDefault=0;
@@ -215,11 +215,11 @@ CondAttrListCollection* LArCompleteToFlat::ofcFlat(const ILArOFC* input, const s
       nSamples=ofca.size();
     }
     if (nSamples==0) {
-      msg(MSG::ERROR) << "All input OFCs for gain " << gain << " have 0 samples!" << endmsg;
+      ATH_MSG_ERROR( "All input OFCs for gain " << gain << " have 0 samples!" );
       continue;//jump to the next gain
     }
     
-    msg(MSG::INFO) << "Gain " << gain <<": Found " << nSamples << " OFC samples in input data" << endmsg;
+    ATH_MSG_INFO( "Gain " << gain <<": Found " << nSamples << " OFC samples in input data" );
 
     coral::AttributeList* attrList = new coral::AttributeList(*spec);
     (*attrList)["version"].setValue(0U);
@@ -284,21 +284,21 @@ CondAttrListCollection* LArCompleteToFlat::ofcFlat(const ILArOFC* input, const s
     
   StatusCode sc=detStore()->record(collOFC,outputName);//"/LAR/ElecCalibFlat/OFC");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection OFC with key " << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection OFC with key " << outputName );
     return NULL;
   }
 
-  msg(MSG::INFO) << "Converted OFCs to inline storage. Total number of channels=" << nChannels << endmsg;
-  msg(MSG::INFO) << "Number of channels filled with default OFCs {1,1,1,1} " << nDefault << " (including disconnected)" << endmsg;
+  ATH_MSG_INFO( "Converted OFCs to inline storage. Total number of channels=" << nChannels );
+  ATH_MSG_INFO( "Number of channels filled with default OFCs {1,1,1,1} " << nDefault << " (including disconnected)" );
   if (nCopiedEMPS) 
-    msg(MSG::INFO) << "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS << endmsg;  
+    ATH_MSG_INFO( "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS );  
   return collOFC;
 }
 
  
 CondAttrListCollection* LArCompleteToFlat::shapeFlat(const LArShapeComplete* input, const std::string& outputName) {
  
-  msg(MSG::INFO)<<"LArCompleteToFlat::shapeFlat, starting"<<endmsg;
+  ATH_MSG_INFO("LArCompleteToFlat::shapeFlat, starting");
 
   unsigned nChannels=0;
   unsigned nCopiedEMPS=0;
@@ -321,11 +321,11 @@ CondAttrListCollection* LArCompleteToFlat::shapeFlat(const LArShapeComplete* inp
       nSamples=shape.size();
     }
     if (nSamples==0) {
-      msg(MSG::ERROR) << "All input Shapes for gain " << gain << " have 0 samples!" << endmsg;
+      ATH_MSG_ERROR( "All input Shapes for gain " << gain << " have 0 samples!" );
       continue;//jump to the next gain
     }
 
-    msg(MSG::INFO) << "Gain " << gain <<": Found " << nSamples << " shape samples in input data" << endmsg;
+    ATH_MSG_INFO( "Gain " << gain <<": Found " << nSamples << " shape samples in input data" );
 
     coral::AttributeList* attrList = new coral::AttributeList(*spec);    
     (*attrList)["version"].setValue(0U);
@@ -392,14 +392,14 @@ CondAttrListCollection* LArCompleteToFlat::shapeFlat(const LArShapeComplete* inp
     
   StatusCode sc=detStore()->record(coll,outputName);//"/LAR/ElecCalibFlat/SHAPE");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection Shape with key " << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection Shape with key " << outputName );
     return NULL;
   }
 
-  msg(MSG::INFO) << "Converted Shapes to inline storage. Total number of channels=" << nChannels << endmsg;
-   msg(MSG::INFO) << "Number of channels filled with default shape {0,0,0,0} " << nDefault << " (including disconnected)" << endmsg;
+  ATH_MSG_INFO( "Converted Shapes to inline storage. Total number of channels=" << nChannels );
+   ATH_MSG_INFO( "Number of channels filled with default shape {0,0,0,0} " << nDefault << " (including disconnected)" );
   if (nCopiedEMPS) 
-    msg(MSG::INFO) << "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS << endmsg;  
+    ATH_MSG_INFO( "\t Number of low gain EMBPS channels copied from medium gain" <<  nCopiedEMPS );  
   
   return coll;
 }
@@ -408,7 +408,7 @@ CondAttrListCollection* LArCompleteToFlat::shapeFlat(const LArShapeComplete* inp
 
 CondAttrListCollection* LArCompleteToFlat::rampFlat(const ILArRamp* input, const std::string& outputName) {
 
-  msg(MSG::INFO)<<"LArCompleteToFlat::rampFlat, starting"<<endmsg;
+  ATH_MSG_INFO("LArCompleteToFlat::rampFlat, starting");
 
   unsigned nChannels=0;
   unsigned nCopiedEMPS=0;
@@ -438,12 +438,12 @@ CondAttrListCollection* LArCompleteToFlat::rampFlat(const ILArRamp* input, const
       nPoints=ramp.size();
     }
     if (nPoints==0) {
-      msg(MSG::ERROR) << "All input Ramps for gain " << gain << " have 0 points!" << endmsg;
+      ATH_MSG_ERROR( "All input Ramps for gain " << gain << " have 0 points!" );
       continue;//jump to the next gain
     }
 
     defaultRamp.resize(nPoints,0.0); //fill remaining points if needed
-    msg(MSG::INFO) << "Gain " << gain << ": Found a ramp polynom of degree " << nPoints << " in input data" << endmsg;
+    ATH_MSG_INFO( "Gain " << gain << ": Found a ramp polynom of degree " << nPoints << " in input data" );
     coral::AttributeList* attrList = new coral::AttributeList(*spec);
     (*attrList)["version"].setValue(0U);
     coral::Blob& blobRamp=(*attrList)["RampVec"].data<coral::Blob>();
@@ -481,14 +481,14 @@ CondAttrListCollection* LArCompleteToFlat::rampFlat(const ILArRamp* input, const
   
   StatusCode sc=detStore()->record(coll,outputName);//"/LAR/ElecCalibFlat/Ramp");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection for ramp with key " << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection for ramp with key " << outputName );
     return NULL;
   }
 
-  msg(MSG::INFO) << "Converted Ramps to inline storage. Total number of channels " << nChannels << endmsg;
-  msg(MSG::INFO) << "Number of channels filled with default ramp {0,1} " << nDefault << " (including disconnected)" << endmsg;
+  ATH_MSG_INFO( "Converted Ramps to inline storage. Total number of channels " << nChannels );
+  ATH_MSG_INFO( "Number of channels filled with default ramp {0,1} " << nDefault << " (including disconnected)" );
   if (nCopiedEMPS) 
-    msg(MSG::INFO) << "\t Number of low gain EMBPS channels copied from medium gain (applied factor 10)" <<  nCopiedEMPS << endmsg;  
+    ATH_MSG_INFO( "\t Number of low gain EMBPS channels copied from medium gain (applied factor 10)" <<  nCopiedEMPS );  
   
 
   return coll;
@@ -513,7 +513,7 @@ CondAttrListCollection* LArCompleteToFlat::DAC2uAFlat(const ILArDAC2uA* input, c
   //delete attrList;//???
   StatusCode sc=detStore()->record(coll,outputName);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection with key" << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection with key" << outputName );
     return NULL;
   }
   return coll;
@@ -538,7 +538,7 @@ CondAttrListCollection* LArCompleteToFlat::uA2MeVFlat(const ILAruA2MeV* input, c
   //delete attrList;//???
   StatusCode sc=detStore()->record(coll,outputName);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record CondAttrListCollection with key" << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record CondAttrListCollection with key" << outputName );
     return NULL;
   }
   return coll;
@@ -574,14 +574,14 @@ AthenaAttributeList* LArCompleteToFlat::DSPThresholdsFlat(const LArDSPThresholds
     pSamplesThr[hs] = input->samplesThr(chid);
     pTrigThr[hs] = input->trigSumThr(chid);
 
-     msg(MSG::INFO) << "hwid: "<<chid.getString()<<" "<<hs<<" | "<<ptQThr[hs]<<" : "<<pSamplesThr[hs]<<" | "<<pTrigThr[hs] << endmsg;
+     ATH_MSG_INFO( "hwid: "<<chid.getString()<<" "<<hs<<" | "<<ptQThr[hs]<<" : "<<pSamplesThr[hs]<<" | "<<pTrigThr[hs] );
   }//end loop over hash ids
 
   AthenaAttributeList* coll=new AthenaAttributeList(*attrList);
     
   StatusCode sc=detStore()->record(coll,outputName);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to record AthenaAttributeList DSPThresholds with key " << outputName << endmsg;
+    ATH_MSG_ERROR( "Failed to record AthenaAttributeList DSPThresholds with key " << outputName );
     return NULL;
   }
 
@@ -595,7 +595,7 @@ StatusCode LArCompleteToFlat::stop() {
 
   StatusCode sc=detStore()->retrieve(m_onlineID);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to get LArOnlineID" << endmsg;
+    ATH_MSG_ERROR( "Failed to get LArOnlineID" );
     return sc;
   }
 
@@ -609,10 +609,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(uA2MeVComplete,m_uA2MeVInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LAruA2MeV with key " << m_uA2MeVInput << endmsg;
+	ATH_MSG_ERROR( "Failed to get LAruA2MeV with key " << m_uA2MeVInput );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LAruA2MeV" << endmsg;
+	ATH_MSG_WARNING( "Will not process LAruA2MeV" );
       }
     } else {
       uA2MeVFlat(uA2MeVComplete, "/LAR/ElecCalibFlat/uA2MeV");
@@ -625,10 +625,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(DAC2uAComplete,m_DAC2uAInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArDAC2uA with key " << m_DAC2uAInput << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArDAC2uA with key " << m_DAC2uAInput );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArDAC2uA" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArDAC2uA" );
       }  
     } else {
       DAC2uAFlat(DAC2uAComplete, "/LAR/ElecCalibFlat/DAC2uA");
@@ -641,10 +641,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(MphysOverMcalComplete,m_MphysOverMcalInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArMphysOverMcal with key " << m_MphysOverMcalInput << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArMphysOverMcal with key " << m_MphysOverMcalInput );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArMphysOverMcal" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArMphysOverMcal" );
       }   
     } else {
       singleFloatFlat("MphysOverMcal", MphysOverMcalComplete, "/LAR/ElecCalibFlat/MphysOverMcal",3,false); //No MphysOverMCal for FCAL
@@ -657,10 +657,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(HVScaleCorrComplete,m_HVScaleCorrInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArHVScaleCorr with key " << m_HVScaleCorrInput << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArHVScaleCorr with key " << m_HVScaleCorrInput );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArHVScaleCorr" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArHVScaleCorr" );
       }   
     } else {
       singleFloatFlat("HVScaleCorr", HVScaleCorrComplete, "/LAR/ElecCalibFlat/HVScaleCorr",1);
@@ -672,10 +672,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(pedComplete,m_PedestalInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArPedestal" << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArPedestal" );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArPedestal" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArPedestal" );
       }   
     } else {
       pedestalFlat(pedComplete,"/LAR/ElecCalibFlat/Pedestal");
@@ -686,13 +686,13 @@ StatusCode LArCompleteToFlat::stop() {
   
      sc=detStore()->record(pf,"PedestalFlat");
      if (sc.isFailure()) {
-       msg(MSG::ERROR) << "Failed to record LArPedestalFlat" << endmsg;
+       ATH_MSG_ERROR( "Failed to record LArPedestalFlat" );
      }
    
      ILArPedestal* iped=pf;
      sc=detStore()->symLink(pf,iped);
      if (sc.isFailure()) {
-       msg(MSG::ERROR) << "Failed to symlink LArPedestalFlat" << endmsg;
+       ATH_MSG_ERROR( "Failed to symlink LArPedestalFlat" );
      }
    }
       */
@@ -705,10 +705,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(ofcComplete,m_OFCInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArOFCComplete object" << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArOFCComplete object" );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArOFCComplete" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArOFCComplete" );
       }
     } else {
       ofcFlat(ofcComplete,"/LAR/ElecCalibFlat/OFC");
@@ -719,13 +719,13 @@ StatusCode LArCompleteToFlat::stop() {
      
 	sc=detStore()->record(of,"OFCFlat");
 	if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Failed to record LArOFCFlat" << endmsg;
+	ATH_MSG_ERROR( "Failed to record LArOFCFlat" );
 	}
    
 	ILArOFC* iofc=of;
 	sc=detStore()->symLink(of,iofc);
 	if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Failed to symlink LArOFCFlat" << endmsg;
+	ATH_MSG_ERROR( "Failed to symlink LArOFCFlat" );
 	}
       */
     }
@@ -737,10 +737,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(shapeComplete,m_ShapeInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArShapeComplete object" << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArShapeComplete object" );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArShapeComplete" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArShapeComplete" );
       }   
     } else {
       shapeFlat(shapeComplete,"/LAR/ElecCalibFlat/Shape");
@@ -751,13 +751,13 @@ StatusCode LArCompleteToFlat::stop() {
      
       sc=detStore()->record(sf,"ShapeFlat");
       if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Failed to record LArShapeFlat" << endmsg;
+	ATH_MSG_ERROR( "Failed to record LArShapeFlat" );
       }
    
       ILArShape* ishape=sf;
       sc=detStore()->symLink(sf,ishape);
       if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Failed to symlink LArShapeFlat" << endmsg;
+	ATH_MSG_ERROR( "Failed to symlink LArShapeFlat" );
       }
       */
     }
@@ -769,10 +769,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(rampComplete,m_RampInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArRampComplete object" << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArRampComplete object" );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArRampComplete" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArRampComplete" );
       }   
     } else {
       rampFlat(rampComplete,"/LAR/ElecCalibFlat/Ramp");
@@ -785,10 +785,10 @@ StatusCode LArCompleteToFlat::stop() {
     sc=detStore()->retrieve(DSPTComplete,m_DSPThresholdsInput);
     if (sc.isFailure()) {
       if(m_forceStop) { 
-	msg(MSG::ERROR) << "Failed to get LArDSPThresholdsComplete object" << endmsg;
+	ATH_MSG_ERROR( "Failed to get LArDSPThresholdsComplete object" );
 	return sc;
       } else {
-	msg(MSG::WARNING) << "Will not process LArDSPThresholdsComplete" << endmsg;
+	ATH_MSG_WARNING( "Will not process LArDSPThresholdsComplete" );
       }   
     }
     DSPThresholdsFlat(DSPTComplete,"/LAR/Configuration/DSPThresholdFlat/Templates");
@@ -801,7 +801,7 @@ StatusCode LArCompleteToFlat::stop() {
       
       sc=detStore()->record(df,"DSPThresholdsFlat");
       if (sc.isFailure()) {
-	msg(MSG::ERROR) << "Failed to record LArDSPThresholdsFlat" << endmsg;
+	ATH_MSG_ERROR( "Failed to record LArDSPThresholdsFlat" );
       }
     } 
     */
@@ -826,9 +826,9 @@ void LArCompleteToFlat::errIfConnected(const HWIdentifier chid, const int gain,
 
   if (cabling->isOnlineConnected(chid)) {
     if (! (gain==2 && m_onlineID->isEMBPS(chid))) { //No LG Presampler calibration
-      msg(MSG::ERROR) << "No valid " << objName << " found for channel "  << m_onlineID->channel_name(chid) << ", gain " << gain << ". ";
-      if (message) msg(MSG::ERROR) << message;
-      msg(MSG::ERROR) << " Filling with default value." << endmsg;
+      ATH_MSG_ERROR( "No valid " << objName << " found for channel "  << m_onlineID->channel_name(chid) << ", gain " << gain << ". ");
+      if (message) ATH_MSG_ERROR( message );
+      ATH_MSG_ERROR( " Filling with default value." );
     }
   }
   return;
diff --git a/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx b/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx
index 1966aecfb2afcfd5aadbe9fbc00a1d8d149281b4..70ea0c0d55657276b6f968b4a478878b076e9890 100644
--- a/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArCond2NtupleBase.cxx
@@ -9,7 +9,7 @@
 #include "CaloIdentifier/CaloCell_ID.h"
 
 LArCond2NtupleBase::LArCond2NtupleBase(const std::string& name, ISvcLocator* pSvcLocator): 
-  AthAlgorithm(name, pSvcLocator), m_initialized(false), m_nt(NULL), m_log(NULL), 
+  AthAlgorithm(name, pSvcLocator), m_initialized(false), m_nt(NULL),  
   m_detStore(NULL), m_emId(NULL), m_hecId(NULL), m_fcalId(NULL),m_onlineId(NULL),m_caloId(NULL),
   m_FEBTempTool("LArFEBTempTool"), m_isSC(false)
 {
@@ -22,22 +22,21 @@ LArCond2NtupleBase::LArCond2NtupleBase(const std::string& name, ISvcLocator* pSv
 }
 
 LArCond2NtupleBase::~LArCond2NtupleBase() {
-  delete m_log;
+  ;
 }
 
 StatusCode LArCond2NtupleBase::initialize() {
-  m_log=new MsgStream(msgSvc(), name()); //backward compatiblity
   
   ATH_MSG_DEBUG("Initializing LArCond2Ntuple base class");
   
   if (m_ntpath.size()==0 || m_ntTitle.size()==0) {
-    msg(MSG::ERROR) << "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" << endmsg;
+    ATH_MSG_ERROR( "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" );
     return StatusCode::FAILURE;
   }
 
   size_t i=m_ntpath.rfind('/');
   if (i==std::string::npos) {
-    msg(MSG::ERROR) << "Expected at least on '/' in path " << m_ntpath << endmsg;
+    ATH_MSG_ERROR( "Expected at least on '/' in path " << m_ntpath );
     return StatusCode::FAILURE;
   }
   std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
@@ -46,7 +45,7 @@ StatusCode LArCond2NtupleBase::initialize() {
 
   NTupleFilePtr file1(ntupleSvc(),basepath);
   if (!file1){
-    msg(MSG::ERROR) << "Could not get NTupleFilePtr with path " << basepath << " failed" << endmsg;
+    ATH_MSG_ERROR( "Could not get NTupleFilePtr with path " << basepath << " failed" );
     return StatusCode::FAILURE;
   }
   NTuplePtr nt(ntupleSvc(),m_ntpath);
@@ -54,7 +53,7 @@ StatusCode LArCond2NtupleBase::initialize() {
     nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
   }
   if (!nt){
-    msg(MSG::ERROR) << "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" << endmsg;
+    ATH_MSG_ERROR( "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" );
     return StatusCode::FAILURE; 
   }
 
@@ -76,15 +75,15 @@ StatusCode LArCond2NtupleBase::initialize() {
   m_hecId=idHelper->hec_idHelper();
 
   if (!m_emId) {
-    msg(MSG::ERROR) << "Could not access lar EM ID helper" << endmsg;
+    ATH_MSG_ERROR( "Could not access lar EM ID helper" );
     return StatusCode::FAILURE;
   }
   if (!m_fcalId) {
-    msg(MSG::ERROR) << "Could not access lar FCAL ID helper" << endmsg;
+    ATH_MSG_ERROR( "Could not access lar FCAL ID helper" );
     return StatusCode::FAILURE;
   }
   if (!m_hecId) {
-    msg(MSG::ERROR) << "Could not access lar HEC ID helper" << endmsg;
+    ATH_MSG_ERROR( "Could not access lar HEC ID helper" );
     return StatusCode::FAILURE;
   }
 
@@ -94,7 +93,7 @@ StatusCode LArCond2NtupleBase::initialize() {
   const LArOnline_SuperCellID* ll;
   sc = detStore()->retrieve(ll, "LArOnline_SuperCellID");
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Could not get LArOnlineID helper !" << endmsg;
+    ATH_MSG_ERROR( "Could not get LArOnlineID helper !" );
     return StatusCode::FAILURE;
   }
     else {
@@ -118,7 +117,7 @@ StatusCode LArCond2NtupleBase::initialize() {
   if (m_addFEBTemp) {
     sc = m_FEBTempTool.retrieve();
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << " Can't get FEBTempTool." << endmsg;
+      ATH_MSG_ERROR( " Can't get FEBTempTool." );
       return sc;
     }
   }
@@ -131,7 +130,7 @@ StatusCode LArCond2NtupleBase::initialize() {
   //Online-identifier variables
   sc=nt->addItem("channelId",m_onlChanId,0x38000000,0x3A000000);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'channelId' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'channelId' failed" );
     return StatusCode::FAILURE;
   }
 
@@ -139,52 +138,52 @@ StatusCode LArCond2NtupleBase::initialize() {
   if ( m_OffId ) {
     sc=nt->addItem("offlineId",m_oflChanId,0x20000000,0x40000000);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'channelId' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'channelId' failed" );
       return StatusCode::FAILURE;
     }
   }
 
   sc=nt->addItem("barrel_ec",m_barrel_ec,0,1);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'barrel_ec' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'barrel_ec' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=nt->addItem("pos_neg",m_pos_neg,0,1);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'pos_neg' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'pos_neg' failed" );
     return StatusCode::FAILURE;
    }
 
   sc=nt->addItem("FT",m_FT,0,32);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'FT' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'FT' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=nt->addItem("slot",m_slot,1,15);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'slot' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'slot' failed" );
     return StatusCode::FAILURE;
    }
 
   sc=nt->addItem("channel",m_channel,0,127);
   if (sc!=StatusCode::SUCCESS){
-    msg(MSG::ERROR) << "addItem 'channel' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'channel' failed" );
     return StatusCode::FAILURE;
   }
 
   if ( !m_isSC) {
     sc=nt->addItem("calibLine",m_calibLine,0,127);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'calibLine' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'calibLine' failed" );
       return StatusCode::FAILURE;
     }
   }
 
   sc=nt->addItem("isConnected",m_isConnected,0,1);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'isConnected' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'isConnected' failed" );
     return StatusCode::FAILURE;
   }
 
@@ -192,20 +191,20 @@ StatusCode LArCond2NtupleBase::initialize() {
   if (m_addHash) {
     sc=nt->addItem("channelHash",m_chanHash,0,200000);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'channelHash' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'channelHash' failed" );
       return StatusCode::FAILURE;
     }
 
     sc=nt->addItem("febHash",m_febHash,0,2000);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'febHash' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'febHash' failed" );
       return StatusCode::FAILURE;
     }
 
     if (m_OffId) {
       sc=m_nt->addItem("oflHash",m_oflHash,0,200000);
       if (sc!=StatusCode::SUCCESS) {
-	msg(MSG::ERROR) << "addItem 'oflHash' failed" << endmsg;
+	ATH_MSG_ERROR( "addItem 'oflHash' failed" );
 	return StatusCode::FAILURE;
       }
     }
@@ -215,34 +214,34 @@ StatusCode LArCond2NtupleBase::initialize() {
   //Offline-ID related variables
   sc=nt->addItem("layer",m_layer,0,4);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'layer' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'layer' failed" );
     return StatusCode::FAILURE;
    }
   sc=nt->addItem("ieta",m_eta,0,510);
   if (sc!=StatusCode::SUCCESS) {
-   msg(MSG::ERROR) << "addItem 'ieta' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'ieta' failed" );
    return StatusCode::FAILURE;
   }
   sc=nt->addItem("iphi",m_phi,0,1023);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'iphi' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'iphi' failed" );
     return StatusCode::FAILURE;
   }
   sc=nt->addItem("region",m_region,0,5);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'region' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'region' failed" );
     return StatusCode::FAILURE;
   }
   sc=nt->addItem("detector",m_detector,0,2);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'detector' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'detector' failed" );
     return StatusCode::FAILURE;
   }
 
   if (m_addBC) {
     sc=nt->addItem("badChan",m_badChanWord);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'badChan' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'badChan' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -250,12 +249,12 @@ StatusCode LArCond2NtupleBase::initialize() {
   if (m_addFEBTemp) {
     sc=nt->addItem("FEBTemp1",m_FEBTemp1);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'FEBTemp1' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'FEBTemp1' failed" );
       return StatusCode::FAILURE;
     }
     sc=nt->addItem("FEBTemp2",m_FEBTemp2);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'FEBTemp2' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'FEBTemp2' failed" );
       return StatusCode::FAILURE;
     }
   }
diff --git a/LArCalorimeter/LArCalibTools/src/LArDSPConfig2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArDSPConfig2Ntuple.cxx
index 1d35b6d42ab0de6cc8571469c13af2f5c0ef4c3a..04cceb492b298a713265467f0221d7729574af68 100644
--- a/LArCalorimeter/LArCalibTools/src/LArDSPConfig2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArDSPConfig2Ntuple.cxx
@@ -25,19 +25,31 @@ StatusCode LArDSPConfig2Ntuple::initialize() {
 
   StatusCode sc=LArCond2NtupleBase::initialize();
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "Base init failed" << endmsg;
+     ATH_MSG_ERROR( "Base init failed" );
      return StatusCode::FAILURE;
    }
 
    sc=m_nt->addItem("peakSample",m_peakSample);
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "addItem peakSample failed" << endmsg;
+     ATH_MSG_ERROR( "addItem peakSample failed" );
+     return StatusCode::FAILURE;
+   }
+   
+   sc=m_nt->addItem("useHGIntercept",m_useHgIntercept);
+   if (sc!=StatusCode::SUCCESS) {
+     ATH_MSG_ERROR( "addItem useHGIntercept failed" );
      return StatusCode::FAILURE;
    }
    
    sc=m_nt->addItem("useMGIntercept",m_useMgIntercept);
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "addItem useMGIntercept failed" << endmsg;
+     ATH_MSG_ERROR( "addItem useMGIntercept failed" );
+     return StatusCode::FAILURE;
+   }
+   
+   sc=m_nt->addItem("useLGIntercept",m_useLgIntercept);
+   if (sc!=StatusCode::SUCCESS) {
+     ATH_MSG_ERROR( "addItem useLGIntercept failed" );
      return StatusCode::FAILURE;
    }
    
@@ -55,7 +67,7 @@ StatusCode LArDSPConfig2Ntuple::stop() {
    const AthenaAttributeList* attrList=0;
    sc=detStore()->retrieve(attrList,m_folder);
    if (sc.isFailure()) {
-     msg(MSG::ERROR) << "Failed to retrieve AthenaAttributeList with key " << m_folder << endmsg;
+     ATH_MSG_ERROR( "Failed to retrieve AthenaAttributeList with key " << m_folder );
      return sc;
    }
       
@@ -68,18 +80,22 @@ StatusCode LArDSPConfig2Ntuple::stop() {
    for(; itOnId!=itOnIdEnd;++itOnId){
      const HWIdentifier hwid = *itOnId;
      m_peakSample=larDSPConfig.peakSample(hwid);
+     //ATH_MSG_INFO("hwid: "<<hwid.getString()<<" "<<m_peakSample);
      m_useMgIntercept=larDSPConfig.useMGRampIntercept(hwid);
+     m_useHgIntercept=larDSPConfig.useHGRampIntercept(hwid);
+     m_useLgIntercept=larDSPConfig.useLGRampIntercept(hwid);
+     //ATH_MSG_INFO("hwid: "<<hwid.getString()<<" "<<m_useHgIntercept<<" "<<m_useMgIntercept<<" "<<m_useLgIntercept);
      fillFromIdentifier(hwid);
-     //msg(MSG::INFO)<<"hwid: "<<hwid.getString()<<" "<<tQThr<<" : "<<samplesThr<<" : "<<trigThr<<endmsg;
+     //ATH_MSG_INFO("hwid: "<<hwid.getString()<<" "<<tQThr<<" : "<<samplesThr<<" : "<<trigThr);
      
      sc=ntupleSvc()->writeRecord(m_nt);      
      if (sc!=StatusCode::SUCCESS) {
-       msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return StatusCode::FAILURE;
      }
    }
    
-   msg(MSG::INFO) << "LArDSPConfig2Ntuple has finished." << endmsg;
+   ATH_MSG_INFO( "LArDSPConfig2Ntuple has finished." );
    return StatusCode::SUCCESS;
    
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArDSPThresholds2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArDSPThresholds2Ntuple.cxx
index d07b9d12e30856a483a172f1b8f6c87e1e8b4511..13b637e6c094c540e337d9204300d3c5764edad8 100644
--- a/LArCalorimeter/LArCalibTools/src/LArDSPThresholds2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArDSPThresholds2Ntuple.cxx
@@ -27,25 +27,25 @@ StatusCode LArDSPThresholds2Ntuple::initialize() {
 
   StatusCode sc=LArCond2NtupleBase::initialize();
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "Base init failed" << endmsg;
+     ATH_MSG_ERROR( "Base init failed" );
      return StatusCode::FAILURE;
    }
 
    sc=m_nt->addItem("tQThr",m_tQThr);
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "addItem tQThr failed" << endmsg;
+     ATH_MSG_ERROR( "addItem tQThr failed" );
      return StatusCode::FAILURE;
    }
    
    sc=m_nt->addItem("samplesThr",m_samplesThr);
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "addItem samplesThr failed" << endmsg;
+     ATH_MSG_ERROR( "addItem samplesThr failed" );
      return StatusCode::FAILURE;
    }
    
    sc=m_nt->addItem("trigThr",m_trigThr);
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "addItem trigThr failed" << endmsg;
+     ATH_MSG_ERROR( "addItem trigThr failed" );
      return StatusCode::FAILURE;
    }
 
@@ -64,13 +64,13 @@ StatusCode LArDSPThresholds2Ntuple::stop() {
    if(m_doFlat) {
       sc=detStore()->retrieve(attrList,m_folder);
       if (sc.isFailure()) {
-         msg(MSG::ERROR) << "Failed to retrieve AthenaAttributeList with key " << m_folder << endmsg;
+         ATH_MSG_ERROR( "Failed to retrieve AthenaAttributeList with key " << m_folder );
          return sc;
       }
       
       const coral::Blob& blob = (attrList->coralList())["tQThr"].data<coral::Blob>();
       if (blob.size()<3) {
-        msg(MSG::INFO) << "Found empty blob, nothing to do"<<endmsg;
+        ATH_MSG_INFO( "Found empty blob, nothing to do");
         return StatusCode::SUCCESS;
       }
       
@@ -79,7 +79,7 @@ StatusCode LArDSPThresholds2Ntuple::stop() {
    } else {
       sc=m_detStore->retrieve(dc);
       if(sc!=StatusCode::SUCCESS) {
-           msg(MSG::ERROR) <<"Could not retrieve LArDSPThresholdsComplete...."<<endmsg;
+           ATH_MSG_ERROR("Could not retrieve LArDSPThresholdsComplete....");
            return StatusCode::FAILURE;
       }
    }
@@ -100,17 +100,17 @@ StatusCode LArDSPThresholds2Ntuple::stop() {
      }
      
      fillFromIdentifier(hwid);
-     //msg(MSG::INFO)<<"hwid: "<<hwid.getString()<<" "<<tQThr<<" : "<<samplesThr<<" : "<<trigThr<<endmsg;
+     //ATH_MSG_INFO("hwid: "<<hwid.getString()<<" "<<tQThr<<" : "<<samplesThr<<" : "<<trigThr);
      
      sc=ntupleSvc()->writeRecord(m_nt);      
      if (sc!=StatusCode::SUCCESS) {
-       msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return StatusCode::FAILURE;
      }
    }
    
  
-   msg(MSG::INFO) << "LArDSPThresholds2Ntuple has finished." << endmsg;
+   ATH_MSG_INFO( "LArDSPThresholds2Ntuple has finished." );
    return StatusCode::SUCCESS;
    
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArDigits2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArDigits2Ntuple.cxx
index dadf5eb848f44782b86b01f44ade7197c74ae964..515277ade2ad95370aebe291ca47fe86cd89e9dd 100644
--- a/LArCalorimeter/LArCalibTools/src/LArDigits2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArDigits2Ntuple.cxx
@@ -28,35 +28,35 @@ LArDigits2Ntuple::~LArDigits2Ntuple()
 
 StatusCode LArDigits2Ntuple::initialize()
 {
-   msg(MSG::INFO) << "in initialize" << endmsg; 
+   ATH_MSG_INFO( "in initialize" ); 
 
    StatusCode sc=LArCond2NtupleBase::initialize();
    if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::ERROR) << "Base init failed" << endmsg;
+     ATH_MSG_ERROR( "Base init failed" );
      return StatusCode::FAILURE;
    }
 
   sc=m_nt->addItem("IEvent",m_IEvent);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'IEvent' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'IEvent' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("Gain",m_gain,-1,3);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Gain' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Gain' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("Nsamples",m_ntNsamples,0,32);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Nsamples' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Nsamples' failed" );
       return sc;
     }
 
   sc=m_nt->addItem("samples",m_Nsamples,m_samples);
   if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'samples' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'samples' failed" );
       return sc;
     }
   
@@ -74,13 +74,13 @@ StatusCode LArDigits2Ntuple::execute()
 
   StatusCode sc;
   
-  msg(MSG::DEBUG) << "in execute" << endmsg; 
+  ATH_MSG_DEBUG( "in execute" ); 
 
   m_event++;
   unsigned long thisevent;
   const EventInfo* eventInfo;
   if (evtStore()->retrieve(eventInfo,"ByteStreamEventInfo").isFailure()) {
-      msg(MSG::WARNING) << " Cannot access to event info " << endmsg;
+      ATH_MSG_WARNING( " Cannot access to event info " );
       thisevent=m_event;
   } else {
       thisevent = eventInfo->event_ID()->event_number();
@@ -89,10 +89,10 @@ StatusCode LArDigits2Ntuple::execute()
   const LArDigitContainer* DigitContainer = NULL;
   sc=evtStore()->retrieve(DigitContainer,m_contKey);  
   if (sc!=StatusCode::SUCCESS) {
-     msg(MSG::WARNING) << "Unable to retrieve LArDigitContainer with key " << m_contKey << " from DetectorStore. " << endmsg;
+     ATH_MSG_WARNING( "Unable to retrieve LArDigitContainer with key " << m_contKey << " from DetectorStore. " );
     } 
   else
-     msg(MSG::DEBUG) << "Got LArDigitContainer with key " << m_contKey << endmsg;
+     ATH_MSG_DEBUG( "Got LArDigitContainer with key " << m_contKey );
   
  
  if (DigitContainer) { 
@@ -101,10 +101,10 @@ StatusCode LArDigits2Ntuple::execute()
    LArDigitContainer::const_iterator it_e=DigitContainer->end();
 
     if(it == it_e) {
-      msg(MSG::DEBUG) << "LArDigitContainer with key=" << m_contKey << " is empty " << endmsg;
+      ATH_MSG_DEBUG( "LArDigitContainer with key=" << m_contKey << " is empty " );
       return StatusCode::SUCCESS;
     }else{
-      msg(MSG::DEBUG) << "LArDigitContainer with key=" << m_contKey << " has " <<DigitContainer->size() << " entries" <<endmsg;
+      ATH_MSG_DEBUG( "LArDigitContainer with key=" << m_contKey << " has " <<DigitContainer->size() << " entries" );
     }
 
    unsigned cellCounter=0;
@@ -120,7 +120,7 @@ StatusCode LArDigits2Ntuple::execute()
 
      if(trueMaxSample>m_Nsamples){
        if(!m_ipass){
-	 msg(MSG::WARNING) << "The number of samples in data is larger than the one specified by JO: " << trueMaxSample << " > " << m_Nsamples << " --> only " << m_Nsamples << " will be available in the ntuple " << endmsg;
+	 ATH_MSG_WARNING( "The number of samples in data is larger than the one specified by JO: " << trueMaxSample << " > " << m_Nsamples << " --> only " << m_Nsamples << " will be available in the ntuple " );
 	 m_ipass=1;
        }
        trueMaxSample = m_Nsamples;
@@ -139,12 +139,12 @@ StatusCode LArDigits2Ntuple::execute()
 
      sc=ntupleSvc()->writeRecord(m_nt);
      if (sc!=StatusCode::SUCCESS) {
-       msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return sc;
      }
      cellCounter++;
    }// over cells 
  } 
- msg(MSG::DEBUG) << "LArDigits2Ntuple has finished." << endmsg;
+ ATH_MSG_DEBUG( "LArDigits2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArFEBTemp2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArFEBTemp2Ntuple.cxx
index 2315f957c6c242c69d22198b9ad4eca28869670b..1637988ced2f8aa3e86f1b935c8d36c8037bb4ec 100644
--- a/LArCalorimeter/LArCalibTools/src/LArFEBTemp2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArFEBTemp2Ntuple.cxx
@@ -25,39 +25,36 @@ StatusCode LArFEBTemp2Ntuple::stop() {
  
    sc=m_nt->addItem("temp1",temp1,-1000.,5000.);
    if (sc!=StatusCode::SUCCESS)
-     {(*m_log) << MSG::ERROR << "addItem 'temp1' failed" << endmsg;
+     {ATH_MSG_ERROR( "addItem 'temp1' failed" );
 	return StatusCode::FAILURE;
      }
    
    sc=m_nt->addItem("temp2",temp2,-1000.,5000.);
    if (sc!=StatusCode::SUCCESS)
-     {(*m_log) << MSG::ERROR << "addItem 'temp2' failed" << endmsg;
+     {ATH_MSG_ERROR( "addItem 'temp2' failed" );
 	return StatusCode::FAILURE;
      }
    
    IToolSvc* toolSvc=0;
    sc = service( "ToolSvc",toolSvc);
-   if (sc!=StatusCode::SUCCESS) 
-     {
-	(*m_log)  << MSG::ERROR << "Unable to retrieve IToolSvc"
-	  << endmsg;
-     }   
+   if (sc!=StatusCode::SUCCESS) {
+	ATH_MSG_ERROR( "Unable to retrieve IToolSvc");
+   }   
 
    ILArFEBTempTool *larFEBTempTool;
    sc = toolSvc->retrieveTool("LArFEBTempTool", larFEBTempTool);
    if (sc!=StatusCode::SUCCESS) {
-      (*m_log)  << MSG::ERROR << "Unable to retrieve LArFEBTempTool from ToolSvc" << endmsg;
+      ATH_MSG_ERROR( "Unable to retrieve LArFEBTempTool from ToolSvc" );
       return StatusCode::FAILURE;
    } 
 
    std::vector<HWIdentifier>::const_iterator itOnId = m_onlineId->channel_begin();
    std::vector<HWIdentifier>::const_iterator itOnIdEnd = m_onlineId->channel_end();
 
-   for(; itOnId!=itOnIdEnd;++itOnId)
-     {
+   for(; itOnId!=itOnIdEnd;++itOnId) {
 	const HWIdentifier hwid = *itOnId;
 	FEBTemp tv = larFEBTempTool->getFebTemp(hwid);
-        (*m_log)  << MSG::DEBUG << hwid << " " << tv.size()<<endmsg;
+        ATH_MSG_DEBUG( hwid << " " << tv.size() );
 	
 	if( !tv.empty() )
 	  {	     	 
@@ -75,14 +72,14 @@ StatusCode LArFEBTemp2Ntuple::stop() {
 	      
 		  if (sc!=StatusCode::SUCCESS) 
 		    {
-		       (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+		       ATH_MSG_ERROR( "writeRecord failed" );
 		       return StatusCode::FAILURE;
 		    }
 	       }	     
 	  }	
      }
    
-   (*m_log) << MSG::INFO << "LArFEBTemp2Ntuple has finished." << endmsg;
+   ATH_MSG_INFO( "LArFEBTemp2Ntuple has finished." );
    
    return StatusCode::SUCCESS;
    
diff --git a/LArCalorimeter/LArCalibTools/src/LArFebTimeOffset2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArFebTimeOffset2Ntuple.cxx
index 014bd88e1125dbaadf92cf58facaf77fffa10292..348e500e72b05f8e7cfd9cc093198a15afa71e49 100644
--- a/LArCalorimeter/LArCalibTools/src/LArFebTimeOffset2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArFebTimeOffset2Ntuple.cxx
@@ -41,7 +41,7 @@ StatusCode LArFebTimeOffset2Ntuple::stop() {
   const LArFEBTimeOffset* feboffsets;
   //if (detStore()->retrieve(feboffsets,m_inputContainer).isFailure()) {
   if (detStore()->retrieve(feboffsets).isFailure()) {
-    msg(MSG::ERROR) << "Failed to retrieve LArFEBTimeOffset with key " << m_inputContainer << endmsg;
+    ATH_MSG_ERROR( "Failed to retrieve LArFEBTimeOffset with key " << m_inputContainer );
     return StatusCode::FAILURE;
   }
   
@@ -62,7 +62,7 @@ StatusCode LArFebTimeOffset2Ntuple::stop() {
 
       StatusCode sc=ntupleSvc()->writeRecord(m_nt);
       if (sc!=StatusCode::SUCCESS) {
-	msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	ATH_MSG_ERROR( "writeRecord failed" );
 	return StatusCode::FAILURE;
       }
     }//end if have value
diff --git a/LArCalorimeter/LArCalibTools/src/LArFillDSPConfig.cxx b/LArCalorimeter/LArCalibTools/src/LArFillDSPConfig.cxx
index 2bb12d9426a514544618b838b67bd4220051f3f0..ab489ca816adab523e0a49b07737a417a40dccf4 100644
--- a/LArCalorimeter/LArCalibTools/src/LArFillDSPConfig.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArFillDSPConfig.cxx
@@ -21,6 +21,7 @@ LArFillDSPConfig::LArFillDSPConfig( const std::string& name,
 {
   declareProperty("Foldername",m_folderName="/LAR/Configuraton/DSPConfiguration");
   declareProperty("Dump",m_dump=true);
+  declareProperty("isLowMu",m_lowmu=false);
 }
 
 // Destructor
@@ -39,7 +40,7 @@ StatusCode LArFillDSPConfig::stop() {
 
   StatusCode sc=detStore()->retrieve(m_onlineID);
   if (sc.isFailure()) {
-    msg(MSG::ERROR) << "Failed to get LArOnlineID" << endmsg;
+    ATH_MSG_ERROR( "Failed to get LArOnlineID" );
     return sc;
   }
 
@@ -50,7 +51,11 @@ StatusCode LArFillDSPConfig::stop() {
   
   for (unsigned iFeb=0;iFeb<nFebs;++iFeb) {
     const HWIdentifier febId=m_onlineID->feb_Id(iFeb);
-    const bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECchannel(febId));
+    //bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECchannel(febId));
+    bool useMGRampIntercept=(m_onlineID->isEMBchannel(febId) || m_onlineID->isEMECOW(febId) );
+    if(m_lowmu) {
+       if(m_onlineID->isFCALchannel(febId)) useMGRampIntercept=true;
+    } 
     uint8_t peakSample=2;
     if (m_onlineID->isHECchannel(febId)) peakSample=1; //HEC: peak-sample=1
     larDSPConfig.set(iFeb,peakSample,useMGRampIntercept);
@@ -59,7 +64,7 @@ StatusCode LArFillDSPConfig::stop() {
   
   std::unique_ptr<AthenaAttributeList> pAttrList(larDSPConfig.attributeList());
   ATH_CHECK(detStore()->record(std::move(pAttrList),m_folderName));
-  msg(MSG::INFO) << "Successfully recorded AthenaAttributeList containing DSP configuration for " << nFebs << " Febs" << endmsg;
+  ATH_MSG_INFO( "Successfully recorded AthenaAttributeList containing DSP configuration for " << nFebs << " Febs" );
 
   if (m_dump) {
     //Crosscheck:
diff --git a/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx
index 857843fca42bfdbf25437a697b8d27bfaaea9374..d8f9f7b2222f992648a139afbd4f317ba7b24a57 100644
--- a/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArGainThresholds2Ntuple.cxx
@@ -36,6 +36,17 @@ StatusCode LArGainThresholds2Ntuple::stop() {
      ATH_MSG_ERROR( "Unable to retrieve LArFebConfig with key " << m_configKey.key());
      return StatusCode::FAILURE;
    }
+   StatusCode sc=m_nt->addItem("lower",lower,-1000,5000);
+   if (sc!=StatusCode::SUCCESS) {
+     ATH_MSG_ERROR( "addItem 'lower' failed" );
+     return StatusCode::FAILURE;
+   }
+   
+   sc=m_nt->addItem("upper",upper,-1000.,5000.);
+   if (sc!=StatusCode::SUCCESS) {
+     ATH_MSG_ERROR( "addItem 'upper' failed" );
+     return StatusCode::FAILURE;
+   }
 
    ATH_CHECK(m_nt->addItem("lower",lower,-1000,5000));
    ATH_CHECK(m_nt->addItem("upper",upper,-1000.,5000.));
diff --git a/LArCalorimeter/LArCalibTools/src/LArHVScaleCorr2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArHVScaleCorr2Ntuple.cxx
index 53a4875b679750c0a10190e076a86a5e660fbf07..f28024982e187219b904dfb59fe123a6d68bd23e 100644
--- a/LArCalorimeter/LArCalibTools/src/LArHVScaleCorr2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArHVScaleCorr2Ntuple.cxx
@@ -25,8 +25,8 @@ StatusCode LArHVScaleCorr2Ntuple::stop() {
   const ILArHVScaleCorr* larHVScaleCorr;
   StatusCode sc=m_detStore->retrieve(larHVScaleCorr,m_contKey);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log)  << MSG::ERROR << "Unable to retrieve ILArHVScaleCorr with key " 
-	      << m_contKey << " from DetectorStore" << endmsg;
+    ATH_MSG_ERROR( "Unable to retrieve ILArHVScaleCorr with key " 
+	      << m_contKey << " from DetectorStore" );
     return StatusCode::FAILURE;
     } 
 
@@ -34,7 +34,7 @@ StatusCode LArHVScaleCorr2Ntuple::stop() {
 
  sc=m_nt->addItem("hvcorr",corr,-1000.,2.);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'corr' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'corr' failed" );
     return StatusCode::FAILURE;
    }
 
@@ -57,7 +57,7 @@ StatusCode LArHVScaleCorr2Ntuple::stop() {
 	 corr=value;
 	 sc=ntupleSvc()->writeRecord(m_nt);
 	 if (sc!=StatusCode::SUCCESS) {
-	   (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+	   ATH_MSG_ERROR( "writeRecord failed" );
 	   return StatusCode::FAILURE;
 	 }
        }// end if object exists
@@ -65,6 +65,6 @@ StatusCode LArHVScaleCorr2Ntuple::stop() {
   cellCounter++;
  }//end loop over online ID
 
- (*m_log)  << MSG::INFO << "LArHVScaleCorr2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LArHVScaleCorr2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArMphysOverMcal2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArMphysOverMcal2Ntuple.cxx
index 2d96cc2b1c129de582d846e48a2adaedb62271dd..06c4d4df744a2d2220fa3a183f1ce35ca7ca0d85 100644
--- a/LArCalorimeter/LArCalibTools/src/LArMphysOverMcal2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArMphysOverMcal2Ntuple.cxx
@@ -32,8 +32,8 @@ StatusCode LArMphysOverMcal2Ntuple::stop() {
   StatusCode sc;
   sc=m_detStore->retrieve(larMphysOverMcal,m_contKey);
   if (sc!=StatusCode::SUCCESS) {
-     (*m_log)  << MSG::ERROR << "Unable to retrieve ILArMphysOverMcal with key " 
-               << m_contKey << " from DetectorStore" << endmsg;
+     ATH_MSG_ERROR( "Unable to retrieve ILArMphysOverMcal with key " 
+               << m_contKey << " from DetectorStore" );
      return StatusCode::FAILURE;
   }
 
@@ -42,22 +42,22 @@ StatusCode LArMphysOverMcal2Ntuple::stop() {
 
  sc=m_nt->addItem("icell",cellIndex,0,2000);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
    }
 
  sc=m_nt->addItem("gain",gain,0,3);
- if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+ if (sc!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
-   }
+ }
 
 
  sc=m_nt->addItem("mphysovermcal",mpmc,-1000.,2.);
- if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'mphysovermcal' failed" << endmsg;
+ if (sc!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR( "addItem 'mphysovermcal' failed" );
     return StatusCode::FAILURE;
-   }
+ }
 
 
  SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{m_cablingKey};
@@ -80,7 +80,7 @@ StatusCode LArMphysOverMcal2Ntuple::stop() {
 	 mpmc = larMphysOverMcal->MphysOverMcal(hwid,igain);
 	 sc=ntupleSvc()->writeRecord(m_nt);
 	 if (sc!=StatusCode::SUCCESS) {
-	   (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+	   ATH_MSG_ERROR( "writeRecord failed" );
 	   return StatusCode::FAILURE;
 	 }
      }//end if isConnected
@@ -88,7 +88,7 @@ StatusCode LArMphysOverMcal2Ntuple::stop() {
   }//end loop over online ID
  } // ovr gains
 
- (*m_log)  << MSG::INFO << "LArMphysOverMcal2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LArMphysOverMcal2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCalibTools/src/LArNoise2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArNoise2Ntuple.cxx
index 84035dcb308efefebdfcd5a3bbc710f6df38ed09..cae20e1e0f8bac0b6cadd25051a25e5aa11e98c8 100644
--- a/LArCalorimeter/LArCalibTools/src/LArNoise2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArNoise2Ntuple.cxx
@@ -34,8 +34,8 @@ StatusCode LArNoise2Ntuple::stop() {
   StatusCode sc;
   sc=m_detStore->retrieve(larNoise,m_contKey);
   if (sc!=StatusCode::SUCCESS) {
-     (*m_log)  << MSG::ERROR << "Unable to retrieve ILArNoise with key " 
-               << m_contKey << " from DetectorStore" << endmsg;
+     ATH_MSG_ERROR( "Unable to retrieve ILArNoise with key " 
+               << m_contKey << " from DetectorStore" );
      return StatusCode::FAILURE;
   }
 
@@ -44,20 +44,20 @@ StatusCode LArNoise2Ntuple::stop() {
 
  sc=m_nt->addItem("icell",cellIndex,0,2000);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
    }
 
  sc=m_nt->addItem("gain",gain,0,3);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
    }
 
 
  sc=m_nt->addItem("noise",noise);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'noise' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'noise' failed" );
     return StatusCode::FAILURE;
    }
 
@@ -81,7 +81,7 @@ StatusCode LArNoise2Ntuple::stop() {
 	 noise = larNoise->noise(hwid,igain);
 	 sc=ntupleSvc()->writeRecord(m_nt);
 	 if (sc!=StatusCode::SUCCESS) {
-	   (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+	   ATH_MSG_ERROR( "writeRecord failed" );
 	   return StatusCode::FAILURE;
 	 }
      }//end if isConnected
@@ -89,7 +89,7 @@ StatusCode LArNoise2Ntuple::stop() {
   }//end loop over online ID
  } // ovr gains
 
- (*m_log)  << MSG::INFO << "LArNoise2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LArNoise2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCalibTools/src/LArOFC2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArOFC2Ntuple.cxx
index c30525e316d33aeaa13184910ff6160a9d776461..47fc5d9872cf90be5409829e59fd419f370b8e35 100644
--- a/LArCalorimeter/LArCalibTools/src/LArOFC2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArOFC2Ntuple.cxx
@@ -31,7 +31,7 @@ StatusCode LArOFC2Ntuple::initialize() {
 	return StatusCode::FAILURE;
   }
   if ( m_isMC && m_OFCTool.retrieve().isFailure() ) {
-        (*m_log) <<  MSG::ERROR << "OFC tool required for MC conditions but not available" << endmsg;
+        ATH_MSG_ERROR( "OFC tool required for MC conditions but not available" );
         return StatusCode::FAILURE;
   }
 
@@ -47,39 +47,39 @@ StatusCode LArOFC2Ntuple::stop() {
   
   sc=m_nt->addItem("Gain",gain,-1,2);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
   }
 
   //Specific:
   sc=m_nt->addItem("TimeOffset",timeOffset,0,100);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'TimeOffset' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'TimeOffset' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("Phase",phase,0,49);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'phase' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'phase' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("PhaseTime",phasetime,0,800);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'PhaseTime' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'PhaseTime' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("nSamples",nSamples,0,100);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'nSamples' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'nSamples' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("OFCa",nSamples,OFCa);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'OFCa' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'OFCa' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("OFCb",nSamples,OFCb);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) <<  MSG::ERROR << "addItem 'OFCb' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'OFCb' failed" );
     return StatusCode::FAILURE;
   }
   
@@ -87,10 +87,10 @@ StatusCode LArOFC2Ntuple::stop() {
   const ILArOFC* larOFC = NULL ;
   //const LArOFCComplete* larOFC = NULL ;
   if ( !m_isMC ) {
-     (*m_log) <<  MSG::DEBUG << "Retrieving ILArOFC object with key " << m_contKey << endmsg;
+     ATH_MSG_DEBUG( "Retrieving ILArOFC object with key " << m_contKey );
      sc = m_detStore->retrieve(larOFC,m_contKey);
      if (sc.isFailure()) {
-       (*m_log) <<  MSG::ERROR << "Can't retrieve ILArOFC with key " << m_contKey << " from Conditions Store" << endmsg;
+       ATH_MSG_ERROR( "Can't retrieve ILArOFC with key " << m_contKey << " from Conditions Store" );
        return StatusCode::FAILURE;
      }
   }
@@ -111,8 +111,8 @@ StatusCode LArOFC2Ntuple::stop() {
      for (;it!=it_e;it++) {
       const HWIdentifier chid = *it;
       if (!cabling->isOnlineConnected(chid)) continue;
-        (*m_log) <<  MSG::VERBOSE << "Dumping OFC for channel 0x" << MSG::hex 
-	  << chid.get_compact() << MSG::dec << endmsg;
+        ATH_MSG_VERBOSE( "Dumping OFC for channel 0x" << MSG::hex 
+	  << chid.get_compact() << MSG::dec );
         ILArOFC::OFCRef_t ofc_a=m_OFCTool->OFC_a(chid,igain);
         ILArOFC::OFCRef_t ofc_b=m_OFCTool->OFC_b(chid,igain);
 	fillFromIdentifier(chid);
@@ -130,7 +130,7 @@ StatusCode LArOFC2Ntuple::stop() {
 	sc = ntupleSvc()->writeRecord(m_nt);
 	cellCounter++;
 	if (sc!=StatusCode::SUCCESS) {
-	  (*m_log) <<  MSG::ERROR << "writeRecord failed" << endmsg;
+	  ATH_MSG_ERROR( "writeRecord failed" );
 	  return StatusCode::FAILURE;
 	}
      }//loop over channels
@@ -138,8 +138,8 @@ StatusCode LArOFC2Ntuple::stop() {
      for (;it!=it_e;it++) {
       const HWIdentifier chid = *it;
       if ( !cabling->isOnlineConnected(chid)) continue;
-      (*m_log) <<  MSG::VERBOSE << "Dumping OFC for channel 0x" << MSG::hex
-          << chid.get_compact() << MSG::dec << endmsg;
+      ATH_MSG_VERBOSE( "Dumping OFC for channel 0x" << MSG::hex
+          << chid.get_compact() << MSG::dec );
       for (unsigned iphase=0;iphase<larOFC->nTimeBins(chid,igain);iphase++) {
         ILArOFC::OFCRef_t ofc_a=larOFC->OFC_a(chid,igain,iphase);
         //Check if we have OFC for this channel and gain
@@ -161,14 +161,14 @@ StatusCode LArOFC2Ntuple::stop() {
         sc = ntupleSvc()->writeRecord(m_nt);
         cellCounter++;
         if (sc!=StatusCode::SUCCESS) {
-          (*m_log) <<  MSG::ERROR << "writeRecord failed" << endmsg;
+          ATH_MSG_ERROR( "writeRecord failed" );
           return StatusCode::FAILURE;
         }
       }//loop over phases
      }//loop over channels
     } 
   }//loop over gains
-  (*m_log) <<  MSG::INFO << "Total number of cells = " << cellCounter << endmsg;
-  (*m_log) <<  MSG::INFO << "LArOFC2Ntuple has finished." << endmsg;
+  ATH_MSG_INFO( "Total number of cells = " << cellCounter );
+  ATH_MSG_INFO( "LArOFC2Ntuple has finished." );
   return StatusCode::SUCCESS;
 } // end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx b/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx
index 15c7236617762165e9f9167071979418b3ee0926..937380582a4b85e96867c4c36024ffc39f455d6b 100644
--- a/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArOFCBinAlg.cxx
@@ -26,7 +26,7 @@ LArOFCBinAlg::~LArOFCBinAlg() {}
 StatusCode LArOFCBinAlg::initialize() {
 
   //if(!m_perFebMG) {
-  // msg(MSG::ERROR) << "Not implemented yet....." <<endmsg;
+  // ATH_MSG_ERROR( "Not implemented yet....." );
   // return StatusCode::FAILURE;
   //}
   m_ntTitle="Bin";
@@ -55,7 +55,7 @@ StatusCode LArOFCBinAlg::execute() {
   if(m_perFebMG || m_perFeb) {
      rein.open(m_fileName.c_str(),std::ifstream::in);
      if (!rein.good()) {
-       msg(MSG::ERROR) << "Failed to open file " << m_fileName << endmsg;
+       ATH_MSG_ERROR( "Failed to open file " << m_fileName );
        return StatusCode::FAILURE;
      }
   }
@@ -94,7 +94,7 @@ StatusCode LArOFCBinAlg::execute() {
   CHECK(newCont->initialize());
   StatusCode sc=detStore()->record(newCont,m_outputContainer);
   if(sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "Failed to register container with key " << m_outputContainer << " to StoreGate" << endmsg;
+    ATH_MSG_ERROR( "Failed to register container with key " << m_outputContainer << " to StoreGate" );
   }
 
   SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{cablingKey()};
@@ -110,7 +110,7 @@ StatusCode LArOFCBinAlg::execute() {
   const LArFCAL_Base_ID* fcalId = idHelper->fcal_idHelper();
 
   for (int gain=0;gain<3;++gain) {
-    msg(MSG::INFO) << "Working on gain " << gain << endmsg;
+    ATH_MSG_INFO( "Working on gain " << gain );
     LArOFCBinComplete::ConstConditionsMapIterator it=oldCont->begin(gain);
     LArOFCBinComplete::ConstConditionsMapIterator it_e=oldCont->end(gain);
     for (;it!=it_e;++it) {
@@ -170,7 +170,7 @@ StatusCode LArOFCBinAlg::execute() {
 
       sc=ntupleSvc()->writeRecord(m_nt);
       if (sc!=StatusCode::SUCCESS) {
-	msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	ATH_MSG_ERROR( "writeRecord failed" );
 	return StatusCode::FAILURE;
       }
 
diff --git a/LArCalorimeter/LArCalibTools/src/LArParams2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArParams2Ntuple.cxx
index 4d144e0df0017db6f20ef0b203fea64ba92abb73..a62a9050027a84a4f682a1a3b1ebb55caa42298b 100644
--- a/LArCalorimeter/LArCalibTools/src/LArParams2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArParams2Ntuple.cxx
@@ -47,7 +47,7 @@ StatusCode LArParams2Ntuple::initialize() {
 
   
   if ( m_classNames.size() != m_nClasses ) { // should never happen! but just to be sure...
-    msg(MSG::FATAL) << "List of class names does not match foreseen number of classes, cannot go on!" << endmsg ;
+    ATH_MSG_FATAL( "List of class names does not match foreseen number of classes, cannot go on!" ) ;
     return StatusCode::FAILURE ;
   }
  
@@ -59,24 +59,24 @@ StatusCode LArParams2Ntuple::initialize() {
       ATH_MSG_DEBUG("key " << m_keylist[i] << " does not correspond to any foreseen class");
       return StatusCode::FAILURE ;
     } else {
-      msg(MSG::INFO) << "will dump " << m_keylist[i] << " to Ntuple" << endmsg ;
+      ATH_MSG_INFO( "will dump " << m_keylist[i] << " to Ntuple" ) ;
       m_dumpFlags.set(idx) ;
     }
   }
 
   if ( m_useAbstractInterface ) {
-    msg(MSG::INFO) << "All parameters will be accessed through abstract interface" << endmsg ;
+    ATH_MSG_INFO( "All parameters will be accessed through abstract interface" ) ;
     if ( ! m_allChannels2Ntuple ) {
-      msg(MSG::WARNING) << "This will force dumping to Ntuple all foreseen online channels!" << endmsg ;
+      ATH_MSG_WARNING( "This will force dumping to Ntuple all foreseen online channels!" ) ;
       m_allChannels2Ntuple = true ;
     }
   } else {
-    msg(MSG::INFO) << "All parameters will be accessed through their Complete/VsCalib class" << endmsg ;
+    ATH_MSG_INFO( "All parameters will be accessed through their Complete/VsCalib class" ) ;
   }
   if ( m_allChannels2Ntuple ) {
-    msg(MSG::INFO) << "All foreseen online channels will be written to Ntuple" << endmsg ;
+    ATH_MSG_INFO( "All foreseen online channels will be written to Ntuple" ) ;
   } else { 
-    msg(MSG::INFO) << "Only channels with sensible parameters will be written to Ntuple (default)" << endmsg ;
+    ATH_MSG_INFO( "Only channels with sensible parameters will be written to Ntuple (default)" ) ;
   }
 
   return LArCond2NtupleBase::initialize();
@@ -111,39 +111,39 @@ StatusCode LArParams2Ntuple::stop() {
 
   StatusCode sc=m_nt->addItem("cellIndex",ntcellIndex,0,2000);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'Cell Index' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("gain",ntgain,-1,2);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'Gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Gain' failed" );
     return StatusCode::FAILURE;
   }
 
   if ( m_dumpFlags[CaliPulseParamsComplete] ) {
     sc=m_nt->addItem("Tcal",ntTcal);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tcal' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tcal' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Fstep",ntFstep);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Fstep' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Fstep' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Offset",ntOffset);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Offset' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Offset' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("dTimeCal",ntdTimeCal);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'dTimeCal' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'dTimeCal' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("nCB",ntnCB);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'nCB' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'nCB' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -151,12 +151,12 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[DetCellParamsComplete] ) {
     sc=m_nt->addItem("Omega0",ntOmega0);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Omega0' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Omega0' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Taur",ntTaur);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Taur' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Taur' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -164,7 +164,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[PhysCaliTdiffComplete] ) {
     sc=m_nt->addItem("Tdiff",ntTdiff);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tdiff' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tdiff' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -172,7 +172,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[TdriftComplete] ) {
     sc=m_nt->addItem("Tdrift",ntTdrift);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tdrift' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tdrift' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -180,7 +180,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[MphysOverMcalComplete] ) {
     sc=m_nt->addItem("MphysOverMcal",ntMphysOverMcal);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'MphysOverMcal' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'MphysOverMcal' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -188,7 +188,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[RinjComplete] ) {
     sc=m_nt->addItem("Rinj",ntRinj);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Rinj' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Rinj' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -196,7 +196,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[TshaperComplete] ) {
     sc=m_nt->addItem("Tshaper",ntTshaper);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tshaper' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tshaper' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -204,7 +204,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[EMEC_CphiComplete] ) {
     sc=m_nt->addItem("EMEC_Cphi",ntEMEC_Cphi);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'EMEC_Cphi' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'EMEC_Cphi' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -212,7 +212,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[EMEC_HValphaComplete] ) {
     sc=m_nt->addItem("EMEC_HValpha",ntEMEC_HValpha);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'EMEC_HValpha' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'EMEC_HValpha' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -220,7 +220,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[EMEC_HVbetaComplete] ) {
     sc=m_nt->addItem("EMEC_HVbeta",ntEMEC_HVbeta);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'EMEC_HVbeta' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'EMEC_HVbeta' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -228,7 +228,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[CableLengthComplete] ) {
     sc=m_nt->addItem("CableLength",ntCableLength);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'CableLength' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'CableLength' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -236,7 +236,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[CableAttenuationComplete] ) {
     sc=m_nt->addItem("CableAttenuation",ntCableAttenuation);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'CableAttenuation' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'CableAttenuation' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -244,7 +244,7 @@ StatusCode LArParams2Ntuple::stop() {
   if ( m_dumpFlags[OFCBinComplete] ) {
     sc=m_nt->addItem("OFCBin",ntbin);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'OFCBin' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'OFCBin' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -430,7 +430,7 @@ StatusCode LArParams2Ntuple::stop() {
       const std::vector<bool> & flags = (map_it->second).flags() ;
       if ( flags.size() <= 0 ) continue ;
       if ( flags.size() < m_nClasses ) {  // should never happen...
-	msg(MSG::WARNING) << "... flags vector shorter than " << m_nClasses << ": " << flags.size() << endmsg ;
+	ATH_MSG_WARNING( "... flags vector shorter than " << m_nClasses << ": " << flags.size() ) ;
 	continue ;
       }
 
@@ -492,7 +492,7 @@ StatusCode LArParams2Ntuple::stop() {
       }
       sc=ntupleSvc()->writeRecord(m_nt);
       if (sc!=StatusCode::SUCCESS) {
-	msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	ATH_MSG_ERROR( "writeRecord failed" );
 	return StatusCode::FAILURE;
       }      
       ATH_MSG_DEBUG("... record written to ntuple");
@@ -511,7 +511,7 @@ StatusCode LArParams2Ntuple::scanReadoutChannels( const DATA*& data_object ) {
   bool     useGain    = LArParamsProperties::isGainDependent(data_object) ;
 
   if ( classIndex >= m_nClasses ) {
-    msg(MSG::ERROR) << "Class index " << classIndex << " beyond number of known classes: " << m_nClasses << endmsg ;
+    ATH_MSG_ERROR( "Class index " << classIndex << " beyond number of known classes: " << m_nClasses ) ;
     return StatusCode::FAILURE ;
   }
 
@@ -526,7 +526,7 @@ StatusCode LArParams2Ntuple::scanReadoutChannels( const DATA*& data_object ) {
   std::string dataName    =  m_classNames[classIndex] ;
 
   if ( dataName.substr(dataName.length()-8,8) != std::string("Complete") ) {
-    msg(MSG::ERROR) << "Function scanReadoutChannels cannot be called for data class " << dataName << endmsg ;
+    ATH_MSG_ERROR( "Function scanReadoutChannels cannot be called for data class " << dataName ) ;
     return StatusCode::FAILURE ;
   }
 
@@ -539,7 +539,7 @@ StatusCode LArParams2Ntuple::scanReadoutChannels( const DATA*& data_object ) {
   }
 
   if ( sc == StatusCode::FAILURE ) {
-    msg(MSG::ERROR) << "Could not retrieve " << dataName << " from detector store!" << endmsg ;
+    ATH_MSG_ERROR( "Could not retrieve " << dataName << " from detector store!" ) ;
     return sc ;
   } 
 
@@ -582,7 +582,7 @@ StatusCode LArParams2Ntuple::scanCalibChannels( const DATA*& data_object ) {
   unsigned classIndex = LArParamsProperties::getClassIndex(data_object) ;
   //bool     useGain    = LArParamsProperties::isGainDependent(data_object) ;
   if ( classIndex >= m_nClasses ) {
-    msg(MSG::ERROR) << "Class index " << classIndex << " beyond number of known classes: " << m_nClasses << endmsg ;
+    ATH_MSG_ERROR( "Class index " << classIndex << " beyond number of known classes: " << m_nClasses ) ;
     return StatusCode::FAILURE ;
   }
 
@@ -590,7 +590,7 @@ StatusCode LArParams2Ntuple::scanCalibChannels( const DATA*& data_object ) {
   std::string dataName    =  m_classNames[classIndex] ;
 
   if ( dataName.substr(dataName.length()-7,7) != std::string("VsCalib") ) {
-    msg(MSG::ERROR) << "Function scanCalibChannels cannot be called for data class " << dataName << endmsg ;
+    ATH_MSG_ERROR( "Function scanCalibChannels cannot be called for data class " << dataName ) ;
     return StatusCode::FAILURE ;
   }
 
@@ -603,7 +603,7 @@ StatusCode LArParams2Ntuple::scanCalibChannels( const DATA*& data_object ) {
   }
 
   if ( sc == StatusCode::FAILURE ) {
-    msg(MSG::ERROR) << "Could not retrieve " << dataName << " from detector store!" << endmsg ;
+    ATH_MSG_ERROR( "Could not retrieve " << dataName << " from detector store!" ) ;
     return sc ;
   } 
 
@@ -626,8 +626,8 @@ StatusCode LArParams2Ntuple::scanCalibChannels( const DATA*& data_object ) {
       unsigned p_n  =  m_onlineId->pos_neg(cb_HWid) ;
       unsigned ft   =  m_onlineId->feedthrough(cb_HWid) ;
       unsigned slot =  m_onlineId->slot(cb_HWid) ;
-      msg(MSG::VERBOSE) << "    ... B/EC=" << b_ec << " P/N=" << p_n << " FT=" << ft << " slot=" << slot 
-			<< " nchan=" << nchan << endmsg ;
+      ATH_MSG_VERBOSE( "    ... B/EC=" << b_ec << " P/N=" << p_n << " FT=" << ft << " slot=" << slot 
+			<< " nchan=" << nchan ) ;
     }//end if verbose
 
     for ( unsigned ichan=0 ; ichan<nchan ; ichan++ ) { // loop through channels in a CB
@@ -656,7 +656,7 @@ StatusCode LArParams2Ntuple::retrieveFromDetStore( const DATA*& data_object ) {
   unsigned classIndex = LArParamsProperties::getClassIndex(data_object) ;
   //bool     useGain    = LArParamsProperties::isGainDependent(data_object) ;
   if ( classIndex >= m_nClasses ) {
-    msg(MSG::ERROR) << "Class index " << classIndex << " beyond number of known classes: " << m_nClasses << endmsg ;
+    ATH_MSG_ERROR( "Class index " << classIndex << " beyond number of known classes: " << m_nClasses ) ;
     return StatusCode::FAILURE ;
   }
   std::string detStoreKey =  m_detStoreKeys[classIndex] + m_suffix ;
@@ -666,7 +666,7 @@ StatusCode LArParams2Ntuple::retrieveFromDetStore( const DATA*& data_object ) {
     ATH_MSG_VERBOSE("Trying to retrieve " << dataName << " from detector store through abstract interface I" << detStoreKey << " ...");
     StatusCode sc = retrieveAbstractInterface(data_object) ;
     if ( sc == StatusCode::FAILURE ) {
-      msg(MSG::WARNING) << "Could not retrieve " << dataName << " from detector store!" << endmsg ;
+      ATH_MSG_WARNING( "Could not retrieve " << dataName << " from detector store!" ) ;
       return sc ;
     }
 
@@ -679,7 +679,7 @@ StatusCode LArParams2Ntuple::retrieveFromDetStore( const DATA*& data_object ) {
       StatusCode sc = m_detStore->retrieve(data_object) ;
     }
     if ( sc == StatusCode::FAILURE ) {
-      msg(MSG::WARNING) << "Could not retrieve " << dataName << " from detector store!" << endmsg ;
+      ATH_MSG_WARNING( "Could not retrieve " << dataName << " from detector store!" ) ;
       return sc ;
     } 
 
@@ -772,13 +772,12 @@ inline StatusCode LArParams2Ntuple::retrieveAbstractInterface(const LArCableAtte
 /*
 void LArParams2Ntuple::dumpChannels() 
 {
-  MsgStream log(msgSvc(), name());
   if ( m_dumpAllOnlineChannels == std::string("") )  return ;
   //
   FILE* f = fopen( m_dumpAllOnlineChannels.c_str() , "w" ) ;
   if ( f == NULL ) {
-    msg(MSG::WARNING) << "Could not open file " << m_dumpAllOnlineChannels << endmsg ;
-    msg(MSG::WARNING) << "... channels dump cannot be done!" << endmsg ;
+    ATH_MSG_WARNING( "Could not open file " << m_dumpAllOnlineChannels ) ;
+    ATH_MSG_WARNING( "... channels dump cannot be done!" ) ;
     return ;
   }
   std::string subdet , comment , descr ;
@@ -786,13 +785,13 @@ void LArParams2Ntuple::dumpChannels()
  
   std::vector<HWIdentifier>::const_iterator chIt    =  m_onlineId->channel_begin() ;
   std::vector<HWIdentifier>::const_iterator chItEnd =  m_onlineId->channel_end() ;
-  msg(MSG::INFO) << "Dumping online read-out channels to file " << m_dumpAllOnlineChannels << endmsg; 
+  ATH_MSG_INFO( "Dumping online read-out channels to file " << m_dumpAllOnlineChannels ); 
   for ( ; chIt != chItEnd ; chIt++ ) {
     writeToFile(*chIt,f) ;
   }
   std::vector<HWIdentifier>::const_iterator chCalibIt    =  m_onlineId->calib_channel_begin() ;
   std::vector<HWIdentifier>::const_iterator chCalibItEnd =  m_onlineId->calib_channel_end() ;
-  msg(MSG::INFO) << "Dumping online calib channels to file " << m_dumpAllOnlineChannels << endmsg; 
+  ATH_MSG_INFO( "Dumping online calib channels to file " << m_dumpAllOnlineChannels ); 
   for ( ; chCalibIt != chCalibItEnd ; chCalibIt++ ) {
     writeToFile(*chCalibIt,f) ;
   }
diff --git a/LArCalorimeter/LArCalibTools/src/LArPedestals2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArPedestals2Ntuple.cxx
index faa0bcf723ae0ad9e194330b90074e171d2e4fd4..5ef42172825cb8215f64bca7124ecfa25a36515b 100755
--- a/LArCalorimeter/LArCalibTools/src/LArPedestals2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArPedestals2Ntuple.cxx
@@ -49,28 +49,28 @@ StatusCode LArPedestals2Ntuple::stop()
 
   StatusCode sc=m_nt->addItem("icell",cellIndex,0,200000);
   if (sc!=StatusCode::SUCCESS)
-    {(*m_log)  << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+    {ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
-   }
+  }
 
   sc=m_nt->addItem("gain",gain,0,3);
-  if (sc!=StatusCode::SUCCESS)
-    {(*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+  if (sc!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
-   }
+  }
 
 
   sc=m_nt->addItem("ped",ped,-1000.,5000.);
-  if (sc!=StatusCode::SUCCESS)
-    {(*m_log)  << MSG::ERROR << "addItem 'ped' failed" << endmsg;
+  if (sc!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR( "addItem 'ped' failed" );
     return StatusCode::FAILURE;
-    }
+  }
 
   sc=m_nt->addItem("rms",rms,0.,1e12);
-  if (sc!=StatusCode::SUCCESS)
-    {(*m_log)  << MSG::ERROR << "addItem 'rms' failed" << endmsg;
+  if (sc!=StatusCode::SUCCESS) {
+    ATH_MSG_ERROR( "addItem 'rms' failed" );
     return StatusCode::FAILURE;
-    }
+  }
 
 
  unsigned cellCounter=0;
@@ -89,7 +89,7 @@ StatusCode LArPedestals2Ntuple::stop()
 
        sc=ntupleSvc()->writeRecord(m_nt);
        if (sc!=StatusCode::SUCCESS) {
-	 (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+	 ATH_MSG_ERROR( "writeRecord failed" );
 	 return StatusCode::FAILURE;
        }
      }// end if Pedestal exists for this channel
@@ -97,7 +97,7 @@ StatusCode LArPedestals2Ntuple::stop()
    }//end loop over gains
  }//end loop over online ID
 
- (*m_log)  << MSG::INFO << "LArPedestals2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LArPedestals2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCalibTools/src/LArPhysCaliTDiffAlg.cxx b/LArCalorimeter/LArCalibTools/src/LArPhysCaliTDiffAlg.cxx
index c0778e3465d3f71eb5a2bf6d90122181ada5c252..735ca9d35448bd4f5874431d3d692969a4e27bbb 100644
--- a/LArCalorimeter/LArCalibTools/src/LArPhysCaliTDiffAlg.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArPhysCaliTDiffAlg.cxx
@@ -48,7 +48,7 @@ StatusCode LArPhysCaliTDiffAlg::execute() {
   if(m_perFebMG) offsetMap.resize(2); else offsetMap.resize(3);
   std::ifstream rein(m_fileName.c_str(),std::ifstream::in);
   if (!rein.good()) {
-    msg(MSG::ERROR) << "Failed to open file " << m_fileName << endmsg;
+    ATH_MSG_ERROR( "Failed to open file " << m_fileName );
     return StatusCode::SUCCESS;
   }
   
@@ -78,11 +78,11 @@ StatusCode LArPhysCaliTDiffAlg::execute() {
   CHECK(newCont->initialize());
   StatusCode sc=detStore()->record(newCont,m_outputContainer);
   if(sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "Failed to register container with key " << m_outputContainer << " to StoreGate" << endmsg;
+    ATH_MSG_ERROR( "Failed to register container with key " << m_outputContainer << " to StoreGate" );
   }
 
   for (int gain=0;gain<3;++gain) {
-    msg(MSG::INFO) << "Working on gain " << gain << endmsg;
+    ATH_MSG_INFO( "Working on gain " << gain );
     LArPhysCaliTdiffComplete::ConstConditionsMapIterator it=oldCont->begin(gain);
     LArPhysCaliTdiffComplete::ConstConditionsMapIterator it_e=oldCont->end(gain);
     for (;it!=it_e;++it) {
@@ -124,7 +124,7 @@ StatusCode LArPhysCaliTDiffAlg::execute() {
 
       sc=ntupleSvc()->writeRecord(m_nt);
       if (sc!=StatusCode::SUCCESS) {
-	msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	ATH_MSG_ERROR( "writeRecord failed" );
 	return StatusCode::FAILURE;
       }
 
diff --git a/LArCalorimeter/LArCalibTools/src/LArPhysWaves2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArPhysWaves2Ntuple.cxx
index 5bebf0a0645f7f6b7a53770f8ea01f6e5188e494..f4f7522ae2b5206f4a047c33640f00c0768af5b2 100644
--- a/LArCalorimeter/LArCalibTools/src/LArPhysWaves2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArPhysWaves2Ntuple.cxx
@@ -33,13 +33,13 @@ StatusCode LArPhysWaves2Ntuple::stop()
 
   sc=m_nt->addItem("gain",m_gain,0,3);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=m_nt->addItem("timeOffset",m_timeOffset,0.,100.);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'timeOffset' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'timeOffset' failed" );
     return StatusCode::FAILURE;
   }
 
@@ -47,7 +47,7 @@ StatusCode LArPhysWaves2Ntuple::stop()
   if (m_addCorrUndo) {
     sc=m_nt->addItem("corrUndo",m_corrUndo,0,1);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'corrUndo' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'corrUndo' failed" );
       return StatusCode::FAILURE;
     }
   }
@@ -56,24 +56,24 @@ StatusCode LArPhysWaves2Ntuple::stop()
     const std::string& key = m_keylist[k] ;
 
 
-    (*m_log) << MSG::INFO << "Processing WaveContainer from StoreGate! key=" << m_keylist[k] << endmsg; 
+    ATH_MSG_INFO( "Processing WaveContainer from StoreGate! key=" << m_keylist[k] ); 
     const LArPhysWaveContainer* physWaveContainer;
     LArPhysWaveContainer* physWaveContainer_nc;
     StatusCode sc;
     if (m_applyCorr) {
       sc = m_detStore->retrieve(physWaveContainer_nc,key);	    
       if (sc.isFailure()) {
-	(*m_log) << MSG::ERROR << "Cannot read non-const LArPhysWaveContainer from StoreGate! key=" << key << endmsg;
-	(*m_log) << MSG::ERROR << "The ApplyCorrection option works only for non-const containers!" << endmsg;
+	ATH_MSG_ERROR( "Cannot read non-const LArPhysWaveContainer from StoreGate! key=" << key );
+	ATH_MSG_ERROR( "The ApplyCorrection option works only for non-const containers!" );
 	return sc;
       }
       else
-	(*m_log) << MSG::INFO << "Read non-const LArPhysWaveContainer from StoreGate! key= "  << key << endmsg;
+	ATH_MSG_INFO( "Read non-const LArPhysWaveContainer from StoreGate! key= "  << key );
 
       if (!physWaveContainer_nc->correctionsApplied()) {
 	sc=physWaveContainer_nc->applyCorrections();
 	if (sc.isFailure()) {
-	  (*m_log) << MSG::ERROR << "Failed to apply corrections to LArPhysWaveContainer!" << endmsg;
+	  ATH_MSG_ERROR( "Failed to apply corrections to LArPhysWaveContainer!" );
 	}
       }
       physWaveContainer=physWaveContainer_nc;
@@ -81,10 +81,10 @@ StatusCode LArPhysWaves2Ntuple::stop()
     else {
       sc = m_detStore->retrieve(physWaveContainer,key);	    
       if (sc.isFailure()) {
-	(*m_log) << MSG::ERROR << "Cannot read LArPhysWaveContainer from StoreGate! key=" << key << endmsg;
+	ATH_MSG_ERROR( "Cannot read LArPhysWaveContainer from StoreGate! key=" << key );
 	return StatusCode::FAILURE;
       } else 
-	(*m_log) << MSG::INFO << "Read const LArPhysWaveContainer from StoreGate! key= "  << key << endmsg;
+	ATH_MSG_INFO( "Read const LArPhysWaveContainer from StoreGate! key= "  << key );
     }
     
     for (unsigned igain=CaloGain::LARHIGHGAIN;igain<CaloGain::LARNGAIN ;++igain){
@@ -100,7 +100,7 @@ StatusCode LArPhysWaves2Ntuple::stop()
 	m_timeOffset = wave.getTimeOffset();
 	sc=ntupleSvc()->writeRecord(m_nt);
 	if (sc!=StatusCode::SUCCESS) {
-	  (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	  ATH_MSG_ERROR( "writeRecord failed" );
 	  return sc;
 	}
       }//end loop over identifiers
@@ -118,14 +118,14 @@ StatusCode LArPhysWaves2Ntuple::stop()
 	  fillWave(chid,wave); //Fill method from base-class
 	  sc=ntupleSvc()->writeRecord(m_nt);
 	  if (sc!=StatusCode::SUCCESS) {
-	    (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	    ATH_MSG_ERROR( "writeRecord failed" );
 	    return sc;
 	  }
 	}//end loop over corrections
       }//end loop over gain
     }//end if addCorrUndo
   }//end loop over container keys
-  (*m_log) << MSG::INFO << "LArWave2Ntuple has finished." << endmsg;
+  ATH_MSG_INFO( "LArWave2Ntuple has finished." );
   return StatusCode::SUCCESS;
 } // end finalize-method.
 
diff --git a/LArCalorimeter/LArCalibTools/src/LArPulseShape.cxx b/LArCalorimeter/LArCalibTools/src/LArPulseShape.cxx
new file mode 100644
index 0000000000000000000000000000000000000000..c7771ea5ace1e498424459128f325b6e240b86e4
--- /dev/null
+++ b/LArCalorimeter/LArCalibTools/src/LArPulseShape.cxx
@@ -0,0 +1,473 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArCalibTools/LArPulseShape.h"
+#include "EventInfo/EventID.h"
+#include "LArIdentifier/LArOnlineID.h"
+#include "LArIdentifier/LArOnline_SuperCellID.h"
+#include "CaloIdentifier/CaloIdManager.h"
+#include "CaloIdentifier/CaloCell_ID.h"
+#include "LArRawEvent/LArDigitContainer.h"
+#include "LArCOOLConditions/LArDSPConfig.h"
+#include "CaloIdentifier/CaloGain.h"
+#include "TFile.h"
+#include "TKey.h"
+#include "TTree.h"
+#include "TSystem.h"
+#include "TSystem.h"
+
+LArPulseShape::LArPulseShape(const std::string& name, ISvcLocator* pSvcLocator): 
+  AthAlgorithm(name, pSvcLocator), m_initialized(false),  m_calo_id(0),  
+  m_nt(NULL) 
+{
+  declareProperty("NtupleTitle",m_ntTitle="Pulse shape");
+  m_ntpath="/NTUPLES/FILE1/"+m_ntname; 
+}
+
+LArPulseShape::~LArPulseShape() {
+}
+
+StatusCode LArPulseShape::initialize() {
+  ATH_CHECK( detStore()->retrieve( m_caloIdMgr ) );
+  m_calo_id      = m_caloIdMgr->getCaloCell_ID();
+
+  ATH_CHECK( m_lumiDataKey.initialize() );
+  
+  ATH_CHECK( m_cablingKey.initialize() ); 
+
+  ATH_CHECK( m_trigDec.retrieve() );
+
+  ATH_CHECK( m_evtInfoKey.initialize() );
+
+  if (m_ntpath.size()==0 || m_ntTitle.size()==0) {
+    ATH_MSG_ERROR( "Need to set variable 'm_ntpath' and 'm_ntTitle' in constructor of deriving class!" );
+    return StatusCode::FAILURE;
+  }
+
+  size_t i=m_ntpath.rfind('/');
+  if (i==std::string::npos) {
+    ATH_MSG_ERROR( "Expected at least on '/' in path " << m_ntpath );
+    return StatusCode::FAILURE;
+  }
+  std::string basepath(m_ntpath.begin(),m_ntpath.begin()+i);
+  std::cout << "Basepath" << basepath << std::endl;
+
+  NTupleFilePtr file1(ntupleSvc(),basepath);
+  if (!file1){
+    ATH_MSG_ERROR( "Could not get NTupleFilePtr with path " << basepath << " failed" );
+    return StatusCode::FAILURE;
+  }
+  NTuplePtr nt(ntupleSvc(),m_ntpath);
+  if (!nt) {
+    nt=ntupleSvc()->book(m_ntpath,CLID_ColumnWiseTuple,m_ntTitle);
+  }
+  if (!nt){
+    ATH_MSG_ERROR( "Booking of NTuple at "<< m_ntpath << " and name " << m_ntTitle << " failed" );
+    return StatusCode::FAILURE; 
+  }
+  
+  m_nt=nt;
+
+  int ncell=m_calo_id->calo_cell_hash_max();
+ 
+  for (int i=0;i<ncell;i++) { // loop over cells to book profiles
+  
+    IdentifierHash idHash=i;
+    Identifier id=m_calo_id->cell_id(idHash);
+
+    const int sampl = m_calo_id->sampling( id );
+    m_OffId = (int)(id.get_identifier32().get_compact());
+    std::string idoff_str = std::to_string(m_OffId);
+    m_id_char = (idoff_str).c_str();   
+   
+    if (m_calo_id->is_em(id)) {    // EM calo
+      if (m_calo_id->is_em_barrel(id)) { //EMB
+        if (m_calo_id->pos_neg(id) > 0 ) { //A-side
+	
+	  SmartDataPtr<NTuple::Directory> dir_EMBA(ntupleSvc(),"/NTUPLES/FILE1/EMBA");
+   	  if ( !dir_EMBA ) dir_EMBA = ntupleSvc()->createDirectory(file1,"EMBA");
+          if ( !dir_EMBA ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+                 
+          if (sampl==0){ // if it's EMBA Presampler
+            SmartDataPtr<NTuple::Directory> dir_EMBA_0(ntupleSvc(),"/NTUPLES/FILE1/EMBA/Presampler");
+  	    if ( !dir_EMBA_0 ) dir_EMBA_0 = ntupleSvc()->createDirectory(file1,"EMBA/Presampler");
+            if ( !dir_EMBA_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+  	  }
+	  
+	  if (sampl==1){ // if it's EMBA Sampling1
+  	    SmartDataPtr<NTuple::Directory> dir_EMBA_1(ntupleSvc(),"/NTUPLES/FILE1/EMBA/Sampling1");
+  	    if ( !dir_EMBA_1 ) dir_EMBA_1 = ntupleSvc()->createDirectory(file1,"EMBA/Sampling1");
+  	    if ( !dir_EMBA_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+  	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }	     
+	  
+	  if (sampl==2){ // if it's EMBA Sampling2
+  	    SmartDataPtr<NTuple::Directory> dir_EMBA_2(ntupleSvc(),"/NTUPLES/FILE1/EMBA/Sampling2");
+  	    if ( !dir_EMBA_2 ) dir_EMBA_2 = ntupleSvc()->createDirectory(file1,"EMBA/Sampling2");
+  	    if ( !dir_EMBA_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+ 	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  
+	  if (sampl==3){ // if it's EMBA Sampling3
+  	    SmartDataPtr<NTuple::Directory> dir_EMBA_3(ntupleSvc(),"/NTUPLES/FILE1/EMBA/Sampling3");
+  	    if ( !dir_EMBA_3 ) dir_EMBA_3 = ntupleSvc()->createDirectory(file1,"EMBA/Sampling3");
+  	    if ( !dir_EMBA_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  		  
+        } else {  // C-side
+	
+	  SmartDataPtr<NTuple::Directory> dir_EMBC(ntupleSvc(),"/NTUPLES/FILE1/EMBC");
+   	  if ( !dir_EMBC ) dir_EMBC = ntupleSvc()->createDirectory(file1,"EMBC");
+   	  if ( !dir_EMBC ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          if (sampl==0){ // if it's EMBC Presampler
+            SmartDataPtr<NTuple::Directory> dir_EMBC_0(ntupleSvc(),"/NTUPLES/FILE1/EMBC/Presampler");
+  	    if ( !dir_EMBC_0 ) dir_EMBC_0 = ntupleSvc()->createDirectory(file1,"EMBC/Presampler");
+            if ( !dir_EMBC_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+            m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+  	  }
+	  
+	  if (sampl==1){ // if it's EMBC Sampling1
+  	    SmartDataPtr<NTuple::Directory> dir_EMBC_1(ntupleSvc(),"/NTUPLES/FILE1/EMBC/Sampling1");
+  	    if ( !dir_EMBC_1 ) dir_EMBC_1 = ntupleSvc()->createDirectory(file1,"EMBC/Sampling1");
+  	    if ( !dir_EMBC_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+  	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }	     
+	  
+	  if (sampl==2){ // if it's EMBC Sampling2
+  	    SmartDataPtr<NTuple::Directory> dir_EMBC_2(ntupleSvc(),"/NTUPLES/FILE1/EMBC/Sampling2");
+  	    if ( !dir_EMBC_2 ) dir_EMBC_2 = ntupleSvc()->createDirectory(file1,"EMBC/Sampling2");
+  	    if ( !dir_EMBC_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+ 	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  
+	  if (sampl==3){ // if it's EMBC Sampling3
+  	    SmartDataPtr<NTuple::Directory> dir_EMBC_3(ntupleSvc(),"/NTUPLES/FILE1/EMBC/Sampling3");
+  	    if ( !dir_EMBC_3 ) dir_EMBC_3 = ntupleSvc()->createDirectory(file1,"EMBC/Sampling3");
+  	    if ( !dir_EMBC_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  		     
+	} 
+	
+      } // end EMB
+      
+      if( m_calo_id->is_em_endcap(id) ){ //EMEC
+      
+        if (m_calo_id->pos_neg(id) > 0 ) { //A-side
+	
+	  SmartDataPtr<NTuple::Directory> dir_EMECA(ntupleSvc(),"/NTUPLES/FILE1/EMECA");
+   	  if ( !dir_EMECA ) dir_EMECA = ntupleSvc()->createDirectory(file1,"EMECA");
+          if ( !dir_EMECA ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+                 
+          if (sampl==0){ // if it's EMECA Presampler
+            SmartDataPtr<NTuple::Directory> dir_EMECA_0(ntupleSvc(),"/NTUPLES/FILE1/EMECA/Presampler");
+  	    if ( !dir_EMECA_0 ) dir_EMECA_0 = ntupleSvc()->createDirectory(file1,"EMECA/Presampler");
+            if ( !dir_EMECA_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+   
+            //stopper++;
+	    //if (stopper<=10) 
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+  	  }
+	  
+	  if (sampl==1){ // if it's EMECA Sampling1
+  	    SmartDataPtr<NTuple::Directory> dir_EMECA_1(ntupleSvc(),"/NTUPLES/FILE1/EMECA/Sampling1");
+  	    if ( !dir_EMECA_1 ) dir_EMECA_1 = ntupleSvc()->createDirectory(file1,"EMECA/Sampling1");
+  	    if ( !dir_EMECA_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+  	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }	     
+	  
+	  if (sampl==2){ // if it's EMECA Sampling2
+  	    SmartDataPtr<NTuple::Directory> dir_EMECA_2(ntupleSvc(),"/NTUPLES/FILE1/EMECA/Sampling2");
+  	    if ( !dir_EMECA_2 ) dir_EMECA_2 = ntupleSvc()->createDirectory(file1,"EMECA/Sampling2");
+  	    if ( !dir_EMECA_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+ 	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  
+	  if (sampl==3){ // if it's EMECA Sampling3
+  	    SmartDataPtr<NTuple::Directory> dir_EMECA_3(ntupleSvc(),"/NTUPLES/FILE1/EMECA/Sampling3");
+  	    if ( !dir_EMECA_3 ) dir_EMECA_3 = ntupleSvc()->createDirectory(file1,"EMECA/Sampling3");
+  	    if ( !dir_EMECA_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  		  
+        } else {  // C-side
+	
+	  SmartDataPtr<NTuple::Directory> dir_EMECC(ntupleSvc(),"/NTUPLES/FILE1/EMECC");
+   	  if ( !dir_EMECC ) dir_EMECC = ntupleSvc()->createDirectory(file1,"EMECC");
+   	  if ( !dir_EMECC ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          if (sampl==0){ // if it's EMECC Presampler
+            SmartDataPtr<NTuple::Directory> dir_EMECC_0(ntupleSvc(),"/NTUPLES/FILE1/EMECC/Presampler");
+  	    if ( !dir_EMECC_0 ) dir_EMECC_0 = ntupleSvc()->createDirectory(file1,"EMECC/Presampler");
+            if ( !dir_EMECC_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+            m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+  	  }
+	  
+	  if (sampl==1){ // if it's EMECC Sampling1
+  	    SmartDataPtr<NTuple::Directory> dir_EMECC_1(ntupleSvc(),"/NTUPLES/FILE1/EMECC/Sampling1");
+  	    if ( !dir_EMECC_1 ) dir_EMECC_1 = ntupleSvc()->createDirectory(file1,"EMECC/Sampling1");
+  	    if ( !dir_EMECC_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+  	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }	     
+	  
+	  if (sampl==2){ // if it's EMECC Sampling2
+  	    SmartDataPtr<NTuple::Directory> dir_EMECC_2(ntupleSvc(),"/NTUPLES/FILE1/EMECC/Sampling2");
+  	    if ( !dir_EMECC_2 ) dir_EMECC_2 = ntupleSvc()->createDirectory(file1,"EMECC/Sampling2");
+  	    if ( !dir_EMECC_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+ 	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  
+	  if (sampl==3){ // if it's EMECC Sampling3
+  	    SmartDataPtr<NTuple::Directory> dir_EMECC_3(ntupleSvc(),"/NTUPLES/FILE1/EMECC/Sampling3");
+  	    if ( !dir_EMECC_3 ) dir_EMECC_3 = ntupleSvc()->createDirectory(file1,"EMECC/Sampling3");
+  	    if ( !dir_EMECC_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+	    m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));			    
+  	  }
+	  		     
+	}       
+      } // end EMEC
+      
+	  
+	        
+    } // end EM calo
+    
+    if( m_calo_id->is_hec(id) ){ //HEC
+    
+      if (m_calo_id->pos_neg(id) > 0 ) { //A-side
+
+        SmartDataPtr<NTuple::Directory> dir_HECA(ntupleSvc(),"/NTUPLES/FILE1/HECA");
+        if ( !dir_HECA ) dir_HECA = ntupleSvc()->createDirectory(file1,"HECA");
+    	if ( !dir_HECA ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+    	       
+    	if (sampl==0){
+    	  SmartDataPtr<NTuple::Directory> dir_HECA_0(ntupleSvc(),"/NTUPLES/FILE1/HECA/Layer1");
+          if ( !dir_HECA_0 ) dir_HECA_0 = ntupleSvc()->createDirectory(file1,"HECA/Layer1");
+    	  if ( !dir_HECA_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+        }
+        
+        if (sampl==1){
+          SmartDataPtr<NTuple::Directory> dir_HECA_1(ntupleSvc(),"/NTUPLES/FILE1/HECA/Layer2");
+          if ( !dir_HECA_1 ) dir_HECA_1 = ntupleSvc()->createDirectory(file1,"HECA/Layer2");
+          if ( !dir_HECA_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }	   
+        
+        if (sampl==2){
+          SmartDataPtr<NTuple::Directory> dir_HECA_2(ntupleSvc(),"/NTUPLES/FILE1/HECA/Layer3");
+          if ( !dir_HECA_2 ) dir_HECA_2 = ntupleSvc()->createDirectory(file1,"HECA/Layer3");
+          if ( !dir_HECA_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        
+        if (sampl==3){
+          SmartDataPtr<NTuple::Directory> dir_HECA_3(ntupleSvc(),"/NTUPLES/FILE1/HECA/Layer4");
+          if ( !dir_HECA_3 ) dir_HECA_3 = ntupleSvc()->createDirectory(file1,"HECA/Layer4");
+          if ( !dir_HECA_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        		
+      } else {  // C-side
+
+        SmartDataPtr<NTuple::Directory> dir_HECC(ntupleSvc(),"/NTUPLES/FILE1/HECC");
+        if ( !dir_HECC ) dir_HECC = ntupleSvc()->createDirectory(file1,"HECC");
+        if ( !dir_HECC ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+    	if (sampl==0){ 
+    	  SmartDataPtr<NTuple::Directory> dir_HECC_0(ntupleSvc(),"/NTUPLES/FILE1/HECC/Layer1");
+          if ( !dir_HECC_0 ) dir_HECC_0 = ntupleSvc()->createDirectory(file1,"HECC/Layer1");
+    	  if ( !dir_HECC_0 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+    	  m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" )));
+        }
+        
+        if (sampl==1){
+          SmartDataPtr<NTuple::Directory> dir_HECC_1(ntupleSvc(),"/NTUPLES/FILE1/HECC/Layer2");
+          if ( !dir_HECC_1 ) dir_HECC_1 = ntupleSvc()->createDirectory(file1,"HECC/Layer2");
+          if ( !dir_HECC_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }	   
+        
+        if (sampl==2){ 
+          SmartDataPtr<NTuple::Directory> dir_HECC_2(ntupleSvc(),"/NTUPLES/FILE1/HECC/Layer3");
+          if ( !dir_HECC_2 ) dir_HECC_2 = ntupleSvc()->createDirectory(file1,"HECC/Layer3");
+          if ( !dir_HECC_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        
+        if (sampl==3){ 
+          SmartDataPtr<NTuple::Directory> dir_HECC_3(ntupleSvc(),"/NTUPLES/FILE1/HECC/Layer4");
+          if ( !dir_HECC_3 ) dir_HECC_3 = ntupleSvc()->createDirectory(file1,"HECC/Layer4");
+          if ( !dir_HECC_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        		   
+      }       
+    } // end HEC      
+    if( m_calo_id->is_fcal(id) ){ //FCAL
+    
+      if (m_calo_id->pos_neg(id) > 0 ) { //A-side
+
+        SmartDataPtr<NTuple::Directory> dir_FCALA(ntupleSvc(),"/NTUPLES/FILE1/FCALA");
+        if ( !dir_FCALA ) dir_FCALA = ntupleSvc()->createDirectory(file1,"FCALA");
+    	if ( !dir_FCALA ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+        
+        if (sampl==1){ // if it's FCALA Sampling1
+          SmartDataPtr<NTuple::Directory> dir_FCALA_1(ntupleSvc(),"/NTUPLES/FILE1/FCALA/Sampling1");
+          if ( !dir_FCALA_1 ) dir_FCALA_1 = ntupleSvc()->createDirectory(file1,"FCALA/Sampling1");
+          if ( !dir_FCALA_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }	   
+        
+        if (sampl==2){ // if it's FCALA Sampling2
+          SmartDataPtr<NTuple::Directory> dir_FCALA_2(ntupleSvc(),"/NTUPLES/FILE1/FCALA/Sampling2");
+          if ( !dir_FCALA_2 ) dir_FCALA_2 = ntupleSvc()->createDirectory(file1,"FCALA/Sampling2");
+          if ( !dir_FCALA_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        
+        if (sampl==3){ // if it's FCALA Sampling3
+          SmartDataPtr<NTuple::Directory> dir_FCALA_3(ntupleSvc(),"/NTUPLES/FILE1/FCALA/Sampling3");
+          if ( !dir_FCALA_3 ) dir_FCALA_3 = ntupleSvc()->createDirectory(file1,"FCALA/Sampling3");
+          if ( !dir_FCALA_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        	
+      } else {  // C-side
+
+        SmartDataPtr<NTuple::Directory> dir_FCALC(ntupleSvc(),"/NTUPLES/FILE1/FCALC");
+        if ( !dir_FCALC ) dir_FCALC = ntupleSvc()->createDirectory(file1,"FCALC");
+        if ( !dir_FCALC ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+
+        if (sampl==1){ // if it's FCALC Sampling1
+          SmartDataPtr<NTuple::Directory> dir_FCALC_1(ntupleSvc(),"/NTUPLES/FILE1/FCALC/Sampling1");
+          if ( !dir_FCALC_1 ) dir_FCALC_1 = ntupleSvc()->createDirectory(file1,"FCALC/Sampling1");
+          if ( !dir_FCALC_1 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }	   
+        
+        if (sampl==2){ // if it's FCALC Sampling2
+          SmartDataPtr<NTuple::Directory> dir_FCALC_2(ntupleSvc(),"/NTUPLES/FILE1/FCALC/Sampling2");
+          if ( !dir_FCALC_2 ) dir_FCALC_2 = ntupleSvc()->createDirectory(file1,"FCALC/Sampling2");
+          if ( !dir_FCALC_2 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+        
+        if (sampl==3){ // if it's FCALC Sampling3
+          SmartDataPtr<NTuple::Directory> dir_FCALC_3(ntupleSvc(),"/NTUPLES/FILE1/FCALC/Sampling3");
+          if ( !dir_FCALC_3 ) dir_FCALC_3 = ntupleSvc()->createDirectory(file1,"FCALC/Sampling3");
+          if ( !dir_FCALC_3 ) ATH_MSG_ERROR ( " failed to get ntuple directory" );
+          m_cellHistos.insert(std::make_pair(m_OffId, new TProfile(m_id_char, m_id_char, 40, -4 , 36, "s" ))); 			  
+        }
+      }     
+    } // end FCAL     
+    
+  } // loop over cells
+
+  SmartDataPtr<NTuple::Directory> dir_FCALC_3(ntupleSvc(),"/NTUPLES/FILE1/Check");
+  if ( !dir_FCALC_3 ) dir_FCALC_3 = ntupleSvc()->createDirectory(file1,"Check");   
+   
+  m_TProfpulse_diff = new TProfile("test_diff", "test_diff",500, 0, 500, "s");  
+   
+  m_BCID = new TH1D("BCID", "BCID",3564, 0, 3564);    
+  m_diffBCID = new TH1D("diffBCID", "BCID",3564, 0, 3564);     
+  m_actualInt = new TH1D("ActualInt", "ActInt", 60, 0, 20); 
+  
+  addHistogram(m_TProfpulse_diff);
+  
+  addHistogram(m_BCID);
+  addHistogram(m_diffBCID);  
+  addHistogram(m_actualInt);   
+  m_initialized=true;
+  return StatusCode::SUCCESS;
+}
+/////////////////////////////////////////////////////////////////////
+StatusCode LArPulseShape::execute()  {
+
+
+  short int bunchStr[8] = {1, 101, 201, 301, 1786, 1886, 1986, 2086}; //move to JO
+  
+  std::vector<std::string> chains = m_trigDec->getListOfTriggers();
+  std::vector<std::string> myChains;
+  
+  SG::ReadCondHandle<LuminosityCondData> lumi (m_lumiDataKey);
+
+  if (m_trigDec->isPassed("L1_RD1_BGRP10")) {   
+
+    SG::ReadHandle<xAOD::EventInfo> evt (m_evtInfoKey); 
+
+    int bunchId   = evt->bcid();
+    
+    m_mindist = 3564;
+    m_closestBC = 0;
+    for (int i = 0; i < 8; i++) {
+      if ( (fabs(bunchId - bunchStr[i]) < m_mindist) || (fabs(bunchId - (bunchStr[i]+3564)) < m_mindist)) {
+   	m_mindist = std::min(fabs(bunchId - bunchStr[i]),(fabs(bunchId - (bunchStr[i]+3564))));
+   	m_closestBC = bunchStr[i];
+      }
+    }
+    if (fabs(bunchId - m_closestBC)  < (fabs(bunchId - (m_closestBC+3564)))) {
+      m_mindist = bunchId - m_closestBC; 
+    } else {
+      m_mindist = bunchId - (m_closestBC+3564);
+    }  
+
+    //std::cout << "bunchID = " << bunchId<< ", m_mindist = " << m_mindist << ", m_closestBC = " << m_closestBC << std::endl;
+    m_BCID->Fill(bunchId);
+    m_diffBCID->Fill(m_mindist);  
+
+    m_actualInt->Fill(lumi->lbLuminosityPerBCIDVector().at(m_closestBC));
+    
+    const LArDigitContainer* larDigitContainer;
+    ATH_CHECK( evtStore()->retrieve(larDigitContainer, "FREE") );
+    ATH_CHECK( detStore()->retrieve(m_larPedestal) );
+    if (larDigitContainer->size() == 0) {
+      ATH_MSG_WARNING ( "LArDigitContainer with key= is empty!" );
+
+      return StatusCode::SUCCESS;
+    }
+
+    SG::ReadCondHandle<LArOnOffIdMapping> larCablingHdl(m_cablingKey);
+    const LArOnOffIdMapping* cabling=*larCablingHdl;
+    if(!cabling) {
+       ATH_MSG_ERROR("Could not get LArOnOffIdMapping !!");
+       return StatusCode::FAILURE;
+    }
+    for (LArDigitContainer::const_iterator digit = larDigitContainer->begin(); digit != larDigitContainer->end(); ++digit) {
+    
+      HWIdentifier channelID = (*digit)->hardwareID();  
+      
+      if (cabling->isOnlineConnected(channelID)) {
+     
+   	CaloGain::CaloGain gain=(*digit)->gain();
+
+   	float pedestal = m_larPedestal->pedestal(channelID, gain); 
+
+   	m_OffId_conv = (int)(cabling->cnvToIdentifier(channelID).get_identifier32().get_compact());
+      
+   	const std::vector<short>& samples = (*digit)->samples();
+   	
+   	m_isample=0;
+   	for (std::vector<short>::const_iterator sample = samples.begin(); sample != samples.end(); sample++) {
+	
+          m_isample++; 
+   	  if (lumi->lbLuminosityPerBCIDVector().at(m_closestBC)!=0){
+   	    m_TProfpulse_diff->Fill(m_mindist+m_isample, (*sample-pedestal)/lumi->lbLuminosityPerBCIDVector().at(m_closestBC));//+0,1,2,3 
+   	    m_cellHistos[m_OffId_conv]->Fill(m_mindist+m_isample, (*sample-pedestal)/lumi->lbLuminosityPerBCIDVector().at(m_closestBC));    
+          }
+   	} //loop over samples
+      }
+    }  
+  
+  }//trigger
+  return StatusCode::SUCCESS;  
+}
+
+/////////////////////////////////////////////////////////////////////
+StatusCode LArPulseShape::stop() {
+
+  ATH_MSG_INFO( "LArPulseShape has finished." );
+  return StatusCode::SUCCESS;
+   
+}// end finalize-method.
+   
diff --git a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx
index 22e4567a181e223955de09c0fb3577f670811707..1c0a0545c89523afebf1886fe3aa57884a42fd29 100755
--- a/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArRamps2Ntuple.cxx
@@ -81,14 +81,14 @@ StatusCode LArRamps2Ntuple::stop() {
        LArRawRampContainer* rawRampContainer=NULL;
        sc=m_detStore->retrieve(rawRampContainer,*key_it);
        if (sc!=StatusCode::SUCCESS || !rawRampContainer) {
-         (*m_log) << MSG::WARNING << "Unable to retrieve LArRawRampContainer with key " << *key_it << endmsg;
+         ATH_MSG_WARNING( "Unable to retrieve LArRawRampContainer with key " << *key_it );
        } 
        else {
-         (*m_log) << MSG::DEBUG << "Got LArRawRampContainer with key " << *key_it << endmsg;
+         ATH_MSG_DEBUG( "Got LArRawRampContainer with key " << *key_it );
          hasRawRampContainer = true;
        }
    }
-   if (!hasRawRampContainer) (*m_log) << MSG::WARNING << " No LArRawRampContainer found. Only fitted ramp in ntuple " << endmsg;
+   if (!hasRawRampContainer) ATH_MSG_WARNING( " No LArRawRampContainer found. Only fitted ramp in ntuple " );
 
  } 
  //end-if m_rawRamp
@@ -105,11 +105,11 @@ StatusCode LArRamps2Ntuple::stop() {
 
 
  if (ramp==nullptr) {
-   (*m_log) << MSG::WARNING << "Unable to retrieve ILArRamp with key: "<<m_rampKey << " from DetectorStore" << endmsg;
+   ATH_MSG_WARNING( "Unable to retrieve ILArRamp with key: "<<m_rampKey << " from DetectorStore" );
  }
 
  if (!ramp && !hasRawRampContainer) {
-   (*m_log) << MSG::ERROR << "Have neither Raw Ramp nor Fitted Ramp. No Ntuple produced." << endmsg;
+   ATH_MSG_ERROR( "Have neither Raw Ramp nor Fitted Ramp. No Ntuple produced." );
    return StatusCode::FAILURE;
  }
 
@@ -120,7 +120,7 @@ StatusCode LArRamps2Ntuple::stop() {
     if(dynamic_cast<const LArRampComplete*>(ramp)) {
         sc=m_detStore->retrieve(rampComplete,m_rampKey);
         if (sc!=StatusCode::SUCCESS) {
-           (*m_log) << MSG::WARNING << "Unable to retrieve LArRampComplete with key: "<<m_rampKey << " from DetectorStore" << endmsg;
+           ATH_MSG_WARNING( "Unable to retrieve LArRampComplete with key: "<<m_rampKey << " from DetectorStore" );
         }
        
        myramp=(LArConditionsContainer<LArRampP1>*) rampComplete;
@@ -129,10 +129,10 @@ StatusCode LArRamps2Ntuple::stop() {
       if(!myramp->correctionsApplied()) { 
         sc = myramp->applyCorrections();
         if (sc!=StatusCode::SUCCESS) {
-          (*m_log) << MSG::ERROR << "Applying corrections failed" << endmsg;
+          ATH_MSG_ERROR( "Applying corrections failed" );
         }
       } else {
-       (*m_log) << MSG::WARNING << "Corrections already applied. Can't apply twice!" << endmsg;
+       ATH_MSG_WARNING( "Corrections already applied. Can't apply twice!" );
       }
     }
  }
@@ -140,20 +140,20 @@ StatusCode LArRamps2Ntuple::stop() {
  
  sc=m_nt->addItem("cellIndex",cellIndex,0,2000);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
    return StatusCode::FAILURE;
  }
 
  sc=m_nt->addItem("gain",gain,0,3);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "addItem 'gain' failed" << endmsg;
+   ATH_MSG_ERROR( "addItem 'gain' failed" );
    return StatusCode::FAILURE;
  }
 
  if (m_addCorrUndo) {
    sc=m_nt->addItem("corrUndo",corrUndo,0,1);
    if (sc!=StatusCode::SUCCESS) {
-     (*m_log) << MSG::ERROR << "addItem 'corrUndo' failed" << endmsg;
+     ATH_MSG_ERROR( "addItem 'corrUndo' failed" );
      return StatusCode::FAILURE;
    }
  }
@@ -162,109 +162,109 @@ StatusCode LArRamps2Ntuple::stop() {
    {
      sc=m_nt->addItem("DACIndex",DACIndex,0,800);
      if (sc!=StatusCode::SUCCESS) {
-       (*m_log) << MSG::ERROR << "addItem 'DACIndex' failed" << endmsg;
+       ATH_MSG_ERROR( "addItem 'DACIndex' failed" );
        return StatusCode::FAILURE;
      }
      
      sc=m_nt->addItem("SampleMax",DACIndex,SampleMax);
      if (sc!=StatusCode::SUCCESS)
-       {(*m_log) << MSG::ERROR << "addItem 'SampleMax' failed" << endmsg;
+       {ATH_MSG_ERROR( "addItem 'SampleMax' failed" );
         return StatusCode::FAILURE;
        }
       
      sc=m_nt->addItem("TimeMax",DACIndex,TimeMax);
      if (sc!=StatusCode::SUCCESS)
-       {(*m_log) << MSG::ERROR << "addItem 'TimeMax' failed" << endmsg;
+       {ATH_MSG_ERROR( "addItem 'TimeMax' failed" );
         return StatusCode::FAILURE;
        }
      sc=m_nt->addItem("ADC",DACIndex,ADC);
      if (sc!=StatusCode::SUCCESS)
-       {(*m_log) << MSG::ERROR << "addItem 'ADC' failed" << endmsg;
+       {ATH_MSG_ERROR( "addItem 'ADC' failed" );
         return StatusCode::FAILURE;
        }
       
      sc=m_nt->addItem("DAC",DACIndex,DAC);
      if (sc!=StatusCode::SUCCESS)
-       {(*m_log) << MSG::ERROR << "addItem 'DAC' failed" << endmsg;
+       {ATH_MSG_ERROR( "addItem 'DAC' failed" );
         return StatusCode::FAILURE;
        }
       
      sc=m_nt->addItem("NTriggers",DACIndex,NTriggers);
      if (sc!=StatusCode::SUCCESS) {
-       (*m_log) << MSG::ERROR << "addItem 'NTriggers' failed" << endmsg;
+       ATH_MSG_ERROR( "addItem 'NTriggers' failed" );
        return StatusCode::FAILURE;
      }
 
      if(m_saveAllSamples){
        sc=m_nt->addItem("Sample0",DACIndex,Sample0);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample0' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample0' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample1",DACIndex,Sample1);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample1' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample1' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample2",DACIndex,Sample2);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample2' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample2' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample3",DACIndex,Sample3);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample3' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample3' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample4",DACIndex,Sample4);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample4' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample4' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample5",DACIndex,Sample5);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample5' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample5' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("Sample6",DACIndex,Sample6);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'Sample6' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'Sample6' failed" );
 	  return StatusCode::FAILURE;
 	 }
        
        sc=m_nt->addItem("RMS0",DACIndex,RMS0);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS0' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS0' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS1",DACIndex,RMS1);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS1' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS1' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS2",DACIndex,RMS2);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS2' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS2' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS3",DACIndex,RMS3);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS3' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS3' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS4",DACIndex,RMS4);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS4' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS4' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS5",DACIndex,RMS5);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS5' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS5' failed" );
 	  return StatusCode::FAILURE;
 	 }
        sc=m_nt->addItem("RMS6",DACIndex,RMS6);
        if (sc!=StatusCode::SUCCESS)
-	 {(*m_log) << MSG::ERROR << "addItem 'RMS6' failed" << endmsg;
+	 {ATH_MSG_ERROR( "addItem 'RMS6' failed" );
 	  return StatusCode::FAILURE;
 	 }
      }// end-if Save all samples
@@ -274,20 +274,20 @@ StatusCode LArRamps2Ntuple::stop() {
  if (ramp) {
    sc=m_nt->addItem("Xi",coeffIndex,0,7);
    if (sc!=StatusCode::SUCCESS)
-     {(*m_log) << MSG::ERROR << "addItem 'coeffIndex' failed" << endmsg;
+     {ATH_MSG_ERROR( "addItem 'coeffIndex' failed" );
       return StatusCode::FAILURE;
      }
    
    sc=m_nt->addItem("X",coeffIndex,coeffs);
    if (sc!=StatusCode::SUCCESS)
-     {(*m_log) << MSG::ERROR << "addItem 'coeff' failed" << endmsg;
+     {ATH_MSG_ERROR( "addItem 'coeff' failed" );
       return StatusCode::FAILURE;
      }
 
    if (hasRawRampContainer) { //== RampComplete && RawRamp
      sc=m_nt->addItem("RampRMS",RampRMS,-1000,1000);
      if (sc!=StatusCode::SUCCESS)
-       {(*m_log) << MSG::ERROR << "addItem 'RampRMS' failed" << endmsg;
+       {ATH_MSG_ERROR( "addItem 'RampRMS' failed" );
         return StatusCode::FAILURE;
        }
    }
@@ -311,7 +311,7 @@ StatusCode LArRamps2Ntuple::stop() {
        LArRawRampContainer* rawRampContainer=NULL;
        sc=m_detStore->retrieve(rawRampContainer,*key_it);
        if (sc!=StatusCode::SUCCESS || !rawRampContainer) {
-         (*m_log) << MSG::WARNING << "Unable to retrieve LArRawRampContainer with key " << *key_it << endmsg;
+         ATH_MSG_WARNING( "Unable to retrieve LArRawRampContainer with key " << *key_it );
          continue;
        }
        LArRawRampContainer::const_iterator cont_it=rawRampContainer->begin();
@@ -330,7 +330,7 @@ StatusCode LArRamps2Ntuple::stop() {
            if(m_saveAllSamples){
 	     
 	     if ( !singleRamp[DACIndex].Samples.size() || !singleRamp[DACIndex].RMS.size() ) {     
-	       (*m_log) << MSG::WARNING << "Cannot save all samples, vector empty" << endmsg;
+	       ATH_MSG_WARNING( "Cannot save all samples, vector empty" );
 	     } else {
 	       
 	       Sample0[DACIndex]=singleRamp[DACIndex].Samples[0];
@@ -366,8 +366,8 @@ StatusCode LArRamps2Ntuple::stop() {
           unsigned nCoeff=0;
           const ILArRamp::RampRef_t  rampcoeff = ramp->ADC2DAC(chid,igain);
           if (rampcoeff.size()==0) {
-             (*m_log) << MSG::WARNING << "Can't get fitted Ramp slot=" << static_cast<long>(m_slot) << 
-                          " channel=" << static_cast<long>(m_channel) << " gain=" << igain << endmsg;
+             ATH_MSG_WARNING( "Can't get fitted Ramp slot=" << static_cast<long>(m_slot) << 
+                          " channel=" << static_cast<long>(m_channel) << " gain=" << igain );
           }
           for (coeffIndex=0;coeffIndex<rampcoeff.size();coeffIndex++) coeffs[coeffIndex]=rampcoeff[coeffIndex];
           nDAC = singleRamp.size();
@@ -389,7 +389,7 @@ StatusCode LArRamps2Ntuple::stop() {
 
 	sc=ntupleSvc()->writeRecord(m_nt);
 	if (sc!=StatusCode::SUCCESS) {
-	  (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	  ATH_MSG_ERROR( "writeRecord failed" );
 	  return StatusCode::FAILURE;
 	}
 
@@ -420,7 +420,7 @@ StatusCode LArRamps2Ntuple::stop() {
 	 sc=ntupleSvc()->writeRecord(m_nt);
 
 	 if (sc!=StatusCode::SUCCESS) {
-	   (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+	   ATH_MSG_ERROR( "writeRecord failed" );
 	   return StatusCode::FAILURE;
 	 }
        }// end if isConnected
@@ -453,13 +453,12 @@ StatusCode LArRamps2Ntuple::stop() {
           cellIndex  = cellCounter;
           fillFromIdentifier(chid);
  
-          for (coeffIndex=0;coeffIndex<rampcoeff.size();coeffIndex++)
-            coeffs[coeffIndex]=rampcoeff[coeffIndex];
+          for (coeffIndex=0;coeffIndex<rampcoeff.size();coeffIndex++) coeffs[coeffIndex]=rampcoeff[coeffIndex];
         
           sc=ntupleSvc()->writeRecord(m_nt);
  
           if (sc!=StatusCode::SUCCESS) {
-            (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+            ATH_MSG_ERROR( "writeRecord failed" );
             return StatusCode::FAILURE;
           }
        }//end loop over cells
@@ -471,12 +470,13 @@ StatusCode LArRamps2Ntuple::stop() {
  if(m_applyCorr && myramp) {
     sc = myramp->undoCorrections();
     if (sc!=StatusCode::SUCCESS) {
-	   (*m_log) << MSG::ERROR << "Undo corrections failed" << endmsg;
+	   ATH_MSG_ERROR( "Undo corrections failed" );
     }
  }
  */
 
- (*m_log) << MSG::INFO << "LArRamps2Ntuple has finished." << endmsg;
+
+ ATH_MSG_INFO( "LArRamps2Ntuple has finished." );
  return StatusCode::SUCCESS;
 
 } // end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArShape2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArShape2Ntuple.cxx
index 03a465a3151abfbaac39fdc219c896c88737cf2c..bf1ab3f405078a279188c91c3c05ccbc0203d529 100644
--- a/LArCalorimeter/LArCalibTools/src/LArShape2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArShape2Ntuple.cxx
@@ -43,7 +43,7 @@ StatusCode LArShape2Ntuple::stop() {
   
   sc=m_nt->addItem("Gain",gain,-1,2);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'gain' failed" );
     return StatusCode::FAILURE;
   }
 
@@ -51,33 +51,33 @@ StatusCode LArShape2Ntuple::stop() {
   if (m_isComplete) {
     sc=m_nt->addItem("TimeOffset",timeOffset,0,100);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'TimeOffset' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'TimeOffset' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Phase",phase,0,49);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'phase' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'phase' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("PhaseTime",phasetime,0,800);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'PhaseTime' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'PhaseTime' failed" );
       return StatusCode::FAILURE;
     }
   }
   sc=m_nt->addItem("nSamples",nSamples,0,100);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'nSamples' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'nSamples' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("Shape",nSamples,Shape);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'Shape' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Shape' failed" );
     return StatusCode::FAILURE;
   }
   sc=m_nt->addItem("ShapeDer",nSamples,ShapeDer);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'ShapeDer' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'ShapeDer' failed" );
     return StatusCode::FAILURE;
   }
   
@@ -87,7 +87,7 @@ StatusCode LArShape2Ntuple::stop() {
   if (m_isComplete) {
     sc = detStore()->retrieve(larShapeComplete,m_contKey);
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Can't retrieve LArShapeComplete object with key " << m_contKey << endmsg;
+      ATH_MSG_ERROR( "Can't retrieve LArShapeComplete object with key " << m_contKey );
       return StatusCode::FAILURE;
     }
     larShape=larShapeComplete; //Cast to base-class
@@ -95,7 +95,7 @@ StatusCode LArShape2Ntuple::stop() {
   else { //Use just the abstract interface (works also for LArShapeFlat and LArShapeMC)
     sc = detStore()->retrieve(larShape,m_contKey);
     if (sc.isFailure()) {
-      msg(MSG::ERROR) << "Can't retrieve ILArShape object with key " << m_contKey << endmsg;
+      ATH_MSG_ERROR( "Can't retrieve ILArShape object with key " << m_contKey );
       return StatusCode::FAILURE;
     }
   }
@@ -137,14 +137,14 @@ StatusCode LArShape2Ntuple::stop() {
 	sc = ntupleSvc()->writeRecord(m_nt);
 	cellCounter++;
 	if (sc!=StatusCode::SUCCESS) {
-	  msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	  ATH_MSG_ERROR( "writeRecord failed" );
 	  return StatusCode::FAILURE;
 	}
       }//loop over phases
     }//loop over channels
   }//loop over gains
      
-  (*m_log) <<  MSG::INFO << "Total number of cells = " << cellCounter << endmsg;
-  (*m_log) <<  MSG::INFO << "LArShape2Ntuple has finished." << endmsg;
+  ATH_MSG_INFO( "Total number of cells = " << cellCounter );
+  ATH_MSG_INFO( "LArShape2Ntuple has finished." );
   return StatusCode::SUCCESS;
 } // end finalize-method.
diff --git a/LArCalorimeter/LArCalibTools/src/LArWFParams2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArWFParams2Ntuple.cxx
index a41986456061875460b5145a13ce759fbb2c6b75..ae7bdba9e887b81fe17a7579c40cb5689f6c343b 100755
--- a/LArCalorimeter/LArCalibTools/src/LArWFParams2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArWFParams2Ntuple.cxx
@@ -57,7 +57,7 @@ StatusCode LArWFParams2Ntuple::stop() {
     ATH_MSG_DEBUG("Retrieving LArCaliPulseParamsComplete from detector store...");
     StatusCode sc = detStore()->retrieve(completeCaliPulseParams,m_caliPulseParamsKey) ;
     if ( sc.isFailure() ) {
-      msg(MSG::ERROR) << "Could not retrieve LArCaliPulseParamsComplete from detector store!" << endmsg ;
+      ATH_MSG_ERROR( "Could not retrieve LArCaliPulseParamsComplete from detector store!" ) ;
       m_dumpCaliPulseParams = false ;
     }
   }
@@ -66,7 +66,7 @@ StatusCode LArWFParams2Ntuple::stop() {
     ATH_MSG_DEBUG("Retrieving LArDetCellParamsComplete from detector store...");
     StatusCode sc = detStore()->retrieve(completeDetCellParams,m_detCellParamsKey);
     if ( sc.isFailure() ) {
-      msg(MSG::ERROR) << "Could not retrieve LArDetCellParamsComplete from detector store!" << endmsg ;
+      ATH_MSG_ERROR( "Could not retrieve LArDetCellParamsComplete from detector store!" ) ;
       m_dumpDetCellParams = false;
     }
   } 
@@ -76,7 +76,7 @@ StatusCode LArWFParams2Ntuple::stop() {
     ATH_MSG_DEBUG("Retrieving LArPhysCaliTdiffComplete from detector store...");
     StatusCode sc = detStore()->retrieve(completePhysCaliTdiff,m_physCaliTDiffKey);
     if ( sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not retrieve LArPhysCaliTdiffComplete from detector store!" << endmsg ;
+      ATH_MSG_ERROR( "Could not retrieve LArPhysCaliTdiffComplete from detector store!" ) ;
       m_dumpPhysCaliTdiff = false ;
     }
   }
@@ -86,7 +86,7 @@ StatusCode LArWFParams2Ntuple::stop() {
     ATH_MSG_DEBUG("Retrieving LArTdriftComplete from detector store...");
     StatusCode sc = detStore()->retrieve(completeTdrift,m_tdriftKey) ;
     if ( sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not retrieve LArTdriftComplete from detector store!" << endmsg;
+      ATH_MSG_ERROR( "Could not retrieve LArTdriftComplete from detector store!" );
       m_dumpTdrift = false ;
     }
   }
@@ -95,7 +95,7 @@ StatusCode LArWFParams2Ntuple::stop() {
     ATH_MSG_DEBUG("Retrieving LArOFCBinComplete from detector store...");
     StatusCode sc = detStore()->retrieve(completeOFCBin,m_ofcBinKey) ;
     if ( sc.isFailure()) {
-      msg(MSG::ERROR) << "Could not retrieve LArOFCBinComplete from detector store!" << endmsg;
+      ATH_MSG_ERROR( "Could not retrieve LArOFCBinComplete from detector store!" );
       m_dumpOFCBin= false ;
     }
   }
@@ -107,7 +107,7 @@ StatusCode LArWFParams2Ntuple::stop() {
 
   StatusCode sc=m_nt->addItem("gain",gain,-1,2);
   if (sc!=StatusCode::SUCCESS) {
-    msg(MSG::ERROR) << "addItem 'Gain' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Gain' failed" );
     return StatusCode::FAILURE;
   }
 
@@ -115,56 +115,56 @@ StatusCode LArWFParams2Ntuple::stop() {
   if ( m_dumpCaliPulseParams ) {
     sc=m_nt->addItem("Tcal",Tcal);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tcal' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tcal' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Fstep",Fstep);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Fstep' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Fstep' failed" );
       return StatusCode::FAILURE;
     }
   }
   if ( m_dumpTdrift ) {
     sc=m_nt->addItem("Tdrift",Tdrift);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tdrift' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tdrift' failed" );
       return StatusCode::FAILURE;
     }
   }
   if ( m_dumpPhysCaliTdiff ) {
     sc=m_nt->addItem("Tdiff",Tdiff);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Tdiff' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Tdiff' failed" );
       return StatusCode::FAILURE;
     }
   }
   if ( m_dumpDetCellParams ) {
     sc=m_nt->addItem("Omega0",Omega0);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Omega0' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Omega0' failed" );
       return StatusCode::FAILURE;
     }
     sc=m_nt->addItem("Taur",Taur);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addItem 'Taur' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Taur' failed" );
       return StatusCode::FAILURE;
     }
   }
   if (m_dumpOFCBin) {
     sc=m_nt->addItem("Bin",ofcbin);
     if (sc!=StatusCode::SUCCESS) {
-      msg(MSG::ERROR) << "addIdetm 'Bin' failed!" << endmsg;
+      ATH_MSG_ERROR( "addIdetm 'Bin' failed!" );
     }
   }
 
 //   sc=m_nt->addItem("Tshaper",m_Tshaper);
 //   if (sc!=StatusCode::SUCCESS) {
-//     msg(MSG::ERROR) << "addItem 'Tshaper' failed" << endmsg;
+//     ATH_MSG_ERROR( "addItem 'Tshaper' failed" );
 //     return StatusCode::FAILURE;
 //   }
 //   sc=m_nt->addItem("Amplitude",m_Amplitude);
 //   if (sc!=StatusCode::SUCCESS) {
-//     msg(MSG::ERROR) << "addItem 'Amplitude' failed" << endmsg;
+//     ATH_MSG_ERROR( "addItem 'Amplitude' failed" );
 //     return StatusCode::FAILURE;
 //   }
 
@@ -259,7 +259,7 @@ StatusCode LArWFParams2Ntuple::stop() {
 
        sc=ntupleSvc()->writeRecord(m_nt);
        if (sc!=StatusCode::SUCCESS) {
-	 msg(MSG::ERROR) << "writeRecord failed" << endmsg;
+	 ATH_MSG_ERROR( "writeRecord failed" );
 	 return StatusCode::FAILURE;
        }
      }//end if have data
diff --git a/LArCalorimeter/LArCalibTools/src/LArWaves2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArWaves2Ntuple.cxx
index 4ee83b02a5ad019f0452366bf070287198684f6d..1c020b9e7759c11ba7445c2bc92153fdd2197f1f 100755
--- a/LArCalorimeter/LArCalibTools/src/LArWaves2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArWaves2Ntuple.cxx
@@ -23,80 +23,80 @@ StatusCode LArWaves2Ntuple::initialize() {
   
   sc=m_nt->addItem("flag",m_flag,0,1000);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'Flag' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Flag' failed" );
     return StatusCode::FAILURE;
   }
   
   sc=m_nt->addItem("timeIndex",m_timeIndex,0,100000);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'timeIndex' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'timeIndex' failed" );
     return StatusCode::FAILURE;
   }
   
   sc=m_nt->addItem("Dt",m_dt,0.,25.);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'Dt' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Dt' failed" );
     return StatusCode::FAILURE;
   }
 
   sc=m_nt->addItem("Time",m_timeIndex,m_time);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'Time' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Time' failed" );
     return StatusCode::FAILURE;
   }
   
   sc=m_nt->addItem("Amplitude",m_timeIndex,m_ampliPulse);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem failed" << endmsg;
+    ATH_MSG_ERROR( "addItem failed" );
     return StatusCode::FAILURE;
   }
   
   sc=m_nt->addItem("Error",m_timeIndex,m_errorPulse);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'Error' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Error' failed" );
     return StatusCode::FAILURE;
   }
   
   sc=m_nt->addItem("Triggers",m_timeIndex,m_triggers);
   if (sc!=StatusCode::SUCCESS) {
-    (*m_log) << MSG::ERROR << "addItem 'Triggers' failed" << endmsg;
+    ATH_MSG_ERROR( "addItem 'Triggers' failed" );
     return StatusCode::FAILURE;
   }
  
   if ( m_saveDerivedInfo ) {
     sc=m_nt->addItem("Baseline",m_baseline,0.,1200.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'Baseline' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Baseline' failed" );
       return StatusCode::FAILURE;
     }
 
     sc=m_nt->addItem("TmaxAmp",m_tmaxAmp,0.,4095.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'TmaxAmp' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'TmaxAmp' failed" );
       return StatusCode::FAILURE;
     }
 
     sc=m_nt->addItem("MaxAmp",m_maxAmp,0.,4095.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'MaxAmp' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'MaxAmp' failed" );
       return StatusCode::FAILURE;
     }
     
     sc=m_nt->addItem("PosLobe",m_posLobe,0.,100.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'PosLobe' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'PosLobe' failed" );
       return StatusCode::FAILURE;
     }
 
     sc=m_nt->addItem("T0",m_rT0,20.,100.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'RT0' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'RT0' failed" );
       return StatusCode::FAILURE;
     }
 
     sc=m_nt->addItem("Width",m_width,0.,125.);
     if (sc!=StatusCode::SUCCESS) {
-      (*m_log) << MSG::ERROR << "addItem 'Width' failed" << endmsg;
+      ATH_MSG_ERROR( "addItem 'Width' failed" );
       return StatusCode::FAILURE;
     }
   }
diff --git a/LArCalorimeter/LArCalibTools/src/LArfSampl2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LArfSampl2Ntuple.cxx
index 54991bb012c308cb12c4140a8c1b9f6211b3b90a..291373b1bf04e847aeb0096677e50f66e770bf30 100644
--- a/LArCalorimeter/LArCalibTools/src/LArfSampl2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LArfSampl2Ntuple.cxx
@@ -31,8 +31,8 @@ StatusCode LArfSampl2Ntuple::stop() {
   StatusCode sc;
   sc=m_detStore->retrieve(larfSampl,m_contKey);
   if (sc!=StatusCode::SUCCESS) {
-     (*m_log)  << MSG::ERROR << "Unable to retrieve ILArNoise with key " 
-               << m_contKey << " from DetectorStore" << endmsg;
+     ATH_MSG_ERROR( "Unable to retrieve ILArNoise with key " 
+               << m_contKey << " from DetectorStore" );
      return StatusCode::FAILURE;
   }
 
@@ -41,13 +41,13 @@ StatusCode LArfSampl2Ntuple::stop() {
 
  sc=m_nt->addItem("icell",cellIndex,0,2000);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
    }
 
  sc=m_nt->addItem("fsampl",fsampl);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log)  << MSG::ERROR << "addItem 'fsampl' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'fsampl' failed" );
     return StatusCode::FAILURE;
    }
 
@@ -69,14 +69,14 @@ StatusCode LArfSampl2Ntuple::stop() {
        fsampl = larfSampl->FSAMPL(hwid);
        sc=ntupleSvc()->writeRecord(m_nt);
        if (sc!=StatusCode::SUCCESS) {
-         (*m_log)  << MSG::ERROR << "writeRecord failed" << endmsg;
+         ATH_MSG_ERROR( "writeRecord failed" );
          return StatusCode::FAILURE;
        }
    }//end if isConnected
    cellCounter++;
  }//end loop over online ID
 
- (*m_log)  << MSG::INFO << "LArfSampl2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LArfSampl2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCalibTools/src/LAruA2MeV2Ntuple.cxx b/LArCalorimeter/LArCalibTools/src/LAruA2MeV2Ntuple.cxx
index 457e0e695d5d32608e547ceb739410f25ab2b76c..58e7162977a02879cd4c4a7641682a059bd5c121 100644
--- a/LArCalorimeter/LArCalibTools/src/LAruA2MeV2Ntuple.cxx
+++ b/LArCalorimeter/LArCalibTools/src/LAruA2MeV2Ntuple.cxx
@@ -29,18 +29,18 @@ StatusCode LAruA2MeV2Ntuple::stop() {
  
  sc=m_nt->addItem("icell",cellIndex,0,2000);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "addItem 'Cell Index' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'Cell Index' failed" );
     return StatusCode::FAILURE;
    }
  sc=m_nt->addItem("uAMeV",uA2MeV,-1000.,5000.);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "addItem 'uAMeV' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'uAMeV' failed" );
     return StatusCode::FAILURE;
    }
 
  sc=m_nt->addItem("DAC2uA",DAC2uA,-1000.,5000.);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "addItem 'DAC2uA' failed" << endmsg;
+   {ATH_MSG_ERROR( "addItem 'DAC2uA' failed" );
     return StatusCode::FAILURE;
    }
 
@@ -48,16 +48,16 @@ StatusCode LAruA2MeV2Ntuple::stop() {
  const ILAruA2MeV* laruA2MeVComplete;
  sc=m_detStore->retrieve(laruA2MeVComplete,m_uA2MeVKey);
  if (sc!=StatusCode::SUCCESS)
-   {(*m_log) << MSG::ERROR << "Unable to retrieve LAruA2MeVComplete with key " 
-	<< m_uA2MeVKey << " from DetectorStore" << endmsg;
+   {ATH_MSG_ERROR( "Unable to retrieve LAruA2MeVComplete with key " 
+	<< m_uA2MeVKey << " from DetectorStore" );
    return StatusCode::FAILURE;
    } 
 
  const ILArDAC2uA* larDAC2uAComplete;
  sc=m_detStore->retrieve(larDAC2uAComplete,m_DAC2uAKey);
  if (sc!=StatusCode::SUCCESS) {
-   (*m_log) << MSG::ERROR << "Unable to retrieve LArDAC2uAComplete with key " 
-	    << m_DAC2uAKey << " from DetectorStore" << endmsg;
+   ATH_MSG_ERROR( "Unable to retrieve LArDAC2uAComplete with key " 
+	    << m_DAC2uAKey << " from DetectorStore" );
    return StatusCode::FAILURE;
  } 
 
@@ -81,14 +81,14 @@ StatusCode LAruA2MeV2Ntuple::stop() {
      sc=ntupleSvc()->writeRecord(m_nt);
 
      if (sc!=StatusCode::SUCCESS) {
-       (*m_log) << MSG::ERROR << "writeRecord failed" << endmsg;
+       ATH_MSG_ERROR( "writeRecord failed" );
        return StatusCode::FAILURE;
      }
      cellCounter++;
    }//end if connected
  }//end loop over online ID
 
- (*m_log) << MSG::INFO << "LAruA2MeV2Ntuple has finished." << endmsg;
+ ATH_MSG_INFO( "LAruA2MeV2Ntuple has finished." );
  return StatusCode::SUCCESS;
 }// end finalize-method.
    
diff --git a/LArCalorimeter/LArCondUtils/share/LArBuildHVPathologies.sh b/LArCalorimeter/LArCondUtils/share/LArBuildHVPathologies.sh
index bc470b6564b54a265a3ebed0c3bc18deb160300d..2bd4619276bb33248bfece6689af4ba5fc0ae547 100755
--- a/LArCalorimeter/LArCondUtils/share/LArBuildHVPathologies.sh
+++ b/LArCalorimeter/LArCondUtils/share/LArBuildHVPathologies.sh
@@ -35,12 +35,13 @@ fi
 echo " Produce HV pathology DB from input file " $inputTextFile
 echo " IoV start to use for UPD4 tag " ${runStart} ${lbStart}
 
+# Fix me !!! Get it automatically
 upd1TagName="LARHVPathologiesOflPathologies-RUN2-UPD1-00"
-upd4TagName="LARHVPathologiesOflPathologies-RUN2-UPD4-01"
+upd4TagName="LARHVPathologiesOflPathologies-RUN2-UPD4-02"
 
 echo " Run athena to produce sqlite file"
 
-athena.py -c "InputFile=\"${inputTextFile}\";tagName=\"${upd1TagName}\"" LArCondUtils/LArHVPathologyDbWrite.py > write.log 2>&1
+athena.py -c "RunNumber=$runStart;LBNumber=$lbStart;InputFile=\"${inputTextFile}\";tagName=\"${upd1TagName}\"" LArCondUtils/LArHVPathologyDbWrite.py > write.log 2>&1
 
 if [ $? -ne 0 ];  then
     echo " Athena reported an error! Please check write.log!"
@@ -56,7 +57,7 @@ fi
 
 echo " Run athena to test sqlite file reading"
 
-athena.py  LArCondUtils/LArHVPathologyDbRead.py > read.log 2>&1
+athena.py  -c 'inputsqlite="larhvpathology.db";' LArCondUtils/LArHVPathologyDbRead.py > read.log 2>&1
 
 if [ $? -ne 0 ];  then
     echo " Athena reported an error! Please check read.log!"
diff --git a/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbRead.py b/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbRead.py
index 56836d7e252c9087292888b441d6966762715982..c16a66b53d5608bd50892d1a30c7cac2da42a8bc 100755
--- a/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbRead.py
+++ b/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbRead.py
@@ -5,7 +5,7 @@ from time import strptime,time
 from calendar import timegm
 
 if "GloablTag" not in dir():
-    GlobalTag = 'CONDBR2-BLKPA-2016-14'
+    GlobalTag = 'CONDBR2-BLKPA-2017-03'
 
 if "inputsqlite" not in dir():
    dbConn="COOLOFL_LAR/CONDBR2"
@@ -55,7 +55,7 @@ globalflags.InputFormat = 'bytestream'
 globalflags.DatabaseInstance="CONDBR2"
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00'
+jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-04-00-00'
 
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
diff --git a/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbWrite.py b/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbWrite.py
index 5a15362357403bed924b7aa2fdea13cd3c78967d..e1aa27f3dfc16e7a3849a3bed7cc1f28426d5adc 100755
--- a/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbWrite.py
+++ b/LArCalorimeter/LArCondUtils/share/LArHVPathologyDbWrite.py
@@ -17,8 +17,11 @@ if "tagName" not in dir():
 if "RunNumber" not in dir():
     RunNumber = 999999
 
+if "LBNumber" not in dir():
+    LBNumber = 0
+
 if "GloablTag" not in dir():
-    GlobalTag = 'CONDBR2-BLKPA-2016-14'
+    GlobalTag = 'CONDBR2-BLKPA-2017-03'
 
 if "date" not in dir():
     date="2015-09-29:12:00:00"
@@ -56,7 +59,7 @@ globalflags.InputFormat = 'bytestream'
 
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00'
+jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-04-00-00'
 
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
@@ -115,7 +118,8 @@ regSvc = svcMgr.IOVRegistrationSvc
 # Select the following to delete and recreate the folders. Default is
 # NOT to recreate
 regSvc.RecreateFolders = False
-
+regSvc.BeginRun = RunNumber
+regSvc.BeginLB = LBNumber
 
 #--------------------------------------------------------------
 # The following turns off the ability to set EventSelector parameters
diff --git a/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.cxx b/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.cxx
new file mode 100755
index 0000000000000000000000000000000000000000..e91c776c3d3ba09f2f7b30b2235575345b93e550
--- /dev/null
+++ b/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.cxx
@@ -0,0 +1,67 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#include "LArFEBTempAlg.h" 
+#include "LArIdentifier/LArOnlineID.h"
+
+LArFEBTempAlg::LArFEBTempAlg(const std::string& name, ISvcLocator* pSvcLocator):AthReentrantAlgorithm(name,pSvcLocator){}
+
+// intialize 
+StatusCode LArFEBTempAlg::initialize()
+{
+  ATH_CHECK(m_foldernameKey.initialize());
+  ATH_CHECK(m_tempKey.initialize());
+
+  return StatusCode::SUCCESS;
+}
+
+StatusCode LArFEBTempAlg::execute(const EventContext& ctx ) const 
+{
+  SG::WriteCondHandle<LArFEBTempData> writeHandle{m_tempKey,ctx};
+  
+  if (writeHandle.isValid()) {
+    ATH_MSG_DEBUG("Found valid write handle");
+    return StatusCode::SUCCESS;
+  }  
+
+  SG::ReadCondHandle<CondAttrListCollection> cHdl(m_foldernameKey, ctx);
+  const CondAttrListCollection* cattr = *cHdl;
+  if(!cattr) {
+     ATH_MSG_ERROR("Why do not have FEB TEMP folder ?" << m_foldernameKey.fullKey());
+     return StatusCode::FAILURE;
+  }
+  EventIDRange rangeIn;
+  if(!cHdl.range(rangeIn)) {
+          ATH_MSG_ERROR("Failed to retrieve validity range for " << cHdl.key());
+          return StatusCode::FAILURE;
+  }
+  // Fill LArFEBTempData
+  std::unique_ptr<LArFEBTempData> febTemp=std::make_unique<LArFEBTempData>();
+  LArFEBTempData* p_febTemp = febTemp.get();
+
+  for (CondAttrListCollection::const_iterator citr=cattr->begin();
+	citr!=cattr->end();++citr) {
+	     float temp1=-1;
+             if(! ((*citr).second)["temp1"].isNull()) temp1 = (((*citr).second)["temp1"]).data<float>();
+	     float temp2 =-1;
+             if(! ((*citr).second)["temp2"].isNull()) temp2 = (((*citr).second)["temp2"]).data<float>();
+             LArFEBTempData::FEBTemp temp = std::make_pair(temp1,temp2);
+
+             p_febTemp->m_mapVec[HWIdentifier(Identifier32((*citr).first))] = temp;
+  }
+
+  const EventIDRange crangeW(rangeIn);
+  if(writeHandle.record(crangeW,febTemp.release()).isFailure()) {
+     ATH_MSG_ERROR("Could not record LArFebConfig object with " << writeHandle.key()
+                      << " with EventRange " << crangeW << " into Conditions Store");
+     return StatusCode::FAILURE;
+  }
+
+  ATH_MSG_INFO("recorded new " << writeHandle.key() << " with range " << crangeW << " into Conditions Store");
+
+  return StatusCode::SUCCESS;
+
+}
+
+
diff --git a/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.h b/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.h
new file mode 100755
index 0000000000000000000000000000000000000000..73bbf2100ced6de61bd0c4c32728dfa49c1fcc23
--- /dev/null
+++ b/LArCalorimeter/LArCondUtils/src/LArFEBTempAlg.h
@@ -0,0 +1,31 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARCONDUTILS_LARFEBTEMPALG_H
+#define LARCONDUTILS_LARFEBTEMPALG_H
+
+#include "LArRecConditions/LArFEBTempData.h"
+#include "AthenaBaseComps/AthReentrantAlgorithm.h"
+#include "GaudiKernel/ICondSvc.h"
+#include "StoreGate/WriteCondHandleKey.h"
+#include "StoreGate/ReadCondHandleKey.h"
+#include "AthenaPoolUtilities/CondAttrListCollection.h"
+
+class LArFEBTempAlg:public AthReentrantAlgorithm {
+ 
+ public: 
+   LArFEBTempAlg(const std::string& name, ISvcLocator* pSvcLocator);
+   
+   virtual ~LArFEBTempAlg()=default;
+   
+   virtual StatusCode initialize() override final;
+   virtual StatusCode execute(const EventContext& ctx) const override final;
+   
+ private:
+   
+   SG::ReadCondHandleKey<CondAttrListCollection> m_foldernameKey{this, "folderName", "/LAR/DCS/FEBTEMP", "DCS folder with temperatures"};
+   SG::WriteCondHandleKey<LArFEBTempData> m_tempKey{this, "keyOutput", "LArFEBTemp", "Output key for LAr Feb temperature data"}; 
+};
+
+#endif
diff --git a/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.cxx b/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.cxx
deleted file mode 100755
index f55d0ba9edd877933037351c78f64e48e57e3bb6..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.cxx
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-//-----------------------------------------------------------------------
-// File and Version Information:
-//      LArFEBTempTool.cxx
-//
-// Description: Tool to provide FEB TEMP DCS information.
-//
-// Environment:
-//      Software developed for the ATLAS Detector at the CERN LHC
-//
-// Author List:
-//      Kirill Skovpen <kskovpen@cern.ch>
-//
-//-----------------------------------------------------------------------
-
-#include "LArFEBTempTool.h" 
-#include "LArIdentifier/LArOnlineID.h"
-
-#include "GaudiKernel/IToolSvc.h"
-#include "GaudiKernel/MsgStream.h"
-#include "StoreGate/StoreGateSvc.h"
-
-#include "AthenaPoolUtilities/CondAttrListCollection.h"
-
-// constructor 
-LArFEBTempTool::LArFEBTempTool(const std::string& type,
-			       const std::string& name,
-			       const IInterface* parent)
-  : AthAlgTool(type,name,parent), m_foldername("/LAR/DCS/FEBTEMP"),
-    m_atrlistcol(nullptr),
-    m_isinit(false)
-{
-   declareInterface< ILArFEBTempTool >( this );
-   declareProperty("FolderName",m_foldername);   
-}
-
-// destructor 
-LArFEBTempTool::~LArFEBTempTool()
-{ }
-
-// intialize 
-StatusCode LArFEBTempTool::initialize()
-{
-  m_isinit=false;
-  return StatusCode::SUCCESS;
-}
-
-FEBTemp LArFEBTempTool::getFebTemp( const HWIdentifier& id ) 
-{
-   FEBTemp temp;
-   temp.clear();
-
-   if(!m_isinit) {
-     if ( detStore()->retrieve(m_atrlistcol,m_foldername).isFailure() ) {
-       ATH_MSG_ERROR ( "Unable to retrieve AttrListCollection "<<m_foldername);
-       return temp;
-     }
-     ATH_MSG_DEBUG ( "Successfully retrieved AttrListCollection" );
-     m_isinit = true;
-   }
-
-   
-   for (CondAttrListCollection::const_iterator citr=m_atrlistcol->begin();
-	citr!=m_atrlistcol->end();++citr)
-     {
-        if( (*citr).first == id.get_identifier32().get_compact() )
-	  {
-	     float temp1=-1;
-             if(! ((*citr).second)["temp1"].isNull()) temp1 = (((*citr).second)["temp1"]).data<float>();
-	     float temp2 =-1;
-             if(! ((*citr).second)["temp2"].isNull()) temp2 = (((*citr).second)["temp2"]).data<float>();
-	     temp.push_back(std::make_pair(temp1,temp2));
-	  }
-     }
-
-   return temp;
-}
-
-
diff --git a/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.h b/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.h
deleted file mode 100755
index e3f4bb729f5b87dbb167df1bd340d638b7b4a3c6..0000000000000000000000000000000000000000
--- a/LArCalorimeter/LArCondUtils/src/LArFEBTempTool.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef LARCONDUTILS_LARFEBTEMPTOOL_H
-#define LARCONDUTILS_LARFEBTEMPTOOL_H
-
-/**
- @class LArFEBTempTool
- @brief concrete tool to provide FEB TEMP DCS information.
-
- Environment:
-      Software developed for the ATLAS Detector at the CERN LHC
-
- @author 
-      Kirill Skovpen <kskovpen@cern.ch>
-*/
-
-// Includes for Gaudi
-#include "AthenaBaseComps/AthAlgTool.h"
-
-#include "LArElecCalib/ILArFEBTempTool.h"
-#include "StoreGate/DataHandle.h" 
-#include "Identifier/Identifier.h" 
-#include "AthenaPoolUtilities/AthenaAttributeList.h"
-
-// forward declaration
-//using namespace coral;
-class AttributeList;
-class HWIdentifier;
-class LArOnlineID;
-class CondAttrListCollection; 
-
-class LArFEBTempTool: public AthAlgTool, virtual public ILArFEBTempTool
-{
- 
- public: 
-   LArFEBTempTool(const std::string& type, const std::string& name,
-		  const IInterface* parent);
-   
-   virtual ~LArFEBTempTool();
-   
-   virtual StatusCode initialize();
-   virtual StatusCode finalize(){return StatusCode::SUCCESS;}
-   
-   // Given a FEB ID, return std::vector of temp1 and temp2 values
-   FEBTemp getFebTemp( const HWIdentifier& id )  ;
-
- private:
-   
-   std::string m_foldername;
-   
-   const CondAttrListCollection* m_atrlistcol;
-   bool m_isinit;
-};
-
-#endif
diff --git a/LArCalorimeter/LArCondUtils/src/components/LArCondUtils_entries.cxx b/LArCalorimeter/LArCondUtils/src/components/LArCondUtils_entries.cxx
index b813bebd055e5d07097edd249a85677199984f96..0fb611358e033c43e460bc9fa5519d8cf4e11b07 100644
--- a/LArCalorimeter/LArCondUtils/src/components/LArCondUtils_entries.cxx
+++ b/LArCalorimeter/LArCondUtils/src/components/LArCondUtils_entries.cxx
@@ -1,12 +1,12 @@
 #include "../LArFecLvTempDcsTool.h"
-#include "../LArFEBTempTool.h"
+#include "../LArFEBTempAlg.h"
 #include "../LArHVPathologyDbAlg.h"
 #include "../LArHV2Ntuple.h"
 
 
 
 DECLARE_COMPONENT( LArFecLvTempDcsTool )
-DECLARE_COMPONENT( LArFEBTempTool )
+DECLARE_COMPONENT( LArFEBTempAlg )
 DECLARE_COMPONENT( LArHVPathologyDbAlg )
 DECLARE_COMPONENT( LArHV2Ntuple )
 
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/GetInputFiles.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/GetInputFiles.py
index 6c9d78cac9858d5310ce4d58848f032ed9d37afd..8dcf81997fedb111f3fc345d035e956c0c5f3cb6 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/GetInputFiles.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/GetInputFiles.py
@@ -6,7 +6,8 @@ def GetInputFiles(inputPath,filePattern):
     if (inputPath[0:8]=='/castor/'):
         cmd='nsls'
     elif (inputPath[0:5]=='/eos/'):    
-        cmd='/afs/cern.ch/project/eos/installation/atlas/bin/eos.select ls'
+        #cmd='/afs/cern.ch/project/eos/installation/atlas/bin/eos.select ls'
+        cmd='/usr/bin/eos ls '
     else:
         cmd='ls -1'
 
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_HVCorr.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_HVCorr.py
index b46c9537b8f9a2303babea14909a7836c579e17b..71107983618413f2e9ac086dda0f9cefed2caa0b 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_HVCorr.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Example_HVCorr.py
@@ -104,7 +104,7 @@ from AthenaCommon.AppMgr import theApp
 import AthenaPoolCnvSvc.AthenaPool
 
 from AthenaCommon.GlobalFlags import jobproperties
-jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-03-01-00'
+jobproperties.Global.DetDescrVersion='ATLAS-R2-2015-04-00-00'
 
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_Run2.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_Run2.py
index 932a53379516d78bcc0be5f0ad0dc28839904766..0d31d351e6040144d5898ba6c8e9c3a3e7bb5063 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_Run2.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_Run2.py
@@ -167,7 +167,7 @@ globalflags.InputFormat.set_Value_and_Lock('bytestream')
 globalflags.DatabaseInstance.set_Value_and_Lock("CONDBR2")
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-20-00-01"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOn()  #Switched off to avoid geometry
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_TwoFolders_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_TwoFolders_jobOptions.py
index 837906c78e83c051be7522d70f599a33cbc1f797..cbc1e30f12389376de48675d1ec1c9dd2a4a664e 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_TwoFolders_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_OFC_Phys_TwoFolders_jobOptions.py
@@ -443,7 +443,7 @@ globalflags.DataSource.set_Value_and_Lock('data')
 globalflags.InputFormat.set_Value_and_Lock('bytestream')
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-16-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOn()  #Switched off to avoid geometry
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Patching_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Patching_jobOptions.py
index c8c14ee3bf1f19d9524bd8e13c837ef2218668c1..fd24b42ee72a75d8b7e2f9cae1fff4119982a333 100644
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Patching_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArCalib_Patching_jobOptions.py
@@ -86,7 +86,7 @@ globalflags.DataSource="data"
 globalflags.InputFormat="bytestream"
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-GEO-18-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOff()
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArTimePhysPrediction_jobOptions.py b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArTimePhysPrediction_jobOptions.py
index 78bbeca1a2e470c2acc062a7abc1b16547c04778..8c82470b76af84e669bc6158426e7747014026c8 100755
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LArTimePhysPrediction_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LArTimePhysPrediction_jobOptions.py
@@ -56,7 +56,7 @@ GlobalFlags.DataSource.set_data()
 GlobalFlags.InputFormat.set_bytestream()
 
 from AthenaCommon.JobProperties import jobproperties
-jobproperties.Global.DetDescrVersion = "ATLAS-Comm-02-00-00"
+jobproperties.Global.DetDescrVersion = "ATLAS-R2-2015-04-00-00"
 
 from AthenaCommon.DetFlags import DetFlags
 DetFlags.Calo_setOn()  #Switched on for the prediction
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalibNoise.sh b/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalibNoise.sh
new file mode 100755
index 0000000000000000000000000000000000000000..28b7c2b9029723f725fb69f85edf0b0d0772b8d7
--- /dev/null
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalibNoise.sh
@@ -0,0 +1,310 @@
+#!/bin/bash
+
+if [[ $# < 3 ]];
+then
+    echo "Syntax: $0 <time>  <Run> <LB> [mu] [dt]"
+    echo " <time> = time in UTC at which the HV is stable at the new conditions (and HV mapping updated if needed) like \"2010-07-29:13:00:00\" "
+    echo " <Run> <LB> = run/lumiblock to start IoV for UPD4 noise update (allows to backdate)"
+    echo " [mu] [dt] are values of mu and bunch spacing for which we compute noise, if not"
+    echo "           given, the current values will be used"
+    exit
+fi
+
+
+echo " -----"
+echo "This script will compute the HV scale correction for the given time (UTC) " 
+echo "    the new HV setting should be correct / stable for this Time "
+echo "    in case of HV mapping change, the new mapping should be valid (in the UPD4 tag) for this specified time (be careful of glitch at the mapping db is in run/lb IoV) "
+echo " "
+echo "It will also produce new noise tables for online/offline database"
+echo " "
+
+
+time=$1
+run=$2
+lb=$3
+mu=-1
+dt=-1
+
+if [[ $# > 3 ]];
+then
+ mu=$4
+fi
+
+if [[ $# > 4 ]];
+then
+ dt=$5
+fi
+
+echo " $0 $1 $2 $3 $mu $dt"
+
+summaryFile=noise_summary.txt
+
+echo " Time to look at HV situation                           " ${time}
+echo " Run /LB for IoOV start update for noise   in UPD4 tag  " ${run} ${lb}
+
+echo "    be careful: you need ~60 Mbytes of free disk space in the running directory... "
+
+if [ -f HVScaleCorr.db ];
+   then
+   echo "ERROR: local sqlite file for HV scale correction already exists. Remove  HVScaleCorr.db before running this script !"
+   exit
+fi
+
+if [ -f larnoisesqlite.db ];
+    then
+    echo "ERROR: Output file larnoisesqlite.db exists already. Remove it before running this script !"
+    exit
+fi
+
+if [ -f caloSqlite_UPD1_offline.db ];
+    then
+    /bin/rm caloSqlite_UPD1_offline.db
+fi
+
+
+if [ -f $summaryFile ]
+    then 
+    /bin/rm  $summaryFile
+fi
+
+if [ -f calonoise.txt ]
+    then
+    /bin/rm calonoise.txt
+fi
+
+if [ -f cellnoise_data.root ]
+    then
+    /bin/rm cellnoise_data.root
+fi
+
+if [ -f dumpMapping.txt ]
+    then
+    /bin/rm dumpMapping.txt
+fi
+
+touch $summaryFile
+
+if ! which AtlCoolCopy.exe 1>/dev/null 2>&1
+then
+    echo "No offline setup found!"
+    exit
+fi
+
+cat > getGlobalTag.py << _EOF4_
+import sys
+from PyCool import cool
+sys.path.append('/afs/cern.ch/user/a/atlcond/utils/python/')
+from AtlCoolBKLib import resolveAlias
+resolver=resolveAlias()
+currentGlobal=resolver.getCurrent().replace("*","ST")
+print currentGlobal
+_EOF4_
+
+globalTag=`python getGlobalTag.py | awk '{print($1)}'`
+#globalTag="COMCOND-BLKPA-006-01"
+
+echo "Found current global tag $globalTag"
+
+
+
+echo "Running athena to compute new HV corrections"
+athena.py -c "date=\"${time}\";GlobalTag=\"${globalTag}\""  LArCalibProcessing/LArCalib_Example_HVCorr.py > hv.log 2>&1
+if [ $? -ne 0 ];  then
+      echo "Athena reported an error ! Please check hv.log!"
+      exit
+fi
+
+if grep -q ERROR hv.log
+      then
+      echo "An error occured ! Please check hv.log!"
+      exit
+fi
+
+usedRun=`grep "Working on run" hv.log | awk '{print($5)}'`
+echo " ---> the run number to read the HV mapping db in the UPD4 tag is " ${usedRun}
+grep "^--->" hv.log
+
+cat > dumpMapping.py << _EOF1_
+from CoolConvUtilities import AtlCoolTool
+toolNew = AtlCoolTool.AtlCoolTool("COOLOFL_LAR/CONDBR2")
+toolNew.usetag("${globalTag}")
+a=toolNew.more("/LAR/IdentifierOfl/HVLineToElectrodeMap")
+f=file('dumpMapping.txt','w')
+f.write(str(a))
+f.close()
+exit()
+_EOF1_
+
+python dumpMapping.py >& python.log
+runHVmap=`grep LArHVMap dumpMapping.txt  | tail -1 | cut -f 1  -d , | cut -f 2 -d \[`
+
+echo "      the latest HV mapping change is valid from run " ${runHVmap}
+
+if test ${runHVmap} -gt ${usedRun}; then
+   echo "   BE CAREFUL  the used run is older than the latest HV mapping change... Check that you know what you are doing before any db upload "
+fi
+
+
+
+
+echo " "
+echo "Running athena to read current HV scale factor correction in database for comparison"
+athena.py -c "date=\"${time}\"" LArCalibProcessing/LArHVCool2Ntuple_jobOptions.py > readhv.log 2>&1
+if [ $? -ne 0 ];  then
+      echo "Athena reported an error ! Please check readhv.log!"
+      exit
+fi
+
+if grep -q ERROR readhv.log
+      then
+      echo "An error occured ! Please check readhv.log!"
+      exit
+fi
+
+cat > hvcheck.C << _EOF2_
+{
+ TFile f1("hvcorr_read.root");
+ TFile f2("hvcorr_ntuple.root");
+ TTree* t1 = (TTree*)f1.Get("HVSCALE");
+ TTree* t2 = (TTree*)f2.Get("HVSCALE");
+ t2->AddFriend(t1,"t1");
+ t2->SetScanField(99999999);
+ ((TTreePlayer*)(t2->GetPlayer()))->SetScanRedirect(true); 
+ ((TTreePlayer*)(t2->GetPlayer()))->SetScanFileName("hvlist.txt");
+ t2->Scan("barrel_ec:pos_neg:FT:layer:ieta:iphi:hvcorr:t1.hvcorr","abs(hvcorr-t1.hvcorr)>0.005"); 
+}
+_EOF2_
+
+root -b -l -n -q hvcheck.C > readroot.log 2>&1
+nHV=`grep "selected entries" readroot.log | awk '{print($2)}'`
+echo " -----> Number of channels which changed HV correction more than 0.5\%: " ${nHV}
+echo "        Look at the file hvlist.txt for the full list of these channels"
+
+echo " "
+
+# Now compute new L1Calo corrections based on new LArHV corr
+cat > getGlobalTagES.py << _EOF5_
+import sys
+from PyCool import cool
+sys.path.append('/afs/cern.ch/user/a/atlcond/utils/python/')
+from AtlCoolBKLib import resolveAlias
+resolver=resolveAlias()
+currentGlobal=resolver.getCurrentES().replace("*","ST")
+print currentGlobal
+_EOF5_
+
+globalTagES=`python getGlobalTagES.py | awk '{print($1)}'`
+echo " "
+echo "Running athena to compute L1Calo corrections"
+athena.py -c "date=\"${time}\";GlobalTag=\"${globalTagES}\";RunNumber=$run;LumiBlock=$lb;HVCorrDb=\"sqlite://;schema=HVScaleCorr.db;dbname=CONDBR2\";OutputSQLiteFile=\"hvcorrections_${time%%:*}.sqlite\"" TrigT1CaloCalibUtils/LArL1Calo_DumpHVCorr.py > l1calocorr.log 2>&1
+if [ $? -ne 0 ];  then
+      echo "Athena reported an error ! Please check l1calocorr.log!"
+      exit    
+fi
+
+if grep -q ERROR l1calocorr.log
+      then    
+      echo "An error occured ! Please check l1calocorr.log!"
+      exit    
+fi
+
+# Now noise
+echo " "
+echo "Running athena to scale noise values from reference noise database"
+echo "        asking mu=$mu and dt=$dt"
+athena.py -c "mu=${mu};dt=$dt;date=\"${time}\";GlobalTag=\"${globalTag}\";sqliteHVCorr=\"HVScaleCorr.db\"" CaloCondPhysAlgs/CaloScaleNoise_jobOptions.py > noise.log 2>&1
+
+if [ $? -ne 0 ];  then
+      echo "Athena reported an error ! Please check noise.log!"
+      exit    
+fi
+
+if grep -q ERROR noise.log
+      then    
+      echo "An error occured ! Please check noise.log!"
+      exit    
+fi
+
+
+nLines=`wc -l calonoise.txt | cut -f 1 -d " "`
+echo "  Ncells*Ngains for which noise is computed  " ${nLines}
+if [ $nLines -ne 547404 ]; then
+     echo "Number of lines in noise ascii file is not correct, check log file to investigate possible problem or disk space"
+     exit
+fi
+
+grep DifferentNoise noise.log > ${summaryFile}
+nTotal=`wc -l ${summaryFile} | cut -f 1 -d " "`
+echo " ---> Number of cells*Number of gains(3) for which noise changed more than 5\%" ${nTotal}
+echo "      Check file "  ${summaryFile} " for the full list "
+echo "      You can also look at cellnoise_data.root for ntuple information "
+
+echo "Resolving current folder-level tag suffix for /LAR/NoiseOfl/CellNoise"
+fulltag=`getCurrentFolderTag.py "COOLOFL_LAR/CONDBR2"  /LAR/NoiseOfl/CellNoise | tail -1` 
+#upd4TagName=`echo $fulltag | grep -o "UPD4-[0-9][0-9]"` 
+echo "Found $fulltag"
+
+
+echo "Produce sqlite file for LAr noise values" 
+CaloNoise_fillDB.py ${run} ${lb} -1 -1 ${fulltag} calonoise.txt larnoisesqlite.db > makedb.log 2>&1
+if [ $? -ne 0 ];  then
+    echo "An error is reported, check makedb.log"
+    exit
+fi
+
+cat >> dumpDB.py << _EOF3_
+from CoolConvUtilities import AtlCoolTool
+toolNew = AtlCoolTool.AtlCoolTool("sqlite://;schema=larnoisesqlite.db;dbname=CONDBR2")
+toolNew.usetag("$fulltag")
+a=toolNew.more('/LAR/NoiseOfl/CellNoise')
+f = file('dumpDB.txt','w')
+f.write(str(a))
+f.close()
+exit()
+_EOF3_
+
+if [ -f dumpDB.txt ]
+    then
+     /bin/rm dumpDB.txt
+fi
+
+python dumpDB.py
+
+echo " "
+echo "   Content of new noise UPD4 sqlite file : "
+cat dumpDB.txt
+
+echo " " 
+
+cp larnoisesqlite.db tempdb.db
+
+echo "Make UPD1 offline folder for noise "
+AtlCoolCopy.exe "sqlite://;schema=tempdb.db;dbname=CONDBR2" "sqlite://;schema=larnoisesqlite.db;dbname=CONDBR2" -f /LAR/NoiseOfl/CellNoise -t ${fulltag} -ot  LARNoiseOflCellNoise-RUN2-UPD1-00 -create >> mergedb.log 
+
+/bin/rm tempdb.db
+
+echo "Make UPD1 online folder for noise "
+AtlCoolCopy.exe "sqlite://;schema=larnoisesqlite.db;dbname=CONDBR2" "sqlite://;schema=caloSqlite_UPD1_online.db;dbname=CONDBR2" -f /LAR/NoiseOfl/CellNoise -of /CALO/Noise/CellNoise -t ${fulltag} -ot  CaloNoiseCellnoise-RUN2-UPD1-00 -create >> mergedb.log 
+
+echo "Doing check of the noise sqlite against P1HLT cache....."
+echo "Will take 3-5 minutes, be patient......"
+#(mkdir /tmp/noise_test_$$; cp caloSqlite_UPD1_online.db /tmp/noise_test_$$/; cd /tmp/noise_test_$$/; source $AtlasSetup/scripts/asetup.sh --tags=AtlasP1HLT,20.2.1.4,setup,here; athena.py -c "sqlite='caloSqlite_UPD1_online.db'" TriggerRelease/test_hltConditions.py >/dev/null 2>&1 ) >/dev/null 2>&1
+(mkdir /tmp/noise_test_$$; cp caloSqlite_UPD1_online.db /tmp/noise_test_$$/; cd /tmp/noise_test_$$/; athena.py -c "sqlite='caloSqlite_UPD1_online.db'" TriggerRelease/test_hltConditions.py >/dev/null 2>&1 ) >/dev/null 2>&1
+
+if [ $? -ne 0 ];  then
+      echo "Testing job reported an error ! "
+      echo "Please, do not upload constants to online ! "
+      exit
+fi
+
+echo "  "
+echo " mergedb.log contains the log file of the various AtlCoolCopy operation to make local sqlite files"
+echo " " 
+echo "  After checking that everything is OK you can proceed with the database update"
+echo "  (1) ~atlcond/utils/AtlCoolMerge.py --online HVScaleCorr.db  CONDBR2 ATONR_COOL  ATLAS_COOLONL_LAR_W  <password>"
+echo "  (2) ~atlcond/utils/AtlCoolMerge.py larnoisesqlite.db CONDBR2 ATLAS_COOLWRITE ATLAS_COOLOFL_LAR_W <password>"
+echo "  (3) ~atlcond/utils/AtlCoolMerge.py --online caloSqlite_UPD1_online.db  CONDBR2 ATONR_COOL ATLAS_COOLONL_CALO_W <password>"
+
+echo "  (note that password are different for LAr online,offline, Calo online offline databases"
+exit
diff --git a/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalib_online.sh b/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalib_online.sh
index a0d9e51647493067367ee71558e180351f248873..07d2150084af1c8da5698b529f3080c6ce025825 100755
--- a/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalib_online.sh
+++ b/LArCalorimeter/LArExample/LArCalibProcessing/share/LAr_updateHVcalib_online.sh
@@ -151,8 +151,8 @@ cat > hvcheck.C << _EOF2_
 {
  TFile f1("hvcorr_read.root");
  TFile f2("hvcorr_ntuple.root");
- TTree* t1 = f1.Get("HVSCALE");
- TTree* t2 = f2.Get("HVSCALE");
+ TTree* t1 = (TTree*)f1.Get("HVSCALE");
+ TTree* t2 = (TTree*)f2.Get("HVSCALE");
  t2->AddFriend(t1,"t1");
  t2->SetScanField(99999999);
  ((TTreePlayer*)(t2->GetPlayer()))->SetScanRedirect(true); 
@@ -174,6 +174,34 @@ echo " "
 #echo "create UPD3 tag for HV corr "
 #AtlCoolCopy.exe  "sqlite://;schema=myDB200_hvDummy.db;dbname=CONDBR2" "sqlite://schema=myDB200_UPD3.db;dbname=CONDBR2" -f  /LAR/ElecCalibOfl/HVScaleCorr -of /LAR/ElecCalibOfl/HVScaleCorr -ot LARElecCalibOflHVScaleCorr-UPD3-00 -nrls ${run} ${lb} -create -alliov >> mergedb.log 
 
+# Now compute new L1Calo corrections based on new LArHV corr
+cat > getGlobalTagES.py << _EOF5_
+import sys
+from PyCool import cool
+sys.path.append('/afs/cern.ch/user/a/atlcond/utils/python/')
+from AtlCoolBKLib import resolveAlias
+resolver=resolveAlias()
+currentGlobal=resolver.getCurrentES().replace("*","ST")
+print currentGlobal
+_EOF5_
+
+globalTagES=`python getGlobalTagES.py | awk '{print($1)}'`
+echo " "
+echo "Running athena to compute L1Calo corrections"
+athena.py -c "date=\"${time}\";GlobalTag=\"${globalTagES}\";RunNumber=$run;LumiBlock=$lb;HVCorrDb=\"sqlite://;schema=HVScaleCorr.db;dbname=CONDBR2\";OutputSQLiteFile=\"hvcorrections_${time%%:*}.sqlite\"" TrigT1CaloCalibUtils/LArL1Calo_DumpHVCorr.py > l1calocorr.log 2>&1
+if [ $? -ne 0 ];  then
+      echo "Athena reported an error ! Please check l1calocorr.log!"
+      exit    
+fi
+
+if grep -q ERROR l1calocorr.log
+      then    
+      echo "An error occured ! Please check l1calocorr.log!"
+      exit    
+fi
+
+
+# Now noise....
 
 echo " "
 echo "Running athena to rescale noise values from current UPD1 noise database"
@@ -211,7 +239,7 @@ echo "Found $fulltag"
 
 
 echo "Produce sqlite file for LAr noise values" 
-CaloNoise_fillDB.py ${run} ${lb} -1 -1 ${fulltag} larnoisesqlite.db > makedb.log 2>&1
+CaloNoise_fillDB.py ${run} ${lb} -1 -1 ${fulltag} calonoise.txt larnoisesqlite.db > makedb.log 2>&1
 if [ $? -ne 0 ];  then
     echo "An error is reported, check makedb.log"
     exit
@@ -253,7 +281,8 @@ AtlCoolCopy.exe "sqlite://;schema=larnoisesqlite.db;dbname=CONDBR2" "sqlite://;s
 
 echo "Doing check of the noise sqlite against P1HLT cache....."
 echo "Will take 3-5 minutes, be patient......"
-(mkdir /tmp/noise_test_$$; cp caloSqlite_UPD1_online.db /tmp/noise_test_$$/; cd /tmp/noise_test_$$/; source $AtlasSetup/scripts/asetup.sh --tags=AtlasP1HLT,20.2.1.3,setup,here; athena.py -c "sqlite='caloSqlite_UPD1_online.db'" TriggerRelease/test_hltConditions.py >/dev/null 2>&1 ) >/dev/null 2>&1
+#(mkdir /tmp/noise_test_$$; cp caloSqlite_UPD1_online.db /tmp/noise_test_$$/; cd /tmp/noise_test_$$/; source $AtlasSetup/scripts/asetup.sh --tags=AtlasP1HLT,20.2.1.4,setup,here; athena.py -c "sqlite='caloSqlite_UPD1_online.db'" TriggerRelease/test_hltConditions.py >/dev/null 2>&1 ) >/dev/null 2>&1
+(mkdir /tmp/noise_test_$$; cp caloSqlite_UPD1_online.db /tmp/noise_test_$$/; cd /tmp/noise_test_$$/; athena.py -c "sqlite='caloSqlite_UPD1_online.db'" TriggerRelease/test_hltConditions.py >/dev/null 2>&1 ) >/dev/null 2>&1
 if [ $? -ne 0 ];  then
       echo "Testing job reported an error ! "
       echo "Please, do not upload constants to online ! "
diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
index d1544cf1100dc536e36cd8b00eacbbd8d675fcae..3948d63f41dee449b8232ab6a711552227faa07f 100755
--- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
+++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArConditionsCommon_comm_jobOptions.py
@@ -194,7 +194,12 @@ if larCondFlags.LoadElecCalib():
           theLArCondSvc.OFCInput="/LAR/ElecCalibFlat/OFC"
       else:
           #Load from offline DB
-          addLArFolder ('LAR_OFL',
+          if 'RekeyOFC' in dir():    
+            addLArFolder ('LAR_OFL',
+                        'OFC/PhysWave/RTM/'+larCondFlags.OFCShapeFolder(),
+                        'LArOFCComplete', selection+"<key>"+RekeyOFC+"</key>")
+          else:  
+            addLArFolder ('LAR_OFL',
                         'OFC/PhysWave/RTM/'+larCondFlags.OFCShapeFolder(),
                         'LArOFCComplete', selection)
 
@@ -207,7 +212,12 @@ if larCondFlags.LoadElecCalib():
               theLArCondSvc.ShapeInput="/LAR/ElecCalibFlat/Shape"
           else:
               #Load from offline database
-              addLArFolder ('LAR_OFL',
+              if 'RekeyShape' in dir():
+                addLArFolder ('LAR_OFL',
+                            'Shape/RTM/'+larCondFlags.OFCShapeFolder(),
+                            'LArShapeComplete', selection+"<key>"+RekeyShape+"</key>")
+              else:  
+                addLArFolder ('LAR_OFL',
                             'Shape/RTM/'+larCondFlags.OFCShapeFolder(),
                             'LArShapeComplete', selection)
 
diff --git a/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdFillAlg.py b/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdFillAlg.py
index ccca28d0acbf2bc59cebe36648331ea85170fbd2..2af738b8b8d3aca3717496e6534601bbae961cc9 100644
--- a/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdFillAlg.py
+++ b/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdFillAlg.py
@@ -11,7 +11,7 @@ from AthenaCommon.GlobalFlags import globalflags
 globalflags.DataSource.set_Value_and_Lock('data')
 globalflags.InputFormat.set_Value_and_Lock('bytestream')
 #globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-GEO-18-01-01')
-globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-GEO-20-00-01')
+globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-R2-2015-04-00-00')
 globalflags.DetGeo.set_Value_and_Lock('commis')
 globalflags.Luminosity.set_Value_and_Lock('zero')
 globalflags.DatabaseInstance.set_Value_and_Lock('CONDBR2')
@@ -28,7 +28,7 @@ DetFlags.digitize.all_setOff()
 from AtlasGeoModel import SetGeometryVersion
 from AtlasGeoModel import GeoModelInit
 
-svcMgr.IOVDbSvc.GlobalTag = "CONDBR2-BLKPA-2015-05"
+svcMgr.IOVDbSvc.GlobalTag = "CONDBR2-BLKPA-2017-03"
 
 #Get identifier mapping (needed by LArConditionsContainer)
 include("LArConditionsCommon/LArIdMap_comm_jobOptions.py")
diff --git a/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdTopOptions_mu50.py b/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdTopOptions_mu50.py
new file mode 100644
index 0000000000000000000000000000000000000000..4c61e38bab3cf02d09419096fd9b06e826db0ba9
--- /dev/null
+++ b/LArCalorimeter/LArOnlDbPrep/share/LArDSPThresholdTopOptions_mu50.py
@@ -0,0 +1,56 @@
+
+tagList = [
+           'LARConfigurationDSPThresholdFlatTemplates-Qt1sigmaMu50Pileup-samp1sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt2sigmaMu50Pileup-samp2sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt2sigmaMu50Pileup-samp3sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt3sigmaMu50Pileup-samp4sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt3sigmaMu50Pileup-samp3sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt4sigmaMu50Pileup-samp4sigmaMu50Pileup',
+           'LARConfigurationDSPThresholdFlatTemplates-Qt5sigmaMu50Pileup-samp5sigmaMu50Pileup'
+           ]
+
+tag=tagList[tagNum]
+
+print tag
+
+Qtstr=tag.split("Qt")[1]
+Sampstr=tag.split("samp")[1]
+
+#print Qtstr,Sampstr
+
+if "sigma" in tag:
+    ModeType = "noise"
+
+    Qtpileup = False
+    Samppileup = False
+        
+    if len(Qtstr.split("sigma")) > 1:
+        print Qtstr.split("sigma")[1]
+        if Qtstr.split("sigma")[1].find("Pileup") > -1:
+            Qtpileup = True
+
+    if len(Sampstr.split("sigma")) > 1:
+        print Sampstr.split("sigma")[1]
+        if Sampstr.split("sigma")[1].find("Pileup") > -1:
+            Samppileup = True
+
+    print "Setting pileup noise to (Qt,Samp) = ",Qtpileup,Samppileup
+
+    Qtstr=Qtstr.split("sigma")[0]
+    Sampstr=Sampstr.split("sigma")[0]
+    
+elif "HECFCAL" in tag:
+    ModeType = "group"
+    Qtstr="0" ## done manually
+    Sampstr="0" ## done manually
+
+else:
+    ModeType = "fixed"
+    Qtstr=Qtstr.split("-")[0]
+
+Qtval=float(Qtstr)
+Sampval=float(Sampstr)
+print Qtval,Sampval
+
+include("LArOnlDbPrep/LArDSPThresholdFillAlg.py")
+    
diff --git a/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet.sh b/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet.sh
index 2c1fc2e8deac51647f06ffc5a0bff3827f81a1f2..1cef0c7c04438dceadceccd0cec20a6548d8ee2a 100755
--- a/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet.sh
+++ b/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet.sh
@@ -8,22 +8,31 @@ else
 fi 
 if [[ $# > 1 ]]
 then
- Pileup=$2
+ Noise=$2
 else 
- Pileup=""
+ Noise=""
 fi 
 if [[ $# > 2 ]]
 then
- Noise=$3
+ Pileup=$3
 else 
- Noise=""
+ Pileup=""
 fi 
 fulltag=`getCurrentFolderTag.py "COOLOFL_LAR/CONDBR2"  /LAR/NoiseOfl/CellNoise | tail -1`
 #foreach i in `seq 0 11`
 #foreach i in `seq 0 22`
 foreach i in `seq 5 22`
 #foreach i in `seq 16 22`
-    athena.py -s -c "RunNumber=$Run;tagNum=$i;pileupsqlite=\"$Pileup\";noisesqlite=\"$Noise\";noisetag=\"$fulltag\"" LArOnlDbPrep/LArDSPThresholdTopOptions.py
+    cmdline="RunNumber=$Run;RunSince=$Run;tagNum=$i;noisetag=\"$fulltag\";"
+    if [[ $Noise != "" ]]
+    then
+       cmdline+="noisesqlite=\"$Noise\";" 
+    fi
+    if [[ $Pileup != "" ]]
+    then
+       cmdline+="pileupsqlite=\"$Pileup\";"
+    fi   
+    athena.py -c "$cmdline" LArOnlDbPrep/LArDSPThresholdTopOptions.py
 end
 
 #foreach i in `seq 0 16`
diff --git a/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet_mu50.sh b/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet_mu50.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6e6fd60c757248e0c20d9ead6a66e2e3762e9d73
--- /dev/null
+++ b/LArCalorimeter/LArOnlDbPrep/share/makeThresholdSet_mu50.sh
@@ -0,0 +1,33 @@
+#!/bin/zsh
+
+if [[ $# > 0  ]]
+then
+ Run=$1
+else 
+ Run=266280
+fi 
+if [[ $# > 1 ]]
+then
+ Pileup=$2
+else 
+ Pileup=""
+fi 
+if [[ $# > 2 ]]
+then
+ Noise=$3
+else 
+ Noise=""
+fi 
+fulltag=`getCurrentFolderTag.py "COOLOFL_LAR/CONDBR2"  /LAR/NoiseOfl/CellNoise | tail -1`
+#foreach i in `seq 0 11`
+#foreach i in `seq 0 22`
+foreach i in `seq 0 6`
+#foreach i in `seq 16 22`
+    if [[ $Noise == "" ]]
+    then
+       athena.py -s -c "RunNumber=$Run;tagNum=$i;pileupsqlite=\"$Pileup\";noisetag=\"$fulltag\";RunSince=$Run" LArOnlDbPrep/LArDSPThresholdTopOptions_mu50.py
+    else   
+       athena.py -s -c "RunNumber=$Run;tagNum=$i;pileupsqlite=\"$Pileup\";noisesqlite=\"$Noise\";noisetag=\"$fulltag\";RunSince=$Run" LArOnlDbPrep/LArDSPThresholdTopOptions_mu50.py
+    fi   
+end
+
diff --git a/LArCalorimeter/LArRecConditions/LArRecConditions/LArFEBTempData.h b/LArCalorimeter/LArRecConditions/LArRecConditions/LArFEBTempData.h
new file mode 100644
index 0000000000000000000000000000000000000000..b2c796724af2a95db8ae974fd71d5b9dab8c8ec3
--- /dev/null
+++ b/LArCalorimeter/LArRecConditions/LArRecConditions/LArFEBTempData.h
@@ -0,0 +1,41 @@
+/*
+  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+*/
+
+#ifndef LARRECCONDITIONS_LARFEBTEMPDATA_H
+#define LARRECCONDITIONS_LARFEBTEMPDATA_H
+
+#include "Identifier/HWIdentifier.h"
+#include <vector>
+#include <map>
+
+class LArFEBTempData {
+
+  friend class LArFEBTempAlg; //The conditions alg filling this object
+
+ public:
+
+  typedef std::pair<float,float> FEBTemp; 
+  LArFEBTempData(){};
+
+  // Given a FEB ID, return std::vector of temp1 and temp2 values
+  FEBTemp getFebTemp( const HWIdentifier& id ) const ;
+  
+
+ private:
+  std::map<HWIdentifier,FEBTemp> m_mapVec;
+
+};
+
+
+//Inline methods:
+inline LArFEBTempData::FEBTemp LArFEBTempData::getFebTemp(const HWIdentifier& h) const{
+  return m_mapVec.at(h);
+}
+
+#include "AthenaKernel/CLASS_DEF.h"
+CLASS_DEF( LArFEBTempData, 204177791 , 1)
+#include "AthenaKernel/CondCont.h"
+CLASS_DEF( CondCont<LArFEBTempData>, 244452853 , 1)
+
+#endif