Ignore:
Timestamp:
Sep 30, 2010, 2:47:17 PM (14 years ago)
Author:
garnier
Message:

tag geant4.9.4 beta 1 + modifs locales

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/extended/eventgenerator/exgps/exGPS.cc

    r1230 r1337  
    2626#include "G4RunManager.hh"
    2727#include "G4UImanager.hh"
    28 #include "G4UIterminal.hh"
    29 #include "G4UItcsh.hh"
    3028
    3129#ifdef G4UI_USE_XM
     
    3937#ifdef G4VIS_USE
    4038#include "G4VisExecutive.hh"
     39#endif
     40
     41#ifdef G4UI_USE
     42#include "G4UIExecutive.hh"
    4143#endif
    4244
     
    7274  runManager->SetUserAction(eventAction);
    7375 
    74   G4UIsession* session=0;
    75  
    76   if (argc==1)   // Define UI session for interactive mode.
    77     {
    78       // G4UIterminal is a (dumb) terminal.
    79 #ifdef G4UI_USE_XM
    80       session = new G4UIXm(argc,argv);
    81 #else           
    82 #ifdef G4UI_USE_TCSH
    83       session = new G4UIterminal(new G4UItcsh);     
    84 #else
    85       session = new G4UIterminal();
    86 #endif
    87 #endif
    88     }
    89  
     76  //Initialize G4 kernel
     77  runManager->Initialize();
     78   
    9079  // visualization manager
    9180#ifdef G4VIS_USE
     
    9483#endif
    9584   
    96   //Initialize G4 kernel
    97   runManager->Initialize();
    98    
    9985  // get the pointer to the User Interface manager
    100   G4UImanager* UI = G4UImanager::GetUIpointer(); 
     86  G4UImanager* UImanager = G4UImanager::GetUIpointer(); 
    10187  // UI->ApplyCommand("/control/execute display.mac");   
    10288
    103   if (session)   // Define UI session for interactive mode.
     89  if (argc!=1)   // batch mode
    10490    {
    105       // G4UIterminal is a (dumb) terminal.
    106       session->SessionStart();
    107       delete session;
    108     }
    109   else           // Batch mode
    110     {
    11191      G4String command = "/control/execute ";
    11292      G4String fileName = argv[1];
    113       UI->ApplyCommand(command+fileName);
     93      UImanager->ApplyCommand(command+fileName);   
    11494    }
    115  
     95  else
     96    {  // interactive mode : define UI session
     97#ifdef G4UI_USE
     98      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     99      ui->SessionStart();
     100      delete ui;
     101#endif
     102    }
     103
    116104  // job termination
    117105
Note: See TracChangeset for help on using the changeset viewer.