diff --git a/Commission/CommissionRec/src/ComTimeRec.cxx b/Commission/CommissionRec/src/ComTimeRec.cxx index 9b6bc26c17dbe67fcc886e778ff4b087c9f55d47..b784314bdb66f865b06325b10d61ddb708404d10 100755 --- a/Commission/CommissionRec/src/ComTimeRec.cxx +++ b/Commission/CommissionRec/src/ComTimeRec.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #include "ComTimeRec.h" @@ -46,11 +46,9 @@ StatusCode ComTimeRec::initialize() // the timing tool, does not provide the method that is needed here (which is bad design). // The right thing to do is to fix the interface, at which point this is a simple retrieve. // Until then, we are stuck with the old way. - IToolSvc *toolSvc(0); - CHECK( service( "ToolSvc",toolSvc ) ); IAlgTool *trigTool(0); - CHECK( toolSvc->retrieveTool("CosmicTriggerTimeTool",trigTool) ); + CHECK( toolSvc()->retrieveTool("CosmicTriggerTimeTool",trigTool) ); m_triggerTimeTool = dynamic_cast<CosmicTriggerTimeTool*>(trigTool); if(0==m_triggerTimeTool){ @@ -206,14 +204,3 @@ StatusCode ComTimeRec::execute() return StatusCode::SUCCESS; } -//---------------------------------------------------------------- - -StatusCode ComTimeRec::finalize() { - - ATH_MSG_INFO( "In finalize()" ); - - return StatusCode::SUCCESS; - -} - -//---------------------------------------------------------------- diff --git a/Commission/CommissionRec/src/ComTimeRec.h b/Commission/CommissionRec/src/ComTimeRec.h index c096a96f0c971740b72249c7dca6e0120a3841a0..c5122aea56b1e2a884ca04017fcbe192e4b80d8d 100755 --- a/Commission/CommissionRec/src/ComTimeRec.h +++ b/Commission/CommissionRec/src/ComTimeRec.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration */ #ifndef COMMISSIONREC_COMTIMEREC @@ -17,9 +17,8 @@ public: ComTimeRec(const std::string& name, ISvcLocator* pSvcLocator); ~ComTimeRec(); - StatusCode initialize(); - StatusCode execute(); - StatusCode finalize(); + virtual StatusCode initialize() override; + virtual StatusCode execute() override; private: diff --git a/Commission/CommissionRec/src/CosmicTriggerTimeTool.cxx b/Commission/CommissionRec/src/CosmicTriggerTimeTool.cxx index a9dc3e0984ae9bdfda2c8397daf903e02c9eaa36..34091241f2f61ed277b0a5ed8e59df9aeeeb7469 100644 --- a/Commission/CommissionRec/src/CosmicTriggerTimeTool.cxx +++ b/Commission/CommissionRec/src/CosmicTriggerTimeTool.cxx @@ -20,7 +20,6 @@ CosmicTriggerTimeTool::CosmicTriggerTimeTool(const std::string& type, m_comTime(0) , m_useLArTime(false) { - declareInterface<ITriggerTime>(this); declareProperty("UseLArTime", m_useLArTime); } @@ -29,8 +28,8 @@ CosmicTriggerTimeTool::CosmicTriggerTimeTool(const std::string& type, StatusCode CosmicTriggerTimeTool::initialize() { - IIncidentSvc* incsvc; - CHECK( service("IncidentSvc",incsvc) ); + ServiceHandle<IIncidentSvc> incsvc("IncidentSvc", name()); + CHECK( incsvc.retrieve() ); long int pri=100; incsvc->addListener(this,"BeginEvent",pri); diff --git a/Commission/CommissionRec/src/CosmicTriggerTimeTool.h b/Commission/CommissionRec/src/CosmicTriggerTimeTool.h index edb240ea6d8670b16e05ff933ea1fd0578ffc316..dc84c4ff2e930637ed8d10d64f2e661f406bed8c 100644 --- a/Commission/CommissionRec/src/CosmicTriggerTimeTool.h +++ b/Commission/CommissionRec/src/CosmicTriggerTimeTool.h @@ -9,7 +9,7 @@ #include "GaudiKernel/IIncidentListener.h" #include "AthenaBaseComps/AthAlgTool.h" -class ComTime ; +class ComTime; class CosmicTriggerTimeTool : public extends<AthAlgTool, ITriggerTime, IIncidentListener> { @@ -20,14 +20,14 @@ public: const IInterface* parent); - virtual StatusCode initialize() ; + virtual StatusCode initialize() override; virtual ~CosmicTriggerTimeTool() {} /// returns the time offset of the current trigger - virtual double time() ; + virtual double time() override; - virtual void handle(const Incident& incident); + virtual void handle(const Incident& incident) override; double larTime(); double trackRecordTime() ;