Changeset 1190 for trunk/examples/novice/N05/exampleN05.cc
- Timestamp:
- Nov 19, 2009, 12:25:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/novice/N05/exampleN05.cc
r807 r1190 25 25 // 26 26 // 27 // $Id: exampleN05.cc,v 1.1 6 2007/05/11 14:29:16 mverderiExp $27 // $Id: exampleN05.cc,v 1.17 2009/10/30 15:10:56 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 63 63 #include "ExN05PhysicsList.hh" 64 64 65 #include "G4UIterminal.hh"66 65 #include "G4UImanager.hh" 67 66 #include "G4RunManager.hh" 68 67 #include "G4RunManagerKernel.hh" 69 70 68 71 69 #ifdef G4VIS_USE … … 73 71 #endif 74 72 75 #include "G4ios.hh" 73 #ifdef G4UI_USE 74 #include "G4UIExecutive.hh" 75 #endif 76 76 77 77 int main(int argc, char** argv) … … 110 110 runManager->SetUserAction(stepping_action); 111 111 112 113 112 // Initialize Run manager 114 113 runManager->Initialize(); … … 125 124 // Setup commands 126 125 // 127 G4UImanager * UI = G4UImanager::GetUIpointer();128 UI ->ApplyCommand("/Step/Verbose 0");129 UI ->ApplyCommand("/tracking/Verbose 1");130 UI ->ApplyCommand("/gun/particle e-");131 UI ->ApplyCommand("/gun/energy 100 MeV");132 UI ->ApplyCommand("/gun/direction 0 0 1");133 UI ->ApplyCommand("/gun/position 0 0 0");134 UI ->ApplyCommand("/gun/direction 0 .3 1.");126 G4UImanager * UImanager = G4UImanager::GetUIpointer(); 127 UImanager->ApplyCommand("/Step/Verbose 0"); 128 UImanager->ApplyCommand("/tracking/Verbose 1"); 129 UImanager->ApplyCommand("/gun/particle e-"); 130 UImanager->ApplyCommand("/gun/energy 100 MeV"); 131 UImanager->ApplyCommand("/gun/direction 0 0 1"); 132 UImanager->ApplyCommand("/gun/position 0 0 0"); 133 UImanager->ApplyCommand("/gun/direction 0 .3 1."); 135 134 136 135 if(argc==1) … … 139 138 // Define (G)UI 140 139 //-------------------------- 141 // G4UIterminal is a (dumb) terminal 142 //143 G4UIsession* session = new G4UIterminal;144 session->SessionStart();145 delete session; 140 #ifdef G4UI_USE 141 G4UIExecutive * ui = new G4UIExecutive(argc,argv); 142 ui->SessionStart(); 143 delete ui; 144 #endif 146 145 } 147 146 else 148 147 { 149 #ifdef G4VIS_USE150 visManager->SetVerboseLevel("quiet");151 #endif152 G4UImanager* UImanager = G4UImanager::GetUIpointer();153 148 G4String command = "/control/execute "; 154 149 G4String fileName = argv[1];
Note: See TracChangeset
for help on using the changeset viewer.