From 99139b74c438c88cc8936593bb668d73f242e840 Mon Sep 17 00:00:00 2001
From: Marko Petric <marko.petric@cern.ch>
Date: Wed, 10 Jul 2019 16:27:28 +0200
Subject: [PATCH] Remove dd_sim

---
 DDG4/CMakeLists.txt |  2 --
 DDG4/ddsim.cpp      | 63 ---------------------------------------------
 2 files changed, 65 deletions(-)
 delete mode 100644 DDG4/ddsim.cpp

diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt
index f700904a9..e27e862ab 100644
--- a/DDG4/CMakeLists.txt
+++ b/DDG4/CMakeLists.txt
@@ -63,8 +63,6 @@ dd4hep_add_plugin(DDG4LCIO
 dd4hep_add_executable(g4gdmlDisplay SOURCES g4gdmlDisplay.cpp)
 #-----------------------------------------------------------------------------------
 dd4hep_add_executable(g4FromXML     SOURCES g4FromXML.cpp)
-#-----------------------------------------------------------------------------------
-dd4hep_add_executable(dd_sim        SOURCES ddsim.cpp)
 #---Helper to overcome deficiency of the python executable concerning multi-threading
 dd4hep_add_executable(pyddg4
   LINK_LIBRARIES DDPython
diff --git a/DDG4/ddsim.cpp b/DDG4/ddsim.cpp
deleted file mode 100644
index 37cc25637..000000000
--- a/DDG4/ddsim.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
-//====================================================================
-//  DDSim - LC simulation based on dd4hep
-//--------------------------------------------------------------------
-//  F.Gaede, DESY
-//====================================================================
-
-#include "DDG4/Geant4Config.h"
-#include <cerrno>
-#include <iostream>
-#include <stdexcept>
-
-using namespace dd4hep::sim::Setup;
-
-/** Simple main program to run a simulation with DDG4
- *  Loops over all xml files given on command line:
- *   - first file defines geometry
- *   - subsequent files configure the application
- */
-
-int main_wrapper(int argc, char** argv)  {
-  if( argc < 2 ){
-    std::cout << " --- Usage example: \n "
-              << " dd_sim  ../ILD/compact/ILD_o1_v05.xml [sensitive_detectors.xml] sequences.xml physics.xml "
-              << std::endl ;
-    exit( 0 ) ;
-  }
-
-  dd4hep::Detector& description = dd4hep::Detector::getInstance();
-  Kernel& kernel = Kernel::instance(description);
-
-  // first argument: geometry file
-
-  std::string geoFile = "file:" ;
-  geoFile += argv[1] ;
-
-  kernel.loadGeometry( geoFile ) ;
-  for( int i=2 ; i < argc  ; ++i ) {
-    std::cout << "  will open xml file " << argv[i] <<  " and load to kernel ..." << std::endl ;
-    kernel.loadXML( argv[i] ) ;
-  }
-
-  kernel.configure();
-  kernel.initialize();
-  kernel.run();
-
-  std::cout << "Successfully executed application .... " << std::endl;
-  kernel.terminate();
-  return 0;
-}
-
-//______________________________________________________________________________
-int main(int argc, char** argv)  {
-  try {
-    return main_wrapper(argc,argv);
-  }
-  catch(const std::exception& e)  {
-    std::cout << "Got uncaught exception: " << e.what() << std::endl;
-  }
-  catch (...)  {
-    std::cout << "Got UNKNOWN uncaught exception." << std::endl;
-  }
-  return EINVAL;    
-}
-- 
GitLab