Changeset 893 for trunk/examples/extended/analysis/A01/A01app.cc
- Timestamp:
- Nov 27, 2008, 4:56:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/analysis/A01/A01app.cc
r807 r893 52 52 #endif 53 53 54 //OSC:begin 55 #include <G4Lab/UIOnX.h> 56 #include "A01AnalysisManager.hh" 57 #include <AIDA/IAnalysisFactory.h> 58 //OSC:end 59 54 60 int main(int argc,char** argv) 55 61 { 56 62 // RunManager construction 57 63 G4RunManager* runManager = new G4RunManager; 64 65 //OSC:begin 66 G4UIsession* session = 0; 67 if (argc!=1) { // batch mode 68 A01AnalysisManager::setAIDA(AIDA_createAnalysisFactory()); 69 } else { 70 std::string GUI_onx = "main.onx"; 71 //std::string GUI_onx = "simple_main.onx"; 72 G4Lab::UIOnX* uiOnX = new G4Lab::UIOnX(*runManager,GUI_onx,argc,argv); 73 // Enforce the creation of the GUI here, else 74 // the AIDA plotter factory will create its own 75 // that will interfer with the G4Lab::UIOnX one. 76 uiOnX->createUI(); 77 A01AnalysisManager::setAIDA(uiOnX->findAIDA()); 78 session = uiOnX; 79 } 80 //OSC:end 58 81 59 82 #ifdef G4VIS_USE … … 90 113 G4UIsession* session = new G4UIterminal(new G4UItcsh); 91 114 #else 92 G4UIsession* session = new G4UIterminal(); 115 //OSC:begin 116 // G4UIsession* session = new G4UIterminal(); 117 //OSC:end 93 118 #endif 94 119 session->SessionStart(); 95 delete session; 120 //OSC:begin 121 // delete session; 122 //OSC:end 96 123 } 97 124 … … 102 129 delete runManager; 103 130 131 //OSC:begin 132 // The delete of the run manager may induce, 133 // through the user action classes, 134 // a delete / closing of the AIDA resources 135 // as AIDA trees and various factories. 136 // Then we delete the UIOnX that manages the 137 // AIDA implementation after the delete 138 // of the G4 run manager. 139 delete session; 140 //OSC:end 141 104 142 return 0; 105 143 }
Note: See TracChangeset
for help on using the changeset viewer.