From 649eab60ec019cfcc8e774e53788e0a5ff8eba00 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Thu, 23 Mar 2023 01:47:46 +0100 Subject: [PATCH] Problems with ROOT persistency --- DDG4/include/DDG4/DDG4Dict.h | 2 +- DDG4/include/DDG4/Geant4Particle.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DDG4/include/DDG4/DDG4Dict.h b/DDG4/include/DDG4/DDG4Dict.h index 3598ccca6..cb52beefd 100644 --- a/DDG4/include/DDG4/DDG4Dict.h +++ b/DDG4/include/DDG4/DDG4Dict.h @@ -64,10 +64,10 @@ namespace { class DDG4Dict {}; } /// Dictionaires for Geant4 particles #pragma link C++ class dd4hep::sim::ParticleExtension+; +#pragma link C++ class std::unique_ptr<dd4hep::sim::ParticleExtension>+; /// Auto-pointers related. ROOT cannot handle I/O! #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::DataExtension>; -#pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::ParticleExtension>; #pragma link C++ class dd4hep::sim::Geant4Particle+; #pragma link C++ class std::vector<dd4hep::sim::Geant4Particle*>+; diff --git a/DDG4/include/DDG4/Geant4Particle.h b/DDG4/include/DDG4/Geant4Particle.h index 06f714471..77bfc5586 100644 --- a/DDG4/include/DDG4/Geant4Particle.h +++ b/DDG4/include/DDG4/Geant4Particle.h @@ -15,7 +15,6 @@ #define DDG4_GEANT4PARTICLE_H // Framework include files -#include "DD4hep/Memory.h" // ROOT includes #include "Math/Vector4D.h" @@ -28,6 +27,7 @@ class G4VProcess; #include <set> #include <map> #include <vector> +#include <memory> /// Namespace for the AIDA detector description toolkit namespace dd4hep { @@ -140,7 +140,7 @@ namespace dd4hep { Particles daughters; /// User data extension if required - dd4hep_ptr<ParticleExtension> extension { }; + std::unique_ptr<ParticleExtension> extension { }; /// Reference to the G4VProcess, which created this track const G4VProcess *process = 0; //! not persistent -- GitLab