From 47c83901544ed7d0af0f23ed4973a89196d30279 Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Tue, 30 Jul 2024 16:01:54 +0200 Subject: [PATCH] Do not use GaudiAlg (#38) * Do not use GaudiAlg, use Gaudi::Algorithm instead These are the initial changes that are necessary to get rid of GaudiAlg. * Don't link to GaudiAlgLib, add a few mutables * Fix typo * Remove unrelated formatting changes --------- Co-authored-by: jmcarcell --- DRdigi/CMakeLists.txt | 1 - DRdigi/include/DigiSiPM.h | 14 ++++++------- DRdigi/src/DigiSiPM.cpp | 8 ++++---- DRreco/CMakeLists.txt | 1 - DRreco/include/DRcalib2D.h | 14 ++++++------- DRreco/include/DRcalib3D.h | 20 +++++++++---------- DRreco/src/DRcalib2D.cpp | 10 +++++----- DRreco/src/DRcalib3D.cpp | 10 +++++----- DRsim/DRsimG4Components/CMakeLists.txt | 1 - .../include/SimG4SaveDRcaloHits.h | 10 +++++----- .../include/SimG4SaveDRcaloMCTruth.h | 10 +++++----- .../src/SimG4SaveDRcaloHits.cpp | 6 +++--- .../src/SimG4SaveDRcaloMCTruth.cpp | 6 +++--- DRsim/DRsimG4Fast/CMakeLists.txt | 1 - .../include/SimG4FastSimOpFiberRegion.h | 4 ++-- .../src/SimG4FastSimOpFiberRegion.cpp | 6 +++--- 16 files changed, 59 insertions(+), 63 deletions(-) diff --git a/DRdigi/CMakeLists.txt b/DRdigi/CMakeLists.txt index 8ddde2b..bcda8b1 100644 --- a/DRdigi/CMakeLists.txt +++ b/DRdigi/CMakeLists.txt @@ -13,7 +13,6 @@ gaudi_add_module(DRdigi LINK EDM4HEP::edm4hep sipm::sipm - Gaudi::GaudiAlgLib Gaudi::GaudiKernel k4FWCore::k4FWCore ) diff --git a/DRdigi/include/DigiSiPM.h b/DRdigi/include/DigiSiPM.h index c03792d..e6b434e 100644 --- a/DRdigi/include/DigiSiPM.h +++ b/DRdigi/include/DigiSiPM.h @@ -9,26 +9,26 @@ #include "k4FWCore/DataHandle.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/ToolHandle.h" #include "SiPMSensor.h" -class DigiSiPM : public GaudiAlgorithm { +class DigiSiPM : public Gaudi::Algorithm { public: DigiSiPM(const std::string& name, ISvcLocator* svcLoc); virtual ~DigiSiPM() {}; StatusCode initialize(); - StatusCode execute(); + StatusCode execute(const EventContext&) const; StatusCode finalize(); private: - DataHandle m_rawHits{"RawCalorimeterHits", Gaudi::DataHandle::Reader, this}; - DataHandle m_timeStruct{"RawTimeStructs", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_rawHits{"RawCalorimeterHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_timeStruct{"RawTimeStructs", Gaudi::DataHandle::Reader, this}; - DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Writer, this}; - DataHandle m_waveforms{"DigiWaveforms", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_waveforms{"DigiWaveforms", Gaudi::DataHandle::Writer, this}; std::unique_ptr m_sensor; diff --git a/DRdigi/src/DigiSiPM.cpp b/DRdigi/src/DigiSiPM.cpp index e8967a9..6ff298e 100644 --- a/DRdigi/src/DigiSiPM.cpp +++ b/DRdigi/src/DigiSiPM.cpp @@ -5,10 +5,10 @@ DECLARE_COMPONENT(DigiSiPM) -DigiSiPM::DigiSiPM(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc) {} +DigiSiPM::DigiSiPM(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc) {} StatusCode DigiSiPM::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Gaudi::Algorithm::initialize(); if (sc.isFailure()) return sc; @@ -32,7 +32,7 @@ StatusCode DigiSiPM::initialize() { return StatusCode::SUCCESS; } -StatusCode DigiSiPM::execute() { +StatusCode DigiSiPM::execute(const EventContext&) const { const edm4hep::RawTimeSeriesCollection* timeStructs = m_timeStruct.get(); const edm4hep::RawCalorimeterHitCollection* rawHits = m_rawHits.get(); @@ -104,5 +104,5 @@ StatusCode DigiSiPM::execute() { } StatusCode DigiSiPM::finalize() { - return GaudiAlgorithm::finalize(); + return Gaudi::Algorithm::finalize(); } diff --git a/DRreco/CMakeLists.txt b/DRreco/CMakeLists.txt index 5308f43..aa2326a 100644 --- a/DRreco/CMakeLists.txt +++ b/DRreco/CMakeLists.txt @@ -15,7 +15,6 @@ gaudi_add_module(DRreco LINK EDM4HEP::edm4hep DRsegmentation - Gaudi::GaudiAlgLib Gaudi::GaudiKernel k4FWCore::k4FWCore CLHEP::CLHEP diff --git a/DRreco/include/DRcalib2D.h b/DRreco/include/DRcalib2D.h index 4cff5cc..fee46c2 100644 --- a/DRreco/include/DRcalib2D.h +++ b/DRreco/include/DRcalib2D.h @@ -3,7 +3,7 @@ #include "k4FWCore/DataHandle.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/ToolHandle.h" #include "edm4hep/CalorimeterHitCollection.h" @@ -13,26 +13,26 @@ class IGeoSvc; -class DRcalib2D : public GaudiAlgorithm { +class DRcalib2D : public Gaudi::Algorithm { public: DRcalib2D(const std::string& name, ISvcLocator* svcLoc); virtual ~DRcalib2D() {}; StatusCode initialize(); - StatusCode execute(); + StatusCode execute(const EventContext&) const; StatusCode finalize(); void readCSV(std::string filename); private: - edm4hep::Vector3f getPosition(dd4hep::DDSegmentation::CellID& cID); + edm4hep::Vector3f getPosition(dd4hep::DDSegmentation::CellID& cID) const; ServiceHandle m_geoSvc; dd4hep::DDSegmentation::GridDRcalo* pSeg; - dd4hep::DDSegmentation::DRparamBase* pParamBase; + mutable dd4hep::DDSegmentation::DRparamBase* pParamBase; - DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Reader, this}; - DataHandle m_caloHits{"DRcalo2dHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_caloHits{"DRcalo2dHits", Gaudi::DataHandle::Writer, this}; Gaudi::Property m_calibPath{this, "calibPath", "share/calib.csv", "relative path to calibration csv file"}; Gaudi::Property m_readoutName{this, "readoutName", "DRcaloSiPMreadout", "readout name of DRcalo"}; diff --git a/DRreco/include/DRcalib3D.h b/DRreco/include/DRcalib3D.h index 62ec707..79ade02 100644 --- a/DRreco/include/DRcalib3D.h +++ b/DRreco/include/DRcalib3D.h @@ -3,7 +3,7 @@ #include "k4FWCore/DataHandle.h" -#include "GaudiAlg/GaudiAlgorithm.h" +#include "Gaudi/Algorithm.h" #include "GaudiKernel/ToolHandle.h" #include "edm4hep/CalorimeterHitCollection.h" @@ -15,29 +15,29 @@ class TH1D; class IGeoSvc; -class DRcalib3D : public GaudiAlgorithm { +class DRcalib3D : public Gaudi::Algorithm { public: DRcalib3D(const std::string& name, ISvcLocator* svcLoc); virtual ~DRcalib3D() {}; StatusCode initialize(); - StatusCode execute(); + StatusCode execute(const EventContext&) const; StatusCode finalize(); - TH1* processFFT(TH1* waveHist); + TH1* processFFT(TH1* waveHist) const; private: ServiceHandle m_geoSvc; dd4hep::DDSegmentation::GridDRcalo* pSeg; - dd4hep::DDSegmentation::DRparamBase* pParamBase; + mutable dd4hep::DDSegmentation::DRparamBase* pParamBase; std::unique_ptr m_veloC; std::unique_ptr m_veloS; - DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Reader, this}; - DataHandle m_waveforms{"DigiWaveforms", Gaudi::DataHandle::Reader, this}; - DataHandle m_2dHits{"DRcalo2dHits", Gaudi::DataHandle::Reader, this}; - DataHandle m_caloHits{"DRcalo3dHits", Gaudi::DataHandle::Writer, this}; - DataHandle m_postprocTime{"DRpostprocTime", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_digiHits{"DigiCalorimeterHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_waveforms{"DigiWaveforms", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_2dHits{"DRcalo2dHits", Gaudi::DataHandle::Reader, this}; + mutable DataHandle m_caloHits{"DRcalo3dHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_postprocTime{"DRpostprocTime", Gaudi::DataHandle::Writer, this}; Gaudi::Property m_readoutName{this, "readoutName", "DRcaloSiPMreadout", "readout name of DRcalo"}; Gaudi::Property m_veloFile{this, "veloFile", "share/velo.root", "velocity profile file name"}; diff --git a/DRreco/src/DRcalib2D.cpp b/DRreco/src/DRcalib2D.cpp index b3690e1..e6e0eb6 100644 --- a/DRreco/src/DRcalib2D.cpp +++ b/DRreco/src/DRcalib2D.cpp @@ -9,7 +9,7 @@ DECLARE_COMPONENT(DRcalib2D) -DRcalib2D::DRcalib2D(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", aName) { +DRcalib2D::DRcalib2D(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", aName) { declareProperty("GeoSvc", m_geoSvc); pSeg = nullptr; @@ -17,7 +17,7 @@ DRcalib2D::DRcalib2D(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgo } StatusCode DRcalib2D::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Gaudi::Algorithm::initialize(); if (sc.isFailure()) return sc; @@ -40,7 +40,7 @@ StatusCode DRcalib2D::initialize() { return StatusCode::SUCCESS; } -StatusCode DRcalib2D::execute() { +StatusCode DRcalib2D::execute(const EventContext&) const { const edm4hep::CalorimeterHitCollection* digiHits = m_digiHits.get(); edm4hep::CalorimeterHitCollection* caloHits = m_caloHits.createAndPut(); @@ -70,10 +70,10 @@ StatusCode DRcalib2D::execute() { StatusCode DRcalib2D::finalize() { m_calibs.clear(); - return GaudiAlgorithm::finalize(); + return Gaudi::Algorithm::finalize(); } -edm4hep::Vector3f DRcalib2D::getPosition(dd4hep::DDSegmentation::CellID& cID) { +edm4hep::Vector3f DRcalib2D::getPosition(dd4hep::DDSegmentation::CellID& cID) const { auto globalPos = pSeg->position( cID ); return { static_cast( globalPos.x() * CLHEP::millimeter/dd4hep::millimeter ), static_cast( globalPos.y() * CLHEP::millimeter/dd4hep::millimeter ), diff --git a/DRreco/src/DRcalib3D.cpp b/DRreco/src/DRcalib3D.cpp index c98808f..5a8da61 100644 --- a/DRreco/src/DRcalib3D.cpp +++ b/DRreco/src/DRcalib3D.cpp @@ -13,7 +13,7 @@ DECLARE_COMPONENT(DRcalib3D) -DRcalib3D::DRcalib3D(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", aName) { +DRcalib3D::DRcalib3D(const std::string& aName, ISvcLocator* aSvcLoc) : Gaudi::Algorithm(aName, aSvcLoc), m_geoSvc("GeoSvc", aName) { declareProperty("GeoSvc", m_geoSvc); pSeg = nullptr; @@ -21,7 +21,7 @@ DRcalib3D::DRcalib3D(const std::string& aName, ISvcLocator* aSvcLoc) : GaudiAlgo } StatusCode DRcalib3D::initialize() { - StatusCode sc = GaudiAlgorithm::initialize(); + StatusCode sc = Gaudi::Algorithm::initialize(); if (sc.isFailure()) return sc; @@ -44,7 +44,7 @@ StatusCode DRcalib3D::initialize() { return StatusCode::SUCCESS; } -StatusCode DRcalib3D::execute() { +StatusCode DRcalib3D::execute(const EventContext&) const { const edm4hep::CalorimeterHitCollection* digiHits = m_digiHits.get(); const edm4hep::CalorimeterHitCollection* hits2d = m_2dHits.get(); const edm4hep::TimeSeriesCollection* waveforms = m_waveforms.get(); @@ -162,9 +162,9 @@ StatusCode DRcalib3D::execute() { return StatusCode::SUCCESS; } -StatusCode DRcalib3D::finalize() { return GaudiAlgorithm::finalize(); } +StatusCode DRcalib3D::finalize() { return Gaudi::Algorithm::finalize(); } -TH1* DRcalib3D::processFFT(TH1* waveHist) { +TH1* DRcalib3D::processFFT(TH1* waveHist) const { int firstBin = waveHist->FindFirstBinAbove( m_zero.value()*waveHist->GetMaximum() ); int lastBin = firstBin; diff --git a/DRsim/DRsimG4Components/CMakeLists.txt b/DRsim/DRsimG4Components/CMakeLists.txt index fe0f984..b2c26c7 100644 --- a/DRsim/DRsimG4Components/CMakeLists.txt +++ b/DRsim/DRsimG4Components/CMakeLists.txt @@ -11,7 +11,6 @@ file(GLOB headers gaudi_add_module(DRsimG4Components SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel k4FWCore::k4FWCore EDM4HEP::edm4hep diff --git a/DRsim/DRsimG4Components/include/SimG4SaveDRcaloHits.h b/DRsim/DRsimG4Components/include/SimG4SaveDRcaloHits.h index 05b13f8..ca7be81 100644 --- a/DRsim/DRsimG4Components/include/SimG4SaveDRcaloHits.h +++ b/DRsim/DRsimG4Components/include/SimG4SaveDRcaloHits.h @@ -7,14 +7,14 @@ #include "edm4hep/RawCalorimeterHitCollection.h" #include "edm4hep/RawTimeSeriesCollection.h" -#include "GaudiAlg/GaudiTool.h" +#include "GaudiKernel/AlgTool.h" #include "k4FWCore/DataHandle.h" #include "k4Interface/ISimG4SaveOutputTool.h" #include "k4Interface/IGeoSvc.h" class IGeoSvc; -class SimG4SaveDRcaloHits : public GaudiTool, virtual public ISimG4SaveOutputTool { +class SimG4SaveDRcaloHits : public AlgTool, virtual public ISimG4SaveOutputTool { public: explicit SimG4SaveDRcaloHits(const std::string& aType, const std::string& aName, const IInterface* aParent); virtual ~SimG4SaveDRcaloHits(); @@ -30,9 +30,9 @@ class SimG4SaveDRcaloHits : public GaudiTool, virtual public ISimG4SaveOutputToo Gaudi::Property> m_readoutNames{this, "readoutNames", {"DRcaloSiPMreadout"}, "Name of the readouts (hits collections) to save"}; - DataHandle mRawCaloHits{"RawCalorimeterHits", Gaudi::DataHandle::Writer, this}; - DataHandle mTimeStruct{"RawTimeStructs", Gaudi::DataHandle::Writer, this}; - DataHandle mWavlenStruct{"RawWavlenStructs", Gaudi::DataHandle::Writer, this}; + mutable DataHandle mRawCaloHits{"RawCalorimeterHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle mTimeStruct{"RawTimeStructs", Gaudi::DataHandle::Writer, this}; + mutable DataHandle mWavlenStruct{"RawWavlenStructs", Gaudi::DataHandle::Writer, this}; }; #endif diff --git a/DRsim/DRsimG4Components/include/SimG4SaveDRcaloMCTruth.h b/DRsim/DRsimG4Components/include/SimG4SaveDRcaloMCTruth.h index f637dfe..eeb706a 100644 --- a/DRsim/DRsimG4Components/include/SimG4SaveDRcaloMCTruth.h +++ b/DRsim/DRsimG4Components/include/SimG4SaveDRcaloMCTruth.h @@ -5,7 +5,7 @@ #include "edm4hep/MCParticleCollection.h" #include "edm4hep/SimCalorimeterHitCollection.h" -#include "GaudiAlg/GaudiTool.h" +#include "GaudiKernel/AlgTool.h" #include "k4FWCore/DataHandle.h" #include "k4Interface/ISimG4Svc.h" #include "k4Interface/ISimG4SaveOutputTool.h" @@ -14,7 +14,7 @@ class IGeoSvc; -class SimG4SaveDRcaloMCTruth : public GaudiTool, virtual public ISimG4SaveOutputTool { +class SimG4SaveDRcaloMCTruth : public AlgTool, virtual public ISimG4SaveOutputTool { public: explicit SimG4SaveDRcaloMCTruth(const std::string& aType, const std::string& aName, const IInterface* aParent); virtual ~SimG4SaveDRcaloMCTruth(); @@ -25,9 +25,9 @@ class SimG4SaveDRcaloMCTruth : public GaudiTool, virtual public ISimG4SaveOutput virtual StatusCode saveOutput(const G4Event& aEvent) final; private: - DataHandle m_Edeps{"SimCalorimeterHits", Gaudi::DataHandle::Writer, this}; - DataHandle m_Edeps3d{"Sim3dCalorimeterHits", Gaudi::DataHandle::Writer, this}; - DataHandle m_Leakages{"Leakages", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_Edeps{"SimCalorimeterHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_Edeps3d{"Sim3dCalorimeterHits", Gaudi::DataHandle::Writer, this}; + mutable DataHandle m_Leakages{"Leakages", Gaudi::DataHandle::Writer, this}; drc::SimG4DRcaloEventAction* m_eventAction; diff --git a/DRsim/DRsimG4Components/src/SimG4SaveDRcaloHits.cpp b/DRsim/DRsimG4Components/src/SimG4SaveDRcaloHits.cpp index 7995f04..1a58dbc 100644 --- a/DRsim/DRsimG4Components/src/SimG4SaveDRcaloHits.cpp +++ b/DRsim/DRsimG4Components/src/SimG4SaveDRcaloHits.cpp @@ -9,14 +9,14 @@ DECLARE_COMPONENT(SimG4SaveDRcaloHits) SimG4SaveDRcaloHits::SimG4SaveDRcaloHits(const std::string& aType, const std::string& aName, const IInterface* aParent) -: GaudiTool(aType, aName, aParent), m_geoSvc("GeoSvc", aName) { +: AlgTool(aType, aName, aParent), m_geoSvc("GeoSvc", aName) { declareInterface(this); } SimG4SaveDRcaloHits::~SimG4SaveDRcaloHits() {} StatusCode SimG4SaveDRcaloHits::initialize() { - if (GaudiTool::initialize().isFailure()) + if (AlgTool::initialize().isFailure()) return StatusCode::FAILURE; if (!m_geoSvc) { @@ -39,7 +39,7 @@ StatusCode SimG4SaveDRcaloHits::initialize() { return StatusCode::SUCCESS; } -StatusCode SimG4SaveDRcaloHits::finalize() { return GaudiTool::finalize(); } +StatusCode SimG4SaveDRcaloHits::finalize() { return AlgTool::finalize(); } StatusCode SimG4SaveDRcaloHits::saveOutput(const G4Event& aEvent) { G4HCofThisEvent* collections = aEvent.GetHCofThisEvent(); diff --git a/DRsim/DRsimG4Components/src/SimG4SaveDRcaloMCTruth.cpp b/DRsim/DRsimG4Components/src/SimG4SaveDRcaloMCTruth.cpp index d010f32..8292c73 100644 --- a/DRsim/DRsimG4Components/src/SimG4SaveDRcaloMCTruth.cpp +++ b/DRsim/DRsimG4Components/src/SimG4SaveDRcaloMCTruth.cpp @@ -5,14 +5,14 @@ DECLARE_COMPONENT(SimG4SaveDRcaloMCTruth) SimG4SaveDRcaloMCTruth::SimG4SaveDRcaloMCTruth(const std::string& aType, const std::string& aName, const IInterface* aParent) -: GaudiTool(aType, aName, aParent), m_geantSvc("SimG4Svc", aName) { +: AlgTool(aType, aName, aParent), m_geantSvc("SimG4Svc", aName) { declareInterface(this); } SimG4SaveDRcaloMCTruth::~SimG4SaveDRcaloMCTruth() {} StatusCode SimG4SaveDRcaloMCTruth::initialize() { - if (GaudiTool::initialize().isFailure()) + if (AlgTool::initialize().isFailure()) return StatusCode::FAILURE; if (!m_geantSvc) { @@ -33,7 +33,7 @@ StatusCode SimG4SaveDRcaloMCTruth::initialize() { return StatusCode::SUCCESS; } -StatusCode SimG4SaveDRcaloMCTruth::finalize() { return GaudiTool::finalize(); } +StatusCode SimG4SaveDRcaloMCTruth::finalize() { return AlgTool::finalize(); } StatusCode SimG4SaveDRcaloMCTruth::saveOutput(const G4Event&) { auto* edeps = m_eventAction->getEdepsCollection(); diff --git a/DRsim/DRsimG4Fast/CMakeLists.txt b/DRsim/DRsimG4Fast/CMakeLists.txt index 6fd5efd..b80ffc1 100644 --- a/DRsim/DRsimG4Fast/CMakeLists.txt +++ b/DRsim/DRsimG4Fast/CMakeLists.txt @@ -11,7 +11,6 @@ file(GLOB headers gaudi_add_module(DRsimG4Fast SOURCES ${sources} LINK - Gaudi::GaudiAlgLib Gaudi::GaudiKernel k4FWCore::k4FWCore ${Geant4_LIBRARIES} diff --git a/DRsim/DRsimG4Fast/include/SimG4FastSimOpFiberRegion.h b/DRsim/DRsimG4Fast/include/SimG4FastSimOpFiberRegion.h index 1640e5c..d2fa167 100644 --- a/DRsim/DRsimG4Fast/include/SimG4FastSimOpFiberRegion.h +++ b/DRsim/DRsimG4Fast/include/SimG4FastSimOpFiberRegion.h @@ -9,7 +9,7 @@ #include "G4LogicalVolume.hh" -#include "GaudiAlg/GaudiTool.h" +#include "GaudiKernel/AlgTool.h" #include "GaudiKernel/ToolHandle.h" #include "k4Interface/ISimG4RegionTool.h" @@ -17,7 +17,7 @@ class G4VFastSimulationModel; class G4Region; -class SimG4FastSimOpFiberRegion : public GaudiTool, virtual public ISimG4RegionTool { +class SimG4FastSimOpFiberRegion : public AlgTool, virtual public ISimG4RegionTool { public: explicit SimG4FastSimOpFiberRegion(const std::string& type, const std::string& name, const IInterface* parent); virtual ~SimG4FastSimOpFiberRegion(); diff --git a/DRsim/DRsimG4Fast/src/SimG4FastSimOpFiberRegion.cpp b/DRsim/DRsimG4Fast/src/SimG4FastSimOpFiberRegion.cpp index 4043e80..f6dcc4e 100644 --- a/DRsim/DRsimG4Fast/src/SimG4FastSimOpFiberRegion.cpp +++ b/DRsim/DRsimG4Fast/src/SimG4FastSimOpFiberRegion.cpp @@ -8,20 +8,20 @@ DECLARE_COMPONENT(SimG4FastSimOpFiberRegion) SimG4FastSimOpFiberRegion::SimG4FastSimOpFiberRegion(const std::string& type, const std::string& name, const IInterface* parent) -: GaudiTool(type, name, parent) { +: AlgTool(type, name, parent) { declareInterface(this); } SimG4FastSimOpFiberRegion::~SimG4FastSimOpFiberRegion() {} StatusCode SimG4FastSimOpFiberRegion::initialize() { - if (GaudiTool::initialize().isFailure()) + if (AlgTool::initialize().isFailure()) return StatusCode::FAILURE; return StatusCode::SUCCESS; } -StatusCode SimG4FastSimOpFiberRegion::finalize() { return GaudiTool::finalize(); } +StatusCode SimG4FastSimOpFiberRegion::finalize() { return AlgTool::finalize(); } StatusCode SimG4FastSimOpFiberRegion::create() { auto* regionStore = G4RegionStore::GetInstance();