Changeset 1230 for trunk/examples/extended/analysis/A01
- Timestamp:
- Jan 8, 2010, 3:02:48 PM (16 years ago)
- Location:
- trunk/examples/extended/analysis/A01
- Files:
-
- 4 edited
-
A01app.cc (modified) (6 diffs)
-
GNUmakefile (modified) (3 diffs)
-
include/A01AnalysisManager.hh (modified) (1 diff)
-
src/A01AnalysisManager.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/examples/extended/analysis/A01/A01app.cc
r893 r1230 24 24 // ******************************************************************** 25 25 // 26 // $Id: A01app.cc,v 1. 8 2006/11/06 19:46:06allison Exp $26 // $Id: A01app.cc,v 1.9 2009/11/14 14:41:13 allison Exp $ 27 27 // -------------------------------------------------------------- 28 28 // … … 37 37 #include "G4RunManager.hh" 38 38 #include "G4UImanager.hh" 39 #include "G4UIterminal.hh"40 #ifdef G4UI_USE_TCSH41 #include "G4UItcsh.hh"42 #endif43 39 44 40 #include "A01DetectorConstruction.hh" … … 52 48 #endif 53 49 54 //OSC:begin 55 #include <G4Lab/UIOnX.h> 56 #include "A01AnalysisManager.hh" 57 #include <AIDA/IAnalysisFactory.h> 58 //OSC:end 50 #ifdef G4UI_USE 51 #include "G4UIExecutive.hh" 52 #endif 59 53 60 54 int main(int argc,char** argv) … … 62 56 // RunManager construction 63 57 G4RunManager* runManager = new G4RunManager; 64 65 //OSC:begin66 G4UIsession* session = 0;67 if (argc!=1) { // batch mode68 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, else74 // the AIDA plotter factory will create its own75 // that will interfer with the G4Lab::UIOnX one.76 uiOnX->createUI();77 A01AnalysisManager::setAIDA(uiOnX->findAIDA());78 session = uiOnX;79 }80 //OSC:end81 58 82 59 #ifdef G4VIS_USE … … 110 87 // start interactive session 111 88 { 112 #ifdef G4UI_USE_TCSH 113 G4UIsession* session = new G4UIterminal(new G4UItcsh); 114 #else 115 //OSC:begin 116 // G4UIsession* session = new G4UIterminal(); 117 //OSC:end 89 #ifdef G4UI_USE 90 G4UIExecutive* ui = new G4UIExecutive(argc, argv); 91 ui->SessionStart(); 92 delete ui; 118 93 #endif 119 session->SessionStart();120 //OSC:begin121 // delete session;122 //OSC:end123 94 } 124 95 … … 129 100 delete runManager; 130 101 131 //OSC:begin132 // The delete of the run manager may induce,133 // through the user action classes,134 // a delete / closing of the AIDA resources135 // as AIDA trees and various factories.136 // Then we delete the UIOnX that manages the137 // AIDA implementation after the delete138 // of the G4 run manager.139 delete session;140 //OSC:end141 142 102 return 0; 143 103 } -
trunk/examples/extended/analysis/A01/GNUmakefile
r893 r1230 1 # $Id: GNUmakefile,v 1.1 0 2006/11/10 21:04:51 dunsExp $1 # $Id: GNUmakefile,v 1.11 2009/03/05 09:21:30 gbarrand Exp $ 2 2 # -------------------------------------------------------------- 3 3 # GNUmakefile for examples module … … 18 18 # A01 uses its own physics lists. 19 19 # 20 21 #OSC:begin22 # OpenScientist compilation and link flags :23 # Disconnect the usage of other GUIs :24 G4UI_USE_TERMINAL :=25 G4UI_USE_XM :=26 G4UI_USE_XAW :=27 G4UI_USE_QT :=28 G4UI_USE_WIN32 :=29 G4UI_USE_TCSH :=30 G4UI_USE_GAG :=31 G4UI_USE_OSC :=32 # Disconnect the usage of vis drivers that may interfer :33 G4VIS_USE_OPENGLX :=34 G4VIS_USE_OPENGLXM :=35 G4VIS_USE_OPENGLWIN32 :=36 G4VIS_USE_OIX :=37 G4VIS_USE_OIWIN32 :=38 G4VIS_USE_OPACS :=39 CPPFLAGS += `osc-config --g4lab_incs`40 INTYLIBS += $(shell osc-config --g4lab_libs)41 INTYLIBS += `osc-config --iv_libs`42 43 # Enable OpenScientist AIDA implementation :44 G4ANALYSIS_USE := 145 G4ANALYSIS_AIDA_CONFIG_CFLAGS = `aida-config --include`46 G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs`47 #G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs`48 #OSC:end49 20 50 21 include $(G4INSTALL)/config/binmake.gmk … … 82 53 endif 83 54 84 ifdef G4ANALYSIS_USE85 CPPFLAGS += `aida-config --include`86 LDLIBS += `aida-config --lib`87 endif -
trunk/examples/extended/analysis/A01/include/A01AnalysisManager.hh
r893 r1230 65 65 public: 66 66 67 68 //OSC:begin69 public:70 static AIDA::IAnalysisFactory* m_AIDA;71 static void setAIDA(AIDA::IAnalysisFactory*);72 static AIDA::IAnalysisFactory* getAIDA();73 public:74 //OSC:begin75 76 67 virtual ~A01AnalysisManager(); 77 68 static A01AnalysisManager* getInstance(); -
trunk/examples/extended/analysis/A01/src/A01AnalysisManager.cc
r893 r1230 60 60 #include "A01AnalysisManager.hh" 61 61 62 //OSC:begin63 AIDA::IAnalysisFactory* A01AnalysisManager::m_AIDA = 0;64 void A01AnalysisManager::setAIDA(AIDA::IAnalysisFactory* a_AIDA) {m_AIDA = a_AIDA;}65 AIDA::IAnalysisFactory* A01AnalysisManager::getAIDA(){return m_AIDA;}66 //OSC:end67 68 69 62 A01AnalysisManager* A01AnalysisManager::instance = 0; 70 63 … … 73 66 { 74 67 // Hooking an AIDA compliant analysis system. 75 //OSC:begin 76 analysisFactory = getAIDA(); 77 //OSC:end 68 analysisFactory = AIDA_createAnalysisFactory(); 78 69 if(analysisFactory) 79 70 { … … 101 92 delete plotter; 102 93 G4cout << "Warning: In case of working with JAS-AIDA, Geant4 will NOT exit unless you close the JAS-AIDA window." << G4endl; 103 //OSC:begin 104 // AIDA analysis factory is managed by 105 // G4Lab::UIOnX, it can't be delete here. 106 // delete analysisFactory; 107 //OSC:end 94 delete analysisFactory; 108 95 } 109 96 }
Note:
See TracChangeset
for help on using the changeset viewer.
