From 2dbf5f0b67c9879032627c14762f760466ede43a Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Mon, 18 Jul 2022 21:36:40 +0200 Subject: [PATCH] Fix compilation errors --- DDG4/include/DDG4/Geant4FastSimShowerModel.h | 4 ++-- DDG4/src/Geant4FastSimShowerModel.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DDG4/include/DDG4/Geant4FastSimShowerModel.h b/DDG4/include/DDG4/Geant4FastSimShowerModel.h index 2089b4fad..e8677389e 100644 --- a/DDG4/include/DDG4/Geant4FastSimShowerModel.h +++ b/DDG4/include/DDG4/Geant4FastSimShowerModel.h @@ -52,7 +52,7 @@ namespace dd4hep { // typedef std::vector<std::pair<std::string, double> > ParticleConfig; typedef std::map<const G4ParticleDefinition*, double> ParticleCut; typedef std::map<std::string, std::string> ParticleConfig; - typedef std::unique_ptr<Geant4ShowerModelWrapper> Wrapper; + typedef Geant4ShowerModelWrapper* Wrapper; /// Property: Region name to which this parametrization should be applied std::string m_regionName { "Region-name-not-specified"}; @@ -78,7 +78,7 @@ namespace dd4hep { /// Reference to the G4 fast simulation model G4VFastSimulationModel* m_model { nullptr }; /// Reference to the shower model - Wrapper m_wrapper { }; + Wrapper m_wrapper { nullptr }; protected: /// Define standard assignments and constructors diff --git a/DDG4/src/Geant4FastSimShowerModel.cpp b/DDG4/src/Geant4FastSimShowerModel.cpp index 9aa4edf3e..ee9d54d8b 100644 --- a/DDG4/src/Geant4FastSimShowerModel.cpp +++ b/DDG4/src/Geant4FastSimShowerModel.cpp @@ -99,13 +99,13 @@ Geant4FastSimShowerModel::Geant4FastSimShowerModel(Geant4Context* ctxt, const st this->declareProperty("Emax", this->m_eMax); this->declareProperty("Ekill", this->m_eKill); this->declareProperty("Etrigger", this->m_eTriggerNames); - this->m_wrapper.reset(new Geant4ShowerModelWrapper(this)); + this->m_wrapper= new Geant4ShowerModelWrapper(this); } /// Default destructor Geant4FastSimShowerModel::~Geant4FastSimShowerModel() { detail::deletePtr(m_model); - m_wrapper.reset(); + detail::deletePtr(m_wrapper); } /// Access particle definition from string @@ -163,7 +163,7 @@ void Geant4FastSimShowerModel::addShowerModel(G4Region* region) { if ( m_model ) fastsimManager->AddFastSimulationModel(m_model); else if ( m_wrapper ) - fastsimManager->AddFastSimulationModel(m_wrapper.get()); + fastsimManager->AddFastSimulationModel(m_wrapper); else except("Geant4FastSimShowerModel::addShowerModel: Invalid shower model reference!"); } -- GitLab