From 35c36e92478e58c6d7f2a921112772f8996a81e0 Mon Sep 17 00:00:00 2001
From: Marko Petric <marko.petric@cern.ch>
Date: Tue, 9 Jul 2019 12:53:14 +0200
Subject: [PATCH] Remove usage of DD4HEP_DD4HEP_PTR_AUTO

---
 DDCore/include/DD4hep/Memory.h     | 2 --
 DDG4/include/DDG4/DDG4Dict.h       | 5 -----
 DDG4/include/DDG4/Geant4Data.h     | 4 ----
 DDG4/include/DDG4/Geant4Particle.h | 4 ----
 DDG4/include/DDG4/Geant4Vertex.h   | 4 ----
 DDG4/python/DDG4Dict.C             | 3 ---
 6 files changed, 22 deletions(-)

diff --git a/DDCore/include/DD4hep/Memory.h b/DDCore/include/DD4hep/Memory.h
index 3b49a0163..f8ac6671f 100644
--- a/DDCore/include/DD4hep/Memory.h
+++ b/DDCore/include/DD4hep/Memory.h
@@ -29,8 +29,6 @@
 // C/C++ include files
 #include <memory>
 
-// Use std::auto_ptr<T> instead of std::unique_ptr<T>
-#define DD4HEP_DD4HEP_PTR_AUTO
 
 /// Namespace for the AIDA detector description toolkit
 namespace dd4hep  {
diff --git a/DDG4/include/DDG4/DDG4Dict.h b/DDG4/include/DDG4/DDG4Dict.h
index 87e2f612b..e4140aa95 100644
--- a/DDG4/include/DDG4/DDG4Dict.h
+++ b/DDG4/include/DDG4/DDG4Dict.h
@@ -70,11 +70,6 @@ using namespace std;
 #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::DataExtension>;
 #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::ParticleExtension>;
 
-#ifdef DD4HEP_DD4HEP_PTR_AUTO
-#pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::DataExtension>::base_t;
-#pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::ParticleExtension>::base_t;
-#endif
-
 #pragma link C++ class dd4hep::sim::Geant4Particle+;
 #pragma link C++ class vector<dd4hep::sim::Geant4Particle*>+;
 #pragma link C++ class map<int,dd4hep::sim::Geant4Particle*>+;
diff --git a/DDG4/include/DDG4/Geant4Data.h b/DDG4/include/DDG4/Geant4Data.h
index 12347d918..f0fe658ac 100644
--- a/DDG4/include/DDG4/Geant4Data.h
+++ b/DDG4/include/DDG4/Geant4Data.h
@@ -124,11 +124,7 @@ namespace dd4hep {
       /// Original Geant 4 track identifier of the creating track (debugging)
       long g4ID = -1;
       /// User data extension if required
-#ifdef DD4HEP_DD4HEP_PTR_AUTO
-      dd4hep_ptr<DataExtension> extension;
-#else
       dd4hep_ptr<DataExtension> extension;   //! not persisten. ROOT cannot handle
-#endif
 
       /// Utility class describing the monte carlo contribution of a given particle to a hit.
       /**
diff --git a/DDG4/include/DDG4/Geant4Particle.h b/DDG4/include/DDG4/Geant4Particle.h
index 6fbfb622e..fe9cb2400 100644
--- a/DDG4/include/DDG4/Geant4Particle.h
+++ b/DDG4/include/DDG4/Geant4Particle.h
@@ -127,11 +127,7 @@ namespace dd4hep {
       Particles daughters;
 
       /// User data extension if required
-#ifdef DD4HEP_DD4HEP_PTR_AUTO
-      dd4hep_ptr<ParticleExtension> extension;
-#else
       dd4hep_ptr<ParticleExtension> extension;   //! not persisten. ROOT cannot handle
-#endif
       const G4VProcess *process = 0;             //! not persistent
       /// Default constructor
       Geant4Particle();
diff --git a/DDG4/include/DDG4/Geant4Vertex.h b/DDG4/include/DDG4/Geant4Vertex.h
index 7d5b41934..46dc604c6 100644
--- a/DDG4/include/DDG4/Geant4Vertex.h
+++ b/DDG4/include/DDG4/Geant4Vertex.h
@@ -56,11 +56,7 @@ namespace dd4hep {
       /// The list of incoming particles
       Particles in;
       /// User data extension if required
-#ifdef DD4HEP_DD4HEP_PTR_AUTO
-      dd4hep_ptr<VertexExtension> extension;
-#else
       dd4hep_ptr<VertexExtension> extension;   //! not persistent: ROOT cannot handle yet
-#endif
       /// Default constructor
       Geant4Vertex();
       /// Copy constructor
diff --git a/DDG4/python/DDG4Dict.C b/DDG4/python/DDG4Dict.C
index cff433871..0f4270710 100644
--- a/DDG4/python/DDG4Dict.C
+++ b/DDG4/python/DDG4Dict.C
@@ -241,9 +241,6 @@ typedef dd4hep::sim::Geant4ActionCreation Geant4ActionCreation;
 #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::VertexExtension>+;
 #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::PrimaryExtension>+;
 #pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::Geant4InputAction::Particles>;
-#ifdef DD4HEP_DD4HEP_PTR_AUTO
-#pragma link C++ class dd4hep::dd4hep_ptr<dd4hep::sim::Geant4InputAction::Particles>::base_t;
-#endif
 
 // Basic stuff
 #pragma link C++ class dd4hep::sim::Geant4ActionCreation;
-- 
GitLab