Ignore:
Timestamp:
Jan 8, 2010, 3:02:48 PM (14 years ago)
Author:
garnier
Message:

update to geant4.9.3

File:
1 edited

Legend:

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

    r893 r1230  
    2424// ********************************************************************
    2525//
    26 // $Id: A01app.cc,v 1.8 2006/11/06 19:46:06 allison Exp $
     26// $Id: A01app.cc,v 1.9 2009/11/14 14:41:13 allison Exp $
    2727// --------------------------------------------------------------
    2828//
     
    3737#include "G4RunManager.hh"
    3838#include "G4UImanager.hh"
    39 #include "G4UIterminal.hh"
    40 #ifdef G4UI_USE_TCSH
    41 #include "G4UItcsh.hh"
    42 #endif
    4339
    4440#include "A01DetectorConstruction.hh"
     
    5248#endif
    5349
    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
    5953
    6054int main(int argc,char** argv)
     
    6256  // RunManager construction
    6357  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
    8158
    8259#ifdef G4VIS_USE
     
    11087  // start interactive session
    11188  {
    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;
    11893#endif
    119     session->SessionStart();
    120 //OSC:begin
    121 //    delete session;
    122 //OSC:end
    12394  }
    12495
     
    129100  delete runManager;
    130101
    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 
    142102  return 0;
    143103}
Note: See TracChangeset for help on using the changeset viewer.