File indexing completed on 2025-02-22 09:38:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022 #include "DDG4/Geant4Config.h"
0023 #include <iostream>
0024
0025 using namespace std;
0026 using namespace dd4hep::sim;
0027 using namespace dd4hep::sim::Setup;
0028
0029 int setupG4_XML(bool interactive) {
0030 string install_dir = getenv("DD4hepExamplesINSTALL");
0031 string prefix = "file:"+install_dir+"/examples/";
0032 Kernel& kernel = Kernel::instance(dd4hep::Detector::getInstance());
0033 kernel.loadGeometry((prefix+"LHeD/compact/compact.xml").c_str());
0034 kernel.loadXML((prefix+"LHeD/sim/field.xml").c_str());
0035 kernel.loadXML((prefix+"LHeD/sim/sequences.xml").c_str());
0036 kernel.loadXML((prefix+"LHeD/sim/physics.xml").c_str());
0037 if ( interactive ) {
0038 kernel.property("UI") = "UI";
0039 }
0040 else {
0041 kernel.property("NumEvents") = 3;
0042 }
0043 kernel.configure();
0044 kernel.initialize();
0045 kernel.run();
0046 cout << "Successfully executed application .... " << endl;
0047 kernel.terminate();
0048 cout << "TEST_PASSED" << endl;
0049 return 0;
0050 }
0051
0052 #if defined(G__DICTIONARY) || defined(__CLING__) || defined(__CINT__) || defined(__MAKECINT__)
0053 int LHeDXML()
0054 #else
0055 int main(int, char**)
0056 #endif
0057 {
0058 return setupG4_XML(false);
0059 }