Changeset 1337 for trunk/examples/extended/eventgenerator/exgps/exGPS.cc
- Timestamp:
- Sep 30, 2010, 2:47:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/eventgenerator/exgps/exGPS.cc
r1230 r1337 26 26 #include "G4RunManager.hh" 27 27 #include "G4UImanager.hh" 28 #include "G4UIterminal.hh"29 #include "G4UItcsh.hh"30 28 31 29 #ifdef G4UI_USE_XM … … 39 37 #ifdef G4VIS_USE 40 38 #include "G4VisExecutive.hh" 39 #endif 40 41 #ifdef G4UI_USE 42 #include "G4UIExecutive.hh" 41 43 #endif 42 44 … … 72 74 runManager->SetUserAction(eventAction); 73 75 74 G4UIsession* session=0; 75 76 if (argc==1) // Define UI session for interactive mode. 77 { 78 // G4UIterminal is a (dumb) terminal. 79 #ifdef G4UI_USE_XM 80 session = new G4UIXm(argc,argv); 81 #else 82 #ifdef G4UI_USE_TCSH 83 session = new G4UIterminal(new G4UItcsh); 84 #else 85 session = new G4UIterminal(); 86 #endif 87 #endif 88 } 89 76 //Initialize G4 kernel 77 runManager->Initialize(); 78 90 79 // visualization manager 91 80 #ifdef G4VIS_USE … … 94 83 #endif 95 84 96 //Initialize G4 kernel97 runManager->Initialize();98 99 85 // get the pointer to the User Interface manager 100 G4UImanager* UI = G4UImanager::GetUIpointer();86 G4UImanager* UImanager = G4UImanager::GetUIpointer(); 101 87 // UI->ApplyCommand("/control/execute display.mac"); 102 88 103 if ( session) // Define UI session for interactive mode.89 if (argc!=1) // batch mode 104 90 { 105 // G4UIterminal is a (dumb) terminal.106 session->SessionStart();107 delete session;108 }109 else // Batch mode110 {111 91 G4String command = "/control/execute "; 112 92 G4String fileName = argv[1]; 113 UI ->ApplyCommand(command+fileName);93 UImanager->ApplyCommand(command+fileName); 114 94 } 115 95 else 96 { // interactive mode : define UI session 97 #ifdef G4UI_USE 98 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 99 ui->SessionStart(); 100 delete ui; 101 #endif 102 } 103 116 104 // job termination 117 105
Note: See TracChangeset
for help on using the changeset viewer.