From 8ccdc1364aa09c31a3351dbdf4f8738d7209c3c8 Mon Sep 17 00:00:00 2001 From: Markus Frank <markus.frank@cern.ch> Date: Fri, 22 Feb 2013 17:15:06 +0000 Subject: [PATCH] Have a common representation for all unicode macros. --- DDExamples/UtilityApps/src/run_plugin.h | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 DDExamples/UtilityApps/src/run_plugin.h diff --git a/DDExamples/UtilityApps/src/run_plugin.h b/DDExamples/UtilityApps/src/run_plugin.h new file mode 100644 index 000000000..d6db64895 --- /dev/null +++ b/DDExamples/UtilityApps/src/run_plugin.h @@ -0,0 +1,39 @@ +// $Id:$ +//==================================================================== +// AIDA Detector description implementation for LCD +//-------------------------------------------------------------------- +// +// Generic ROOT based geometry display program +// +// Author : M.Frank +// +//==================================================================== + +// Framework include files +#include "DD4hep/LCDD.h" + +// C/C++ include files +#include <iostream> +#include <cstdlib> +#include <vector> +#include <cerrno> +#include <string> + +using namespace std; +using namespace DD4hep::Geometry; + +int run_plugin(LCDD& lcdd, const char* name, int argc, char** argv) { + try { + lcdd.apply(name,argc,argv); + return 0; + } + catch(const exception& e) { + cout << e.what() << endl; + } + catch(...) { + cout << "UNKNOWN Exception" << endl; + } + ::exit(EINVAL); + return EINVAL; +} + -- GitLab