diff --git a/DDG4/CMakeLists.txt b/DDG4/CMakeLists.txt index f700904a91bf5b3ffb8d8811c2632ec3d60d85c8..e27e862ab3ac8ef5137a8208287f295416d8359a 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 37cc25637c093fd6f95b3a2cf104b8823b7c04d8..0000000000000000000000000000000000000000 --- 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; -}