File indexing completed on 2025-01-18 09:14:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DDG4/Geant4Config.h"
0016
0017
0018 #include <stdexcept>
0019 #include <iostream>
0020 #include <cerrno>
0021
0022 using namespace dd4hep::sim::Setup;
0023
0024 int setupG4_XML() {
0025 dd4hep::Detector& description = dd4hep::Detector::getInstance();
0026 Kernel& kernel = Kernel::instance(description);
0027 kernel.loadGeometry("file:../DD4hep.trunk/DDExamples/CLICSiD/compact/compact.xml");
0028 kernel.loadXML("DDG4_field.xml");
0029 kernel.loadXML("sequences.xml");
0030 kernel.loadXML("physics.xml");
0031 kernel.configure();
0032 kernel.initialize();
0033 kernel.run();
0034 std::cout << "Successfully executed application .... " << std::endl;
0035 kernel.terminate();
0036 return 1;
0037 }
0038
0039
0040 int main(int, char**) {
0041 try {
0042 return setupG4_XML();
0043 }
0044 catch(const std::exception& e) {
0045 std::cout << "Got uncaught exception: " << e.what() << std::endl;
0046 }
0047 catch (...) {
0048 std::cout << "Got UNKNOWN uncaught exception." << std::endl;
0049 }
0050 return EINVAL;
0051 }