Ignore:
Timestamp:
Nov 27, 2008, 4:56:05 PM (16 years ago)
Author:
garnier
Message:

make 3.80 added because 3.81 is bad

Location:
trunk/examples/extended/analysis/A01
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/analysis/A01/A01app.cc

    r807 r893  
    5252#endif
    5353
     54//OSC:begin
     55#include <G4Lab/UIOnX.h>
     56#include "A01AnalysisManager.hh"
     57#include <AIDA/IAnalysisFactory.h>
     58//OSC:end
     59
    5460int main(int argc,char** argv)
    5561{
    5662  // RunManager construction
    5763  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
    5881
    5982#ifdef G4VIS_USE
     
    90113    G4UIsession* session = new G4UIterminal(new G4UItcsh);
    91114#else
    92     G4UIsession* session = new G4UIterminal();
     115//OSC:begin
     116//    G4UIsession* session = new G4UIterminal();
     117//OSC:end
    93118#endif
    94119    session->SessionStart();
    95     delete session;
     120//OSC:begin
     121//    delete session;
     122//OSC:end
    96123  }
    97124
     
    102129  delete runManager;
    103130
     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
    104142  return 0;
    105143}
  • trunk/examples/extended/analysis/A01/GNUmakefile

    r807 r893  
    1818# A01 uses its own physics lists.
    1919#
     20
     21#OSC:begin
     22# OpenScientist compilation and link flags :
     23# Disconnect the usage of other GUIs :
     24G4UI_USE_TERMINAL :=
     25G4UI_USE_XM :=
     26G4UI_USE_XAW :=
     27G4UI_USE_QT :=
     28G4UI_USE_WIN32 :=
     29G4UI_USE_TCSH :=
     30G4UI_USE_GAG :=
     31G4UI_USE_OSC :=
     32# Disconnect the usage of vis drivers that may interfer :
     33G4VIS_USE_OPENGLX :=
     34G4VIS_USE_OPENGLXM :=
     35G4VIS_USE_OPENGLWIN32 :=
     36G4VIS_USE_OIX :=
     37G4VIS_USE_OIWIN32 :=
     38G4VIS_USE_OPACS :=
     39CPPFLAGS += `osc-config --g4lab_incs`
     40INTYLIBS += $(shell osc-config --g4lab_libs)
     41INTYLIBS += `osc-config --iv_libs`
     42
     43# Enable OpenScientist AIDA implementation :
     44G4ANALYSIS_USE := 1
     45G4ANALYSIS_AIDA_CONFIG_CFLAGS = `aida-config --include`
     46G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs`
     47#G4ANALYSIS_AIDA_CONFIG_LIBS = `OnXLab_aida_config --libs`
     48#OSC:end
    2049
    2150include $(G4INSTALL)/config/binmake.gmk
  • trunk/examples/extended/analysis/A01/include/A01AnalysisManager.hh

    r807 r893  
    6565public:
    6666
     67
     68//OSC:begin
     69public:
     70  static AIDA::IAnalysisFactory* m_AIDA;
     71  static void setAIDA(AIDA::IAnalysisFactory*);
     72  static AIDA::IAnalysisFactory* getAIDA();
     73public:
     74//OSC:begin
     75
    6776  virtual ~A01AnalysisManager();
    6877  static A01AnalysisManager* getInstance();
  • trunk/examples/extended/analysis/A01/src/A01AnalysisManager.cc

    r807 r893  
    6060#include "A01AnalysisManager.hh"
    6161
     62//OSC:begin
     63AIDA::IAnalysisFactory* A01AnalysisManager::m_AIDA = 0;
     64void A01AnalysisManager::setAIDA(AIDA::IAnalysisFactory* a_AIDA) {m_AIDA = a_AIDA;}
     65AIDA::IAnalysisFactory* A01AnalysisManager::getAIDA(){return m_AIDA;}
     66//OSC:end
     67
     68
    6269A01AnalysisManager* A01AnalysisManager::instance = 0;
    6370
     
    6673{
    6774  // Hooking an AIDA compliant analysis system.
    68   analysisFactory = AIDA_createAnalysisFactory();
     75//OSC:begin
     76  analysisFactory = getAIDA();
     77//OSC:end
    6978  if(analysisFactory)
    7079  {
     
    92101    delete plotter;
    93102    G4cout << "Warning: In case of working with JAS-AIDA, Geant4 will NOT exit unless you close the JAS-AIDA window." << G4endl;
    94     delete analysisFactory;
     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
    95108  }
    96109}
Note: See TracChangeset for help on using the changeset viewer.