From ccd407f2cc325fdb5f26bfe6d199a0e31c914a31 Mon Sep 17 00:00:00 2001
From: Scott Snyder <scott.snyder@cern.ch>
Date: Wed, 17 Aug 2016 03:52:40 +0200
Subject: [PATCH] 'Const fix.' (MuonMDT_CnvTools-02-02-03-06)

	* Tagging MuonMDT_CnvTools-02-02-03-06.
	* Const fix.
	* Tagging MuonMDT_CnvTools-02-02-03-05.
	* Fix placement of using declaration.
	* Tagging MuonMDT_CnvTools-02-02-03-04.
	* Fix clang warning: use of abs.
	* Tagging MuonMDT_CnvTools-02-02-03-03.
	* Fix clang warnings: unused members.
	* Tagging MuonMDT_CnvTools-02-02-03-02.
	* Comply with ATLAS naming conventions.
	* Tagging MuonMDT_CnvTools-02-02-03-01.
	* endreq -> endmsg.
---
 .../MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx  |  6 ++--
 .../src/MDT_RawDataProviderTool.cxx           | 16 ++++-----
 .../src/MDT_RawDataProviderTool.h             |  4 +--
 .../MuonMDT_CnvTools/src/MdtAmtReadOut.cxx    | 24 ++++++-------
 .../MuonMDT_CnvTools/src/MdtAmtReadOut.h      | 34 +++++++++----------
 .../src/MdtCsmContByteStreamTool.cxx          |  2 +-
 .../MuonMDT_CnvTools/src/MdtCsmReadOut.cxx    | 26 +++++++-------
 .../MuonMDT_CnvTools/src/MdtCsmReadOut.h      | 28 +++++++--------
 .../MuonMDT_CnvTools/src/MdtRODReadOut.cxx    | 16 ++++-----
 .../MuonMDT_CnvTools/src/MdtRODReadOut.h      | 14 ++++----
 .../MuonMDT_CnvTools/src/MdtROD_Decoder.cxx   | 14 ++++----
 .../MuonMDT_CnvTools/src/MdtROD_Decoder.h     |  2 +-
 .../MuonMDT_CnvTools/src/MdtROD_Encoder.cxx   | 10 +++---
 .../src/MdtRdoToPrepDataTool.cxx              | 30 ++++++++--------
 .../src/MdtRdoToPrepDataTool.h                |  4 +--
 15 files changed, 116 insertions(+), 114 deletions(-)

diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
index 0e0678b3f1d..2619c9958af 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_Hid2RESrcID.cxx
@@ -54,7 +54,7 @@ uint32_t MDT_Hid2RESrcID::getRodID(const Identifier& offlineId) {
   uint8_t  ChannelId = 0;
 
   log << MSG::DEBUG << "Getting RODId of the Station " << MSG::hex << offlineId << MSG::dec
-      << endreq;
+      << endmsg;
 
   bool online;
   int station_name = m_mdtIdHelper->stationName(offlineId);
@@ -75,12 +75,12 @@ uint32_t MDT_Hid2RESrcID::getRodID(const Identifier& offlineId) {
   
   if (!online) {
     log << MSG::DEBUG << "ROD Id of the Station " << MSG::hex << "0x" << offlineId
-	<< " not found" << endreq;
+	<< " not found" << endmsg;
     MrodId=0xff;
   }
   else {
     log << MSG::DEBUG << "The ROD ID of the station " 
-	<< "is " << MSG::hex << "0x" << MrodId << MSG::dec << endreq;
+	<< "is " << MSG::hex << "0x" << MrodId << MSG::dec << endmsg;
   }
   
   eformat::SubDetector detid = (eformat::SubDetector) SubsystemId;
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
index c08300e943e..dfe7670b874 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.cxx
@@ -18,8 +18,8 @@ Muon::MDT_RawDataProviderTool::MDT_RawDataProviderTool(const std::string& t,
 						       const IInterface*  p )
   :
   AthAlgTool(t,n,p),
-  m_rdoContainer(0),
-  m_lastLvl1ID(0),
+  //m_rdoContainer(0),
+  //m_lastLvl1ID(0),
   m_decoder("MdtROD_Decoder"),
   m_rdoContainerKey("MDTCSM"),
   m_muonMgr(0),
@@ -146,7 +146,7 @@ StatusCode Muon::MDT_RawDataProviderTool::initialize()
     } 
   else has_bytestream = true;
   //{
-  //    m_log << MSG::FATAL << "Cannot get the job configuration" << endreq;
+  //    m_log << MSG::FATAL << "Cannot get the job configuration" << endmsg;
   //    return StatusCode::FAILURE;
   //}
   
@@ -155,18 +155,18 @@ StatusCode Muon::MDT_RawDataProviderTool::initialize()
   m_activeStore->setStore( &*evtStore() ); 
   if( has_bytestream || m_rdoContainerKey != "MDTCSM" )
     {   
-      MdtCsmContainer* m_container = 
+      MdtCsmContainer* container = 
 	Muon::MuonRdoContainerAccess::retrieveMdtCsm(m_rdoContainerKey);
       
       // create and register the container only once
-      if(m_container==0)
+      if(container==0)
 	{
           try 
 	    {
               if(m_muonMgr->mdtIdHelper()->stationNameIndex("BME") != -1)
-                m_container = new MdtCsmContainer(m_muonMgr->mdtIdHelper()->detectorElement_hash_max());
+                container = new MdtCsmContainer(m_muonMgr->mdtIdHelper()->detectorElement_hash_max());
               else
-                m_container = new MdtCsmContainer(m_muonMgr->mdtIdHelper()->module_hash_max());
+                container = new MdtCsmContainer(m_muonMgr->mdtIdHelper()->module_hash_max());
 	    } 
           catch(std::bad_alloc) 
 	    {
@@ -175,7 +175,7 @@ StatusCode Muon::MDT_RawDataProviderTool::initialize()
 	    }
 	  
           // record the container for being used by the convert method
-          if( Muon::MuonRdoContainerAccess::record(m_container,
+          if( Muon::MuonRdoContainerAccess::record(container,
                                                    m_rdoContainerKey,
                                                    serviceLocator(),
                                                    msg(),
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
index c13254237b5..1b68b16d21e 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MDT_RawDataProviderTool.h
@@ -55,10 +55,10 @@ class MDT_RawDataProviderTool : virtual public IMuonRawDataProviderTool, virtual
   virtual StatusCode convert(const std::vector<uint32_t>& robIds);//!< for a particular vector of ROBId's
   private:
  
-  MdtCsmContainer*                  m_rdoContainer; //!< MDT RDO container. Will be created by this tool.
+  //MdtCsmContainer*                  m_rdoContainer; //!< MDT RDO container. Will be created by this tool.
   //bool                              m_debug; //!< If true, output debug info.
   std::set<uint32_t>                m_robIdSet;
-  unsigned int                      m_lastLvl1ID;
+  //unsigned int                      m_lastLvl1ID;
   ToolHandle<MdtROD_Decoder>        m_decoder; 
   std::string                       m_rdoContainerKey;
   const MuonGM::MuonDetectorManager* m_muonMgr;    
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.cxx
index 0f34f50aacc..e4ab808b649 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.cxx
@@ -26,7 +26,7 @@ void MdtAmtReadOut::decodeWord(uint32_t dataWord)
   setZero();
   m_dataWord = dataWord;
   m_word = dataWord;
-  m_wordHeader = (dataWord>>headerPos)&headerBits;
+  m_wordHeader = (dataWord>>s_headerPos)&s_headerBits;
 
   if (is_TSM())         // TDC single measurement
     {
@@ -97,14 +97,14 @@ void MdtAmtReadOut::setZero()
 uint32_t MdtAmtReadOut::makeBOT(uint16_t tdcId, uint16_t ecnt, uint16_t bcid)
 { 
   uint16_t inputData[4];
-  uint16_t inputPos[4] = {headerPos, 24, 12, 0};
+  uint16_t inputPos[4] = {s_headerPos, 24, 12, 0};
   uint16_t nData = 4;
 
   if (tdcId < 16) {
-    inputData[0]=BOTvalue1;
+    inputData[0]=s_BOTvalue1;
   }
   else {
-    inputData[0]=BOTvalue2;
+    inputData[0]=s_BOTvalue2;
     tdcId -= 16;
   }
 
@@ -118,8 +118,8 @@ uint32_t MdtAmtReadOut::makeBOT(uint16_t tdcId, uint16_t ecnt, uint16_t bcid)
 // End of TDC
 uint32_t MdtAmtReadOut::makeEOT(uint16_t jt, uint16_t ecnt, uint16_t wcnt)
 { 
-  uint16_t inputData[5] = {EOTvalue,   0, jt, ecnt, wcnt};
-  uint16_t inputPos[5]  = {headerPos, 26, 24, 12, 0};
+  uint16_t inputData[5] = {s_EOTvalue,   0, jt, ecnt, wcnt};
+  uint16_t inputPos[5]  = {s_headerPos, 26, 24, 12, 0};
   uint16_t nData = 5;
 
   return setBits(nData,inputData,inputPos);
@@ -134,7 +134,7 @@ uint32_t MdtAmtReadOut::makeTSM(uint16_t jt, uint16_t channel, bool leading,
   if (leading) lead = 0;
   if (errflag) err  = 1;
 
-  uint16_t inputData[8] = {TSMvalue ,  
+  uint16_t inputData[8] = {(uint16_t)s_TSMvalue ,  
                            0, 
 			   static_cast<uint16_t> (jt      & 0x2), 
 			   static_cast<uint16_t> (channel & 0x1f), 
@@ -142,7 +142,7 @@ uint32_t MdtAmtReadOut::makeTSM(uint16_t jt, uint16_t channel, bool leading,
 			   static_cast<uint16_t> (err     & 0x1), 
 			   static_cast<uint16_t> (coarse  & 0xfff), 
 			   static_cast<uint16_t> (fine    & 0x1f)};
-  uint16_t inputPos[8]  = {headerPos, 26, 24,      19,   18,  17,      5,    0};
+  uint16_t inputPos[8]  = {s_headerPos, 26, 24,      19,   18,  17,      5,    0};
   uint16_t nData = 8;
 
   return setBits(nData,inputData,inputPos);
@@ -152,14 +152,14 @@ uint32_t MdtAmtReadOut::makeTSM(uint16_t jt, uint16_t channel, bool leading,
 uint32_t MdtAmtReadOut::makeTCM(uint16_t jt, uint16_t channel, uint16_t width,
 		   uint16_t coarse, uint16_t fine)
 {
-  uint16_t inputData[7] = {TCMvalue ,  
+  uint16_t inputData[7] = {(uint16_t)s_TCMvalue ,  
                            0, 
 			   static_cast<uint16_t> (jt      & 0x2), 
 			   static_cast<uint16_t> (channel & 0x1f), 
 			   static_cast<uint16_t> (width   & 0xff), 
 			   static_cast<uint16_t> (coarse  & 0x3f), 
 			   static_cast<uint16_t> (fine    & 0x1f) };
-  uint16_t inputPos[7]  = {headerPos, 26, 24,      19,    11,      5,    0};
+  uint16_t inputPos[7]  = {s_headerPos, 26, 24,      19,    11,      5,    0};
   uint16_t nData = 7;
 
   return setBits(nData,inputData,inputPos);
@@ -171,8 +171,8 @@ uint32_t MdtAmtReadOut::makeTMC(uint16_t jt, uint32_t masked)
   uint16_t masked_low  = masked & 0xffff;
   uint16_t masked_high = masked & 0xff0000;
 
-  uint16_t inputData[5] = {TMCvalue ,  0, jt, masked_high, masked_low};
-  uint16_t inputPos[5]  = {headerPos, 26, 24, 16,  0};
+  uint16_t inputData[5] = {s_TMCvalue ,  0, jt, masked_high, masked_low};
+  uint16_t inputPos[5]  = {s_headerPos, 26, 24, 16,  0};
   uint16_t nData = 5;
 
   return setBits(nData,inputData,inputPos);  
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.h
index b5ef132a29d..4a2fc43a33b 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtAmtReadOut.h
@@ -44,31 +44,31 @@ class MdtAmtReadOut : public MdtReadOut {
 
   // Word header Position and values
   // The word header occupies the 4 highest bits of each TDC data word 
-  static const uint16_t headerPos  = 28;
-  static const uint16_t headerBits = 0xf;
+  static const uint16_t s_headerPos  = 28;
+  static const uint16_t s_headerBits = 0xf;
 
   // Beginning of TDC: two possible header values 
   // for channels 00-15 and 16-17 respectively
-  static const uint16_t BOTvalue1  = 0xa;
-  static const uint16_t BOTvalue2  = 0xb;
+  static const uint16_t s_BOTvalue1  = 0xa;
+  static const uint16_t s_BOTvalue2  = 0xb;
   
   // End of TDC
-  static const uint16_t EOTvalue   = 0xc;
+  static const uint16_t s_EOTvalue   = 0xc;
   
   // TDC single measurement
-  static const uint16_t TMCvalue   = 0x2;
+  static const uint16_t s_TMCvalue   = 0x2;
   
   // TDC single measurement
-  static const uint16_t TSMvalue   = 0x3;
+  static const uint16_t s_TSMvalue   = 0x3;
   
   // TDC combined measurement
-  static const uint16_t TCMvalue   = 0x4;
+  static const uint16_t s_TCMvalue   = 0x4;
   
   // TDC error status
-  static const uint16_t TESvalue   = 0x6;
+  static const uint16_t s_TESvalue   = 0x6;
 
   // add the CSM trailer word count for operation with TDC trailer suppression
-  static const uint16_t TWCvalue   = 0x8;
+  static const uint16_t s_TWCvalue   = 0x8;
 
  public:
   
@@ -82,20 +82,20 @@ class MdtAmtReadOut : public MdtReadOut {
 
   // Methods to identify the word type
   // Beginning of TDC
-  bool is_BOT() {return ((m_wordHeader == BOTvalue1) || (m_wordHeader == BOTvalue2));};
+  bool is_BOT() {return ((m_wordHeader == s_BOTvalue1) || (m_wordHeader == s_BOTvalue2));};
   // End of TDC
-  bool is_EOT() {return (m_wordHeader == EOTvalue);};
+  bool is_EOT() {return (m_wordHeader == s_EOTvalue);};
   // TDC masked channels
-  bool is_TMC() {return (m_wordHeader == TMCvalue);};
+  bool is_TMC() {return (m_wordHeader == s_TMCvalue);};
   // TDC single measurement
-  bool is_TSM() {return (m_wordHeader == TSMvalue);};
+  bool is_TSM() {return (m_wordHeader == s_TSMvalue);};
   // TDC combined measurement
-  bool is_TCM() {return (m_wordHeader == TCMvalue);}; 
+  bool is_TCM() {return (m_wordHeader == s_TCMvalue);}; 
   // TDC error status
-  bool is_TES() {return (m_wordHeader == TESvalue);};
+  bool is_TES() {return (m_wordHeader == s_TESvalue);};
   
   // trailer word count (actually a CSM word)
-  bool is_TWC() {return (m_wordHeader == TWCvalue);};
+  bool is_TWC() {return (m_wordHeader == s_TWCvalue);};
 
   // Methods to retrieve the decoded word content
   uint16_t tdcId() {return m_tdcId;}
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
index 3d58a776406..33e8d0749db 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmContByteStreamTool.cxx
@@ -117,7 +117,7 @@ StatusCode Muon::MdtCsmContByteStreamTool::convert(CONTAINER* cont, RawEventWrit
   m_fea.fill(re,log); 
   
   ATH_MSG_DEBUG(" RawEvent size in 32 bit word " << re->size_word());
-  //    log <<MSG::DEBUG<<" RawEvent header  " << re->header() << endreq;
+  //    log <<MSG::DEBUG<<" RawEvent header  " << re->header() << endmsg;
   
   return StatusCode::SUCCESS; 
   
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.cxx
index 3ede1c04acc..67214dcc231 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.cxx
@@ -34,7 +34,7 @@ void MdtCsmReadOut::decodeWord(uint32_t dataWord)
 
   m_dataWord   = dataWord;
   m_word       = dataWord;
-  m_wordHeader = (dataWord>>headerPos) & headerBits;
+  m_wordHeader = (dataWord>>s_headerPos) & s_headerBits;
 
   if (is_BOB())
     {
@@ -66,8 +66,8 @@ void MdtCsmReadOut::decodeWord(uint32_t dataWord)
 uint32_t MdtCsmReadOut::makeBOB(uint32_t lvl1Id)
 {
   uint16_t nData = 2;
-  uint32_t inputData[2] = {BOBvalue, lvl1Id};
-  uint16_t inputPos[2] = {headerPos,      0};
+  uint32_t inputData[2] = {s_BOBvalue, lvl1Id};
+  uint16_t inputPos[2] = {s_headerPos,      0};
   
   return setBits(nData, inputData, inputPos);
 }
@@ -75,8 +75,8 @@ uint32_t MdtCsmReadOut::makeBOB(uint32_t lvl1Id)
 uint32_t MdtCsmReadOut::makeLWC(uint32_t clwc)
 {
   uint16_t nData = 3;
-  uint32_t inputData[3] = {LWCvalue,  0, clwc};
-  uint16_t inputPos[3] = {headerPos, 20,   0};
+  uint32_t inputData[3] = {s_LWCvalue,  0, clwc};
+  uint16_t inputPos[3] = {s_headerPos, 20,   0};
   
   return setBits(nData, inputData, inputPos);
 }
@@ -86,8 +86,8 @@ uint32_t MdtCsmReadOut::makeBOL(uint16_t mrodId, uint16_t csmId)
   uint16_t nData = 5;
   // Error and Zero-suppression bits are by now set to 0 (no error)
   // and 1 (Zero-suppression activated)
-  uint32_t inputData[5] = {BOLvalue, 0, 1, mrodId, csmId};
-  uint16_t inputPos[5] = {headerPos,20,16,      4,     0};
+  uint32_t inputData[5] = {s_BOLvalue, 0, 1, mrodId, csmId};
+  uint16_t inputPos[5] = {s_headerPos,20,16,      4,     0};
 
   return setBits(nData, inputData, inputPos);
 }
@@ -95,8 +95,8 @@ uint32_t MdtCsmReadOut::makeBOL(uint16_t mrodId, uint16_t csmId)
 uint32_t MdtCsmReadOut::makeTLP(uint32_t flags)
 {
   uint16_t nData = 4;
-  uint32_t inputData[4] = {TLPvalue,  0,  0, flags};
-  uint16_t inputPos[4] = {headerPos, 20, 18,     0};
+  uint32_t inputData[4] = {s_TLPvalue,  0,  0, flags};
+  uint16_t inputPos[4] = {s_headerPos, 20, 18,     0};
 
   return setBits(nData, inputData, inputPos);  
 }
@@ -104,8 +104,8 @@ uint32_t MdtCsmReadOut::makeTLP(uint32_t flags)
 uint32_t MdtCsmReadOut::makeTWC(uint16_t ecnt, uint16_t ctwc)
 {
   uint16_t nData = 3;
-  uint16_t inputData[3] = {TWCvalue, ecnt, ctwc};
-  uint16_t inputPos[3] = {headerPos,   12,    0};
+  uint16_t inputData[3] = {s_TWCvalue, ecnt, ctwc};
+  uint16_t inputPos[3] = {s_headerPos,   12,    0};
 
   return setBits(nData, inputData, inputPos);    
 }
@@ -113,8 +113,8 @@ uint32_t MdtCsmReadOut::makeTWC(uint16_t ecnt, uint16_t ctwc)
 uint32_t MdtCsmReadOut::makeEOB(uint32_t wcnt)
 {
   uint16_t nData = 2;
-  uint32_t inputData[2] = {EOBvalue, wcnt};
-  uint16_t inputPos[2] = {headerPos,    0};
+  uint32_t inputData[2] = {s_EOBvalue, wcnt};
+  uint16_t inputPos[2] = {s_headerPos,    0};
 
   return setBits(nData, inputData, inputPos);      
 }
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.h
index 2b71149cb7e..105ea675676 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtCsmReadOut.h
@@ -36,21 +36,21 @@ class MdtCsmReadOut : public MdtReadOut
 
   // Word header Position and values
   // The word header occupies the 8 highest bits of each CSM word 
-  static const uint16_t headerPos  = 24;
-  static const uint16_t headerBits = 0xff;
+  static const uint16_t s_headerPos  = 24;
+  static const uint16_t s_headerBits = 0xff;
   
   // Beginning of buffer
-  static const uint16_t BOBvalue = 0x80;
+  static const uint16_t s_BOBvalue = 0x80;
   // Link Word Count: first word of a CSM link block
-  static const uint16_t LWCvalue   = 0x81;
+  static const uint16_t s_LWCvalue   = 0x81;
   // Beginning of Link: signals which CSM link is giving its data
-  static const uint16_t BOLvalue   = 0x18;
+  static const uint16_t s_BOLvalue   = 0x18;
   // TDC Link Present
-  static const uint16_t TLPvalue   = 0x89;
+  static const uint16_t s_TLPvalue   = 0x89;
   // Trailer Word Count: last word of a CSM link block
-  static const uint16_t TWCvalue   = 0x8a;
+  static const uint16_t s_TWCvalue   = 0x8a;
   // End of Block (end of data from the CSMs)
-  static const uint16_t EOBvalue   = 0xf0;
+  static const uint16_t s_EOBvalue   = 0xf0;
   
  public:
   MdtCsmReadOut();
@@ -58,12 +58,12 @@ class MdtCsmReadOut : public MdtReadOut
 
   void decodeWord(uint32_t dataWord);
 
-  bool is_BOB() {return m_wordHeader == BOBvalue;};  
-  bool is_LWC() {return m_wordHeader == LWCvalue;};  
-  bool is_BOL() {return m_wordHeader == BOLvalue;};
-  bool is_TLP() {return m_wordHeader == TLPvalue;};
-  bool is_TWC() {return m_wordHeader == TWCvalue;}; 
-  bool is_EOB() {return m_wordHeader == EOBvalue;}; 
+  bool is_BOB() {return m_wordHeader == s_BOBvalue;};  
+  bool is_LWC() {return m_wordHeader == s_LWCvalue;};  
+  bool is_BOL() {return m_wordHeader == s_BOLvalue;};
+  bool is_TLP() {return m_wordHeader == s_TLPvalue;};
+  bool is_TWC() {return m_wordHeader == s_TWCvalue;}; 
+  bool is_EOB() {return m_wordHeader == s_EOBvalue;}; 
 
   // Methods to access the decoded information
   uint32_t lvl1Id() {return m_lvl1Id;}
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.cxx
index d23965932ad..7e360729766 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.cxx
@@ -11,12 +11,12 @@
 
 #include <cassert>
 
-const uint32_t MdtRODReadOut::RODstart = 0xee1234ee;
-const uint32_t MdtRODReadOut::RODheadersize = 0x8;
-const uint32_t MdtRODReadOut::RODversion  = 0;      // ??
+const uint32_t MdtRODReadOut::s_RODstart = 0xee1234ee;
+const uint32_t MdtRODReadOut::s_RODheadersize = 0x8;
+const uint32_t MdtRODReadOut::s_RODversion  = 0;      // ??
 
 MdtRODReadOut::MdtRODReadOut() :
-  m_dataWord(0),
+  //m_dataWord(0),
   m_subdetId(0),
   m_mrodId(0),
   m_lvl1Id(0),
@@ -40,17 +40,17 @@ void MdtRODReadOut::decodeHeader(const std::vector<uint32_t>& p)
 
   setZero();
 
-  if (p[0] != RODstart) 
+  if (p[0] != s_RODstart) 
     {
 #ifndef NDEBUG
-      log << MSG::ERROR << "ROD Start of header marker not found" << endreq;
+      log << MSG::ERROR << "ROD Start of header marker not found" << endmsg;
 #endif
       assert(0);
     }
-  if (p[1] != RODheadersize) 
+  if (p[1] != s_RODheadersize) 
     {
 #ifndef NDEBUG
-      log << MSG::ERROR << "ROD header size doesn't match " << RODheadersize << endreq;
+      log << MSG::ERROR << "ROD header size doesn't match " << s_RODheadersize << endmsg;
 #endif
       assert(0);
     }
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.h
index c6830cca827..08455df288d 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRODReadOut.h
@@ -18,7 +18,7 @@ class MdtRODReadOut : public MdtReadOut
 
  private:
 
-  uint32_t m_dataWord;
+  //uint32_t m_dataWord;
   // Data members
   uint16_t m_subdetId;   // Sub-detector Id 
   uint16_t m_mrodId;     // MROD Id
@@ -27,9 +27,9 @@ class MdtRODReadOut : public MdtReadOut
   uint16_t m_triggerTypeId; // Trigger type Id
 
   // Data words in the ROD header
-  static const uint32_t RODstart;
-  static const uint32_t RODheadersize;
-  static const uint32_t RODversion;      // ??
+  static const uint32_t s_RODstart;
+  static const uint32_t s_RODheadersize;
+  static const uint32_t s_RODversion;      // ??
 
  public:
   MdtRODReadOut();
@@ -40,9 +40,9 @@ class MdtRODReadOut : public MdtReadOut
   uint32_t* encodeFooter();
   
   // Header words
-  uint32_t makeHeaderMarker() {return RODstart;}
-  uint32_t makeHeaderSize() {return RODheadersize;}
-  uint32_t makeFormatVersion() {return RODversion;}
+  uint32_t makeHeaderMarker() {return s_RODstart;}
+  uint32_t makeHeaderSize() {return s_RODheadersize;}
+  uint32_t makeFormatVersion() {return s_RODversion;}
   uint32_t makeRODId(uint16_t subdet, uint16_t mrod);
 
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
index 205a195946e..55dc2979001 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.cxx
@@ -14,6 +14,8 @@
 
 #include <algorithm> 
 
+using eformat::helper::SourceIdentifier; 
+
 static const InterfaceID IID_IMdtROD_Decoder
             ("MdtROD_Decoder", 1, 0);
 
@@ -155,19 +157,19 @@ StatusCode MdtROD_Decoder::fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::RO
   
   // FIXME - Removed debug output for the moment. EJWM
 //   if (m_debug) log << MSG::DEBUG 
-//       << "Collection identifier : " << csmOfflineId.getString() << endreq;
+//       << "Collection identifier : " << csmOfflineId.getString() << endmsg;
 // 
 //   if (m_debug) log << MSG::DEBUG 
-//               << "**********Decoder dumping the words******** " << endreq;
+//               << "**********Decoder dumping the words******** " << endmsg;
 //   if (size > 0) {
-//     log << MSG::DEBUG << "The size of this ROD-read is " << size << endreq;
+//     log << MSG::DEBUG << "The size of this ROD-read is " << size << endmsg;
 //     for (unsigned int i=0; i < size; i++)
 //       if (m_debug) log << MSG::DEBUG << "word " << i 
-//                           << " = " << MSG::hex << robFrag[i] << MSG::dec << endreq;
+//                           << " = " << MSG::hex << robFrag[i] << MSG::dec << endmsg;
 //   }
 //   else {
 //       if (m_debug) log << MSG::DEBUG << " Buffer size 0 ! " 
-//                                           << endreq;
+//                                           << endmsg;
 //       return;
 //   }
 
@@ -223,7 +225,7 @@ StatusCode MdtROD_Decoder::fillCollections(const OFFLINE_FRAGMENTS_NAMESPACE::RO
 //
 //  if (m_csmReadOut->lvl1Id() != m_rodReadOut->lvl1Id()) {
 //#ifndef NDEBUG
-//    m_log << MSG::ERROR << " LVL1 ID from ROD Header and BOB don't match " << endreq;
+//    m_log << MSG::ERROR << " LVL1 ID from ROD Header and BOB don't match " << endmsg;
 //#endif
 //  }
 /////////////////////////
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
index 986ad87f613..02e1bcbc3bd 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Decoder.h
@@ -34,7 +34,7 @@
 
 
 
-using eformat::helper::SourceIdentifier; 
+//using eformat::helper::SourceIdentifier; 
 
 typedef std::map <uint16_t, MdtAmtHit*, std::less<uint16_t> > leading_amt_map;
 
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx
index 0b6609f02b1..71a5b650fac 100755
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtROD_Encoder.cxx
@@ -84,7 +84,7 @@ void MdtROD_Encoder::fillROD(std::vector<uint32_t>& v)
   
   //mrod_wcnt += rodReadOut->makeHeaderSize();
   
-  typedef std::vector<MdtAmtHit*>        hit_vector;
+  typedef std::vector<const MdtAmtHit*>        hit_vector;
   typedef std::map<uint16_t, hit_vector> tdc_map;
   typedef std::map<uint16_t, uint32_t>   masked_map;
 
@@ -113,7 +113,7 @@ void MdtROD_Encoder::fillROD(std::vector<uint32_t>& v)
     maskedMap.clear();
     MdtCsm::const_iterator it_amt = csm->begin();
     for ( ; it_amt != csm->end() ; ++it_amt) {
-      MdtAmtHit * amt = (*it_amt);
+      const MdtAmtHit * amt = (*it_amt);
       uint16_t tdcNum = amt->tdcId();
 
       if (!amt->isMasked()) {
@@ -189,11 +189,11 @@ void MdtROD_Encoder::fillROD(std::vector<uint32_t>& v)
   
   // Status words not fully defined yet ... wait
   
-  //  log << MSG::DEBUG << "************** Encoder dumping the words ************" << endreq;
+  //  log << MSG::DEBUG << "************** Encoder dumping the words ************" << endmsg;
   //if (v.size() > 0) {
-  //  log << MSG::DEBUG << "The size of the ROD-Write is: " << v.size() << endreq;
+  //  log << MSG::DEBUG << "The size of the ROD-Write is: " << v.size() << endmsg;
   //  for (unsigned int i=0 ; i<v.size() ; ++i) {
-  //    log << MSG::DEBUG << "word " << i << " = " << MSG::hex << v[i] << MSG::dec << endreq;
+  //    log << MSG::DEBUG << "word " << i << " = " << MSG::hex << v[i] << MSG::dec << endmsg;
   //  }
   //}
   
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
index 55cbb204e82..6d9ab18f6bd 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.cxx
@@ -137,10 +137,10 @@ StatusCode Muon::MdtRdoToPrepDataTool::initialize()
   
   //   // Get ROBDataProviderSvc
   //   if (m_robDataProvider.retrieve().isFailure()) {
-  //      *m_log << MSG::FATAL << "Failed to retrieve serive " << m_robDataProvider << endreq;
+  //      *m_log << MSG::FATAL << "Failed to retrieve serive " << m_robDataProvider << endmsg;
   //     return StatusCode::FAILURE;
   //   } else
-  //      *m_log << MSG::INFO << "Retrieved service " << m_robDataProvider << endreq;
+  //      *m_log << MSG::INFO << "Retrieved service " << m_robDataProvider << endmsg;
   
   // Get MdtRawDataProviderTool
   if (m_rawDataProviderTool.retrieve().isFailure()) {
@@ -184,7 +184,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::initialize()
     for(int i=0; i<2; i++){
       for(int j=0; j<3; j++){
 	for(int k=0; k<36; k++){
-	  twin_chamber[i][j][k] = 1000*i + 100*j + k;
+	  m_twin_chamber[i][j][k] = 1000*i + 100*j + k;
 	}
       }
     }
@@ -193,7 +193,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::initialize()
     for(int i=0; i<2; i++){
       for(int j=0; j<3; j++){
 	for(int k=0; k<36; k++){
-	  secondaryHit_twin_chamber[i][j][k] = 10000*(i+1) + 100*j + k;
+	  m_secondaryHit_twin_chamber[i][j][k] = 10000*(i+1) + 100*j + k;
 	}
       }
     }
@@ -326,7 +326,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::decode( const std::vector<uint32_t>& robI
       if( m_useAllBOLTwin && isBOL ) {
 	hasTwin = true;
       }
-      else if(isBOL && fabs(m_mdtHelper->stationEta(elementId)) == 4 
+      else if(isBOL && std::abs(m_mdtHelper->stationEta(elementId)) == 4 
 	      && m_mdtHelper->stationPhi(elementId) == 7){
 	hasTwin = true;
       }
@@ -539,7 +539,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVe
 	    // 		      << "   eta(4) = " <<  m_mdtHelper->stationEta(elementId)
 	    // 		      << "   phi(7) = " << m_mdtHelper->stationPhi(elementId)
 	    // 		      << std::endl;
-	    if( chIndex == MuonStationIndex::BOL && fabs(m_mdtHelper->stationEta(elementId)) == 4 
+	    if( chIndex == MuonStationIndex::BOL && std::abs(m_mdtHelper->stationEta(elementId)) == 4 
 	       && m_mdtHelper->stationPhi(elementId) == 7){
 	      BOL4X13 = true;
 	    }
@@ -620,7 +620,7 @@ StatusCode Muon::MdtRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVe
 	// 		  << "   eta(4) = " <<  m_mdtHelper->stationEta(elementId)
 	// 		  << "   phi(7) = " << m_mdtHelper->stationPhi(elementId)
 	// 		  << std::endl;
-	if(chIndex == MuonStationIndex::BOL && fabs(m_mdtHelper->stationEta(elementId)) == 4 
+	if(chIndex == MuonStationIndex::BOL && std::abs(m_mdtHelper->stationEta(elementId)) == 4 
            && m_mdtHelper->stationPhi(elementId) == 7){ 
           BOL4X13 = true;
         }
@@ -1122,22 +1122,22 @@ StatusCode Muon::MdtRdoToPrepDataTool::processCsmTwin(const MdtCsm *rdoColl, std
     
 
       // fill the digitColl map
-      if( mdtDigitColl[ twin_chamber[multilayer-1][layer-1][twinPair-1] ].first == 0){
-        mdtDigitColl[ twin_chamber[multilayer-1][layer-1][twinPair-1] ].first = newDigit;
+      if( mdtDigitColl[ m_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first == 0){
+        mdtDigitColl[ m_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first = newDigit;
       }
-      else if( mdtDigitColl[ twin_chamber[multilayer-1][layer-1][twinPair-1] ].second == 0){
-        mdtDigitColl[ twin_chamber[multilayer-1][layer-1][twinPair-1] ].second = newDigit;
+      else if( mdtDigitColl[ m_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second == 0){
+        mdtDigitColl[ m_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second = newDigit;
       }
       // if a secondary hit appears in a tube add it to mdtDigitColl, unless m_discardSecondaryHitTwin flag is true
       else{
         ATH_MSG_VERBOSE(" TWIN TUBES: found a secondary(not twin) hit in a twin tube");
  
         if(!m_discardSecondaryHitTwin){
-          if( mdtDigitColl[ secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first == 0){
-        mdtDigitColl[ secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first = newDigit;
+          if( mdtDigitColl[ m_secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first == 0){
+        mdtDigitColl[ m_secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].first = newDigit;
           }
-          else if( mdtDigitColl[ secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second == 0){
-	mdtDigitColl[ secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second = newDigit;
+          else if( mdtDigitColl[ m_secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second == 0){
+	mdtDigitColl[ m_secondaryHit_twin_chamber[multilayer-1][layer-1][twinPair-1] ].second = newDigit;
 	  }
           else{ ATH_MSG_VERBOSE(" TWIN TUBES: found a tertiary hit in a twin tube in one RdoCollection for "
 				<< m_mdtHelper->stationNameString(m_mdtHelper->stationName(channelId))
diff --git a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
index 2eb50d201ed..bfd793a2697 100644
--- a/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
+++ b/MuonSpectrometer/MuonCnv/MuonMDT_CnvTools/src/MdtRdoToPrepDataTool.h
@@ -154,8 +154,8 @@ namespace Muon
         bool   m_twinCorrectSlewing;
         bool   m_discardSecondaryHitTwin;
         //  const MdtCalibrationDbSvc* m_dbSvc;
-        int twin_chamber[2][3][36];
-        int secondaryHit_twin_chamber[2][3][36];
+        int m_twin_chamber[2][3][36];
+        int m_secondaryHit_twin_chamber[2][3][36];
         // - TWIN TUBE
     }; 
 } // end of namespace
-- 
GitLab