From edab4a3241c87da36a217b242bb1fd29994a23ac Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Tue, 17 May 2016 21:18:54 +0200 Subject: [PATCH] 'Coverity warnings 108540, 108529, 108552, 108544, 108524, 108522, 108521: uninitialized members. LArTools -> LArCabling.' (CaloJiveXML-00-01-56) * Tagging CaloJiveXML-00-01-56. * Coverity warnings 108540, 108529, 108552, 108544, 108524, 108522, 108521: uninitialized members. * LArTools -> LArCabling. Former-commit-id: 06a30c34623752eaa4af482e97eaf0e3c47c4afd --- Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt | 2 +- .../CaloJiveXML/CaloJiveXML/BadLArRetriever.h | 6 ++---- .../CaloJiveXML/CaloJiveXML/BadTileRetriever.h | 4 +--- .../CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h | 6 ++---- .../CaloJiveXML/CaloJiveXML/CaloHECRetriever.h | 5 ++--- .../CaloJiveXML/CaloJiveXML/CaloLArRetriever.h | 6 ++---- .../CaloJiveXML/CaloJiveXML/CaloMBTSRetriever.h | 3 --- .../CaloJiveXML/CaloJiveXML/CaloTileRetriever.h | 4 +--- .../CaloJiveXML/CaloJiveXML/LArDigitRetriever.h | 6 ++---- .../CaloCnv/CaloJiveXML/cmt/requirements | 2 +- .../CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx | 17 +++++++---------- .../CaloJiveXML/src/BadTileRetriever.cxx | 3 --- .../CaloJiveXML/src/CaloFCalRetriever.cxx | 17 +++++++---------- .../CaloJiveXML/src/CaloHECRetriever.cxx | 17 +++++++---------- .../CaloJiveXML/src/CaloLArRetriever.cxx | 17 +++++++---------- .../CaloJiveXML/src/CaloMBTSRetriever.cxx | 7 +++---- .../CaloJiveXML/src/CaloTileRetriever.cxx | 3 --- .../CaloJiveXML/src/LArDigitRetriever.cxx | 16 +++++++--------- 18 files changed, 52 insertions(+), 89 deletions(-) diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt b/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt index c4b52172d3a..9d62b72a25c 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt +++ b/Calorimeter/CaloCnv/CaloJiveXML/CMakeLists.txt @@ -10,7 +10,7 @@ atlas_depends_on_subdirs( PUBLIC Calorimeter/CaloIdentifier Control/AthenaBaseComps GaudiKernel - LArCalorimeter/LArTools + LArCalorimeter/LArCabling TileCalorimeter/TileConditions TileCalorimeter/TileEvent graphics/JiveXML diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h index 0c14ba7fd94..b06f9312673 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadLArRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -66,7 +66,7 @@ namespace JiveXML{ const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; - LArCablingService* m_larCablingSvc; + ToolHandle<LArCablingService> m_larCablingSvc; /// for properties std::string m_sgKey; @@ -75,8 +75,6 @@ namespace JiveXML{ bool m_lar; bool m_doBadLAr; bool m_cellConditionCut; - - IToolSvc* m_toolSvc; }; } #endif diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h index 6a60577e534..f3335a90ea2 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/BadTileRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -73,8 +73,6 @@ namespace JiveXML{ bool m_tile; bool m_doBadTile; - IToolSvc* m_toolSvc; - DataVect m_sub; }; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h index a4cd49bb0c4..bcda5f372ce 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloFCalRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -70,7 +70,7 @@ namespace JiveXML{ const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; - LArCablingService* m_larCablingSvc; + ToolHandle<LArCablingService> m_larCablingSvc; /// for properties std::string m_sgKey; @@ -83,8 +83,6 @@ namespace JiveXML{ std::vector<Identifier::value_type> m_LArChannelsToIgnoreM5; bool m_doMaskLArChannelsM5; bool m_doBadFCal; - - IToolSvc* m_toolSvc; }; } #endif diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h index 856fd0bc112..c7b053e31dc 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloHECRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -70,7 +70,7 @@ namespace JiveXML{ const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; - LArCablingService* m_larCablingSvc; + ToolHandle<LArCablingService> m_larCablingSvc; /// for properties std::string m_sgKey; @@ -83,7 +83,6 @@ namespace JiveXML{ std::vector<Identifier::value_type> m_LArChannelsToIgnoreM5; bool m_doMaskLArChannelsM5; bool m_doBadHEC; - IToolSvc* m_toolSvc; }; } #endif diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h index 8dffd555e68..21234abe3a6 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloLArRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -70,7 +70,7 @@ namespace JiveXML{ const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; - LArCablingService* m_larCablingSvc; + ToolHandle<LArCablingService> m_larCablingSvc; /// for properties std::string m_sgKey; @@ -83,8 +83,6 @@ namespace JiveXML{ std::vector<Identifier::value_type> m_LArChannelsToIgnoreM5; bool m_doMaskLArChannelsM5; bool m_doBadLAr; - - IToolSvc* m_toolSvc; }; } #endif diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloMBTSRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloMBTSRetriever.h index feeb071dd64..a25853b2c20 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloMBTSRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloMBTSRetriever.h @@ -68,9 +68,6 @@ namespace JiveXML{ double m_mbtsThreshold; bool m_mbts; bool m_mbtsdigit; - - IToolSvc* m_toolSvc; - //StoreGateSvc* m_detStore; }; } #endif diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h index 043af4f98cc..80700e8302c 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/CaloTileRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -78,8 +78,6 @@ namespace JiveXML{ bool m_doTileCellDetails; bool m_doBadTile; - IToolSvc* m_toolSvc; - DataVect m_sub; }; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h index 0684efaf7d7..227ca36c4fc 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h +++ b/Calorimeter/CaloCnv/CaloJiveXML/CaloJiveXML/LArDigitRetriever.h @@ -11,7 +11,7 @@ #include <map> #include "CaloIdentifier/CaloCell_ID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" #include "JiveXML/IDataRetriever.h" #include "AthenaBaseComps/AthAlgTool.h" @@ -75,7 +75,7 @@ namespace JiveXML{ std::string m_sgKey; std::string m_sgKeyLArDigit[2]; - LArCablingService* m_larCablingSvc; + ToolHandle<LArCablingService> m_larCablingSvc; const CaloIdManager* m_calo_id_man; const CaloCell_ID* m_calocell_id; @@ -96,8 +96,6 @@ namespace JiveXML{ std::vector<Identifier::value_type> m_LArChannelsToIgnoreM5; bool m_doMaskLArChannelsM5; - IToolSvc* m_toolSvc; - DataVect m_sub; }; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/cmt/requirements b/Calorimeter/CaloCnv/CaloJiveXML/cmt/requirements index 7ac2ded3abf..ba263fa18e1 100755 --- a/Calorimeter/CaloCnv/CaloJiveXML/cmt/requirements +++ b/Calorimeter/CaloCnv/CaloJiveXML/cmt/requirements @@ -27,7 +27,7 @@ use TileCalibBlobObjs TileCalibBlobObjs-* TileCalorimeter/TileCalib public use CaloIdentifier CaloIdentifier-* Calorimeter -use LArTools LArTools-* LArCalorimeter +use LArCabling LArCabling-* LArCalorimeter use TileEvent TileEvent-* TileCalorimeter use TileConditions TileConditions-* TileCalorimeter use GaudiInterface GaudiInterface-* External diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx index 17461e6d55a..17cd2f76f4a 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/BadLArRetriever.cxx @@ -18,7 +18,7 @@ #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "Identifier/HWIdentifier.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" using Athena::Units::GeV; @@ -32,7 +32,9 @@ namespace JiveXML { **/ BadLArRetriever::BadLArRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("BadLAr"){ + m_typeName("BadLAr"), + m_larCablingSvc("LArCablingService") + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -59,9 +61,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } @@ -115,11 +114,9 @@ namespace JiveXML { CaloCellContainer::const_iterator it1 = cellContainer->beginConstCalo(CaloCell_ID::LAREM); CaloCellContainer::const_iterator it2 = cellContainer->endConstCalo(CaloCell_ID::LAREM); - - StatusCode scTool=m_toolSvc->retrieveTool("LArCablingService", m_larCablingSvc); - if(scTool.isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endreq; - } + + if(m_larCablingSvc.retrieve().isFailure()) + ATH_MSG_ERROR ("Could not retrieve LArCablingService"); const LArOnlineID* onlineId; if ( detStore()->retrieve(onlineId, "LArOnlineID").isFailure()) { diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx index 727cddc4329..e8787f237d8 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/BadTileRetriever.cxx @@ -63,9 +63,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx index a166193813b..3fdba9ee45a 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloFCalRetriever.cxx @@ -18,7 +18,7 @@ #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "Identifier/HWIdentifier.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" using Athena::Units::GeV; @@ -32,7 +32,9 @@ namespace JiveXML { **/ CaloFCalRetriever::CaloFCalRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("FCAL"){ + m_typeName("FCAL"), + m_larCablingSvc("LArCablingService") + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -63,9 +65,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } @@ -130,10 +129,8 @@ namespace JiveXML { CaloCellContainer::const_iterator it2 = cellContainer->endConstCalo(CaloCell_ID::LARFCAL); - StatusCode scTool=m_toolSvc->retrieveTool("LArCablingService", m_larCablingSvc); - if(scTool.isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endreq; - } + if(m_larCablingSvc.retrieve().isFailure()) + ATH_MSG_ERROR ("Could not retrieve LArCablingService"); const ILArPedestal* larPedestal = nullptr; if(m_doFCalCellDetails){ @@ -150,7 +147,7 @@ namespace JiveXML { IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doFCalCellDetails){ - if( m_toolSvc->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ + if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getFCalData(), Could not retrieve LAr ADC2MeV Tool" <<endreq; } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx index cd95721556b..971970f85b0 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloHECRetriever.cxx @@ -18,7 +18,7 @@ #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "Identifier/HWIdentifier.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" using Athena::Units::GeV; @@ -32,7 +32,9 @@ namespace JiveXML { **/ CaloHECRetriever::CaloHECRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("HEC"){ + m_typeName("HEC"), + m_larCablingSvc("LArCablingService") + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -63,9 +65,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } @@ -126,10 +125,8 @@ namespace JiveXML { CaloCellContainer::const_iterator it2 = cellContainer->endConstCalo(CaloCell_ID::LARHEC); - StatusCode scTool=m_toolSvc->retrieveTool("LArCablingService", m_larCablingSvc); - if(scTool.isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endreq; - } + if(m_larCablingSvc.retrieve().isFailure()) + ATH_MSG_ERROR ("Could not retrieve LArCablingService"); const ILArPedestal* larPedestal = nullptr; if(m_doHECCellDetails){ @@ -146,7 +143,7 @@ namespace JiveXML { IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doHECCellDetails){ - if( m_toolSvc->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ + if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getHECData(), Could not retrieve LAr ADC2MeV Tool" <<endreq; } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx index 5c5a5ec3499..880213ae743 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloLArRetriever.cxx @@ -18,7 +18,7 @@ #include "LArRawEvent/LArRawChannel.h" #include "LArRawEvent/LArRawChannelContainer.h" #include "Identifier/HWIdentifier.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" using Athena::Units::GeV; @@ -32,7 +32,9 @@ namespace JiveXML { **/ CaloLArRetriever::CaloLArRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("LAr"){ + m_typeName("LAr"), + m_larCablingSvc("LArCablingService") + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -63,9 +65,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } @@ -126,10 +125,8 @@ namespace JiveXML { CaloCellContainer::const_iterator it2 = cellContainer->endConstCalo(CaloCell_ID::LAREM); - StatusCode scTool=m_toolSvc->retrieveTool("LArCablingService", m_larCablingSvc); - if(scTool.isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endreq; - } + if(m_larCablingSvc.retrieve().isFailure()) + ATH_MSG_ERROR ("Could not retrieve LArCablingService"); const ILArPedestal* larPedestal = nullptr; if(m_doLArCellDetails){ @@ -146,7 +143,7 @@ namespace JiveXML { IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; if(m_doLArCellDetails){ - if( m_toolSvc->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ + if( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArData(), Could not retrieve LAr ADC2MeV Tool" <<endreq; } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx index e23f1792a4e..0c2ed6d604b 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloMBTSRetriever.cxx @@ -35,7 +35,9 @@ namespace JiveXML { **/ CaloMBTSRetriever::CaloMBTSRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("MBTS") { + m_typeName("MBTS"), + m_tileTBID(nullptr) + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -56,9 +58,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx index 5b76765b5b6..9c5aa51f54b 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/CaloTileRetriever.cxx @@ -65,9 +65,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } diff --git a/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx b/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx index 61b7ec5c186..d1166a60c04 100644 --- a/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx +++ b/Calorimeter/CaloCnv/CaloJiveXML/src/LArDigitRetriever.cxx @@ -19,7 +19,7 @@ #include "LArRawEvent/LArRawChannelContainer.h" #include "Identifier/HWIdentifier.h" #include "CaloIdentifier/TileID.h" -#include "LArTools/LArCablingService.h" +#include "LArCabling/LArCablingService.h" using CLHEP::GeV; @@ -33,7 +33,9 @@ namespace JiveXML { **/ LArDigitRetriever::LArDigitRetriever(const std::string& type,const std::string& name,const IInterface* parent): AthAlgTool(type,name,parent), - m_typeName("LArDigit"){ + m_typeName("LArDigit"), + m_larCablingSvc("LArCablingService") + { //Only declare the interface declareInterface<IDataRetriever>(this); @@ -72,9 +74,6 @@ namespace JiveXML { if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "Initialising Tool" << endreq; - if ( !service("ToolSvc", m_toolSvc) ) - return StatusCode::FAILURE; - return StatusCode::SUCCESS; } @@ -187,9 +186,8 @@ namespace JiveXML { //--- initialize the LArCablingService tool, which can be //--- used to convert between online and hardware ID-- - if (m_toolSvc->retrieveTool("LArCablingService", m_larCablingSvc).isFailure()){ - if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "Could not retrieve LArCablingService" << endreq; - } + if(m_larCablingSvc.retrieve().isFailure()) + ATH_MSG_ERROR ("Could not retrieve LArCablingService"); const ILArPedestal* larPedestal; if ( detStore()->retrieve(larPedestal).isFailure()){ @@ -204,7 +202,7 @@ namespace JiveXML { IAlgTool* algtool; ILArADC2MeVTool* adc2mevTool=0; - if ( m_toolSvc->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ + if ( toolSvc()->retrieveTool("LArADC2MeVTool", algtool).isFailure()){ if (msgLvl(MSG::ERROR)) msg(MSG::ERROR) << "in getLArDigitData(), Could not retrieve LAr ADC2MeV Tool" <<endreq; } else { adc2mevTool=dynamic_cast<ILArADC2MeVTool*>(algtool); -- GitLab