Changeset 1140 for trunk/source/visualization/test
- Timestamp:
- Nov 3, 2009, 11:17:28 AM (16 years ago)
- Location:
- trunk/source/visualization/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/test/History
r1093 r1140 1 $Id: History,v 1.11 7 2009/07/28 12:50:51 lgarnierExp $1 $Id: History,v 1.119 2009/09/29 21:36:38 allison Exp $ 2 2 3 3 History file for visualization/test subdirectory … … 5 5 6 6 $Log: History,v $ 7 Revision 1.119 2009/09/29 21:36:38 allison 8 vistest-V09-02-00 9 10 Revision 1.118 2009/09/29 21:35:56 allison 11 Changed main program, test19.cc, to use G4UIExecutive. 12 7 13 Revision 1.117 2009/07/28 12:50:51 lgarnier 8 14 Adding Qt support for test19 -
trunk/source/visualization/test/test19.cc
r1093 r1140 25 25 // 26 26 // 27 // $Id: test19.cc,v 1.3 0 2009/07/28 12:50:51 lgarnierExp $27 // $Id: test19.cc,v 1.31 2009/09/29 21:35:56 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 48 48 #include "MySteppingAction.hh" 49 49 50 #include "G4UIterminal.hh" 51 #if defined(G4UI_USE_GAG) 52 #include "G4UIGAG.hh" 53 #elif defined(G4UI_USE_TCSH) 54 #include "G4UItcsh.hh" 55 #elif defined(G4UI_USE_WO) 56 #include "G4UIWo.hh" 57 #elif defined(G4UI_USE_XM) 58 #include "G4UIXm.hh" 59 #elif defined(G4UI_USE_XAW) 60 #include "G4UIXaw.hh" 61 #elif defined(G4UI_USE_WIN32) 62 #include "G4UIWin32.hh" 63 #elif defined(G4UI_USE_QT) 64 #include "G4UIQt.hh" 50 #ifdef G4UI_USE 51 #include "G4UIExecutive.hh" 65 52 #endif 66 53 … … 93 80 #endif 94 81 82 #ifdef G4UI_USE 95 83 // Choose (G)UI. 96 G4UIsession* session; 97 #ifdef G4UI_USE_WIN32 98 session = new G4UIWin32 (hInstance,hPrevInstance,lpszCmdLine,nCmdShow); 99 #else 100 if (argc >= 2) { 101 #if defined(G4UI_USE_TCSH) 102 if (strcmp (argv[1], "tcsh")==0) session = 103 new G4UIterminal(new G4UItcsh); 104 #elif defined(G4UI_USE_WO) 105 if (strcmp (argv[1], "Wo")==0) session = new G4UIWo (argc, argv); 106 #elif defined(G4UI_USE_XM) 107 if (strcmp (argv[1], "Xm")==0) session = new G4UIXm (argc, argv); 108 #elif defined(G4UI_USE_XAW) 109 if (strcmp (argv[1], "Xaw")==0) session = new G4UIXaw (argc, argv); 110 #elif defined(G4UI_USE_GAG) 111 if (strcmp (argv[1], "gag")==0) session = new G4UIGAG ; 112 #elif defined(G4UI_USE_QT) 113 if (strcmp (argv[1], "Qt")==0) session = new G4UIQt (argc, argv); 114 #else 115 session = new G4UIterminal(); 116 #endif 117 else session = new G4UIterminal(); 118 } 119 else 120 { 121 G4cerr << "You should define a UI in order to interact with test" << G4endl; 122 return 0; 123 } 84 G4UIExecutive* UIexecutive = new G4UIExecutive(argc, argv); 85 G4UImanager::GetUIpointer()->SetSession(UIexecutive->GetSession()); //So that Pause works.. 124 86 #endif 125 G4UImanager::GetUIpointer()->SetSession(session); //So that Pause works..126 87 127 88 // Run manager … … 159 120 160 121 G4UImanager* UI = G4UImanager::GetUIpointer (); 161 162 122 #ifdef G4UI_USE_WIN32 163 123 G4cout << "Reading win32.g4m file...." << G4endl; … … 173 133 << G4endl; 174 134 135 #ifdef G4UI_USE 175 136 // Start an interactive session. 176 session -> SessionStart(); 137 UIexecutive -> SessionStart(); 138 #endif 177 139 178 140 #ifdef G4VIS_USE … … 185 147 G4cout << "vis_test19: Run manager deleted." << G4endl; 186 148 G4cout << "vis_test19: Deleting session..." << G4endl; 187 delete session; 149 #ifdef G4UI_USE 150 delete UIexecutive; 188 151 G4cout << "vis_test19: Session deleted." << G4endl; 152 #endif 189 153 190 154 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.
