Ignore:
Timestamp:
Nov 19, 2009, 12:25:58 PM (15 years ago)
Author:
garnier
Message:

update par rapport a CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/novice/N05/exampleN05.cc

    r807 r1190  
    2525//
    2626//
    27 // $Id: exampleN05.cc,v 1.16 2007/05/11 14:29:16 mverderi Exp $
     27// $Id: exampleN05.cc,v 1.17 2009/10/30 15:10:56 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    6363#include "ExN05PhysicsList.hh"
    6464
    65 #include "G4UIterminal.hh"
    6665#include "G4UImanager.hh"
    6766#include "G4RunManager.hh"
    6867#include "G4RunManagerKernel.hh"
    69 
    7068
    7169#ifdef G4VIS_USE
     
    7371#endif
    7472
    75 #include "G4ios.hh"
     73#ifdef G4UI_USE
     74#include "G4UIExecutive.hh"
     75#endif
    7676
    7777int main(int argc, char** argv)
     
    110110  runManager->SetUserAction(stepping_action);
    111111
    112 
    113112  // Initialize Run manager
    114113  runManager->Initialize();
     
    125124  // Setup commands
    126125  //
    127   G4UImanager * UI = G4UImanager::GetUIpointer();
    128   UI->ApplyCommand("/Step/Verbose 0");
    129   UI->ApplyCommand("/tracking/Verbose 1");
    130   UI->ApplyCommand("/gun/particle e-");
    131   UI->ApplyCommand("/gun/energy 100 MeV");
    132   UI->ApplyCommand("/gun/direction 0 0 1");
    133   UI->ApplyCommand("/gun/position 0 0 0");
    134   UI->ApplyCommand("/gun/direction 0 .3 1.");
     126  G4UImanager * UImanager = G4UImanager::GetUIpointer();
     127  UImanager->ApplyCommand("/Step/Verbose 0");
     128  UImanager->ApplyCommand("/tracking/Verbose 1");
     129  UImanager->ApplyCommand("/gun/particle e-");
     130  UImanager->ApplyCommand("/gun/energy 100 MeV");
     131  UImanager->ApplyCommand("/gun/direction 0 0 1");
     132  UImanager->ApplyCommand("/gun/position 0 0 0");
     133  UImanager->ApplyCommand("/gun/direction 0 .3 1.");
    135134
    136135  if(argc==1)
     
    139138    // Define (G)UI
    140139    //--------------------------
    141     // G4UIterminal is a (dumb) terminal
    142     //
    143     G4UIsession* session = new G4UIterminal;
    144     session->SessionStart();
    145     delete session;
     140#ifdef G4UI_USE
     141    G4UIExecutive * ui = new G4UIExecutive(argc,argv);
     142    ui->SessionStart();
     143    delete ui;
     144#endif
    146145  }
    147146  else
    148147  {
    149 #ifdef G4VIS_USE
    150     visManager->SetVerboseLevel("quiet");
    151 #endif
    152     G4UImanager* UImanager = G4UImanager::GetUIpointer();
    153148    G4String command = "/control/execute ";
    154149    G4String fileName = argv[1];
Note: See TracChangeset for help on using the changeset viewer.