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/analysis/N03Con/exampleN03Con.cc

    r1230 r1337  
    2525//
    2626//
    27 // $Id: exampleN03Con.cc,v 1.2 2007/05/26 00:24:09 tkoi Exp $
    28 // GEANT4 tag $Name: geant4-09-03-cand-01 $
     27// $Id: exampleN03Con.cc,v 1.4 2010/05/12 12:45:06 allison Exp $
     28// GEANT4 tag $Name: geant4-09-04-beta-01 $
    2929//
    3030//
     
    3434#include "G4RunManager.hh"
    3535#include "G4UImanager.hh"
    36 #include "G4UIterminal.hh"
    37 #include "G4UItcsh.hh"
    38 
    39 #ifdef G4UI_USE_XM
    40 #include "G4UIXm.hh"
    41 #endif
    42 
    43 #ifdef G4UI_USE_WIN32
    44 #include "G4UIWin32.hh"
    45 #endif
    4636
    4737#include "Randomize.hh"
     
    4939#ifdef G4VIS_USE
    5040#include "G4VisExecutive.hh"
     41#endif
     42
     43#ifdef G4UI_USE
     44#include "G4UIExecutive.hh"
    5145#endif
    5246
     
    8478  runManager->SetUserInitialization(physics);
    8579
    86   G4UIsession* session=0;
    87  
    88   if (argc==1)   // Define UI session for interactive mode.
    89     {
    90       // G4UIterminal is a (dumb) terminal
    91       //
    92 #if defined(G4UI_USE_XM)
    93       session = new G4UIXm(argc,argv);
    94 #elif defined(G4UI_USE_WIN32)
    95       session = new G4UIWin32();
    96 #elif defined(G4UI_USE_TCSH)
    97       session = new G4UIterminal(new G4UItcsh);     
    98 #else
    99       session = new G4UIterminal();
    100 #endif
    101     }
    102  
    103 #ifdef G4VIS_USE
    104   // Visualization manager
    105   //
    106   G4VisManager* visManager = new G4VisExecutive;
    107   visManager->Initialize();
    108 #endif
    109    
    11080  // Set user action classes
    11181  //
     
    12797  runManager->Initialize();
    12898   
     99#ifdef G4VIS_USE
     100  // Visualization manager
     101  //
     102  G4VisManager* visManager = new G4VisExecutive;
     103  visManager->Initialize();
     104#endif
     105   
    129106  // Get the pointer to the User Interface manager
    130107  //
    131   G4UImanager* UI = G4UImanager::GetUIpointer(); 
     108  G4UImanager* UImanager = G4UImanager::GetUIpointer(); 
    132109
    133   if (session)   // Define UI session for interactive mode
     110  if (argc!=1)   // batch mode
    134111    {
    135       // G4UIterminal is a (dumb) terminal
    136       //
    137       // UI->ApplyCommand("/control/execute vis.mac");   
    138 #if defined(G4UI_USE_XM) || defined(G4UI_USE_WIN32)
    139       // Customize the G4UIXm,Win32 menubar with a macro file
    140       //
    141       // UI->ApplyCommand("/control/execute visTutor/gui.mac");
    142 #endif
    143       session->SessionStart();
    144       delete session;
    145     }
    146   else           // Batch mode
    147     {
    148112#ifdef G4VIS_USE
    149113      visManager->SetVerboseLevel("quiet");
     
    151115      G4String command = "/control/execute ";
    152116      G4String fileName = argv[1];
    153       UI->ApplyCommand(command+fileName);
     117      UImanager->ApplyCommand(command+fileName);   
     118    }
     119  else
     120    {  // interactive mode : define UI session
     121#ifdef G4UI_USE
     122      G4UIExecutive* ui = new G4UIExecutive(argc, argv);
     123      ui->SessionStart();
     124      delete ui;
     125#endif
    154126    }
    155127
Note: See TracChangeset for help on using the changeset viewer.