Import Geant4 9.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 16:15:05 +02:00
parent b79225fb37
commit 74cad5e589
3877 changed files with 234205 additions and 167127 deletions
+21 -23
View File
@@ -24,8 +24,8 @@
// ********************************************************************
//
//
// $Id: exampleN02.cc,v 1.15 2008/05/07 09:52:59 allison Exp $
// GEANT4 tag $Name: geant4-09-02 $
// $Id: exampleN02.cc,v 1.16 2009/10/30 14:59:59 allison Exp $
// GEANT4 tag $Name: geant4-09-03 $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -41,13 +41,15 @@
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4UIterminal.hh"
#include "G4UItcsh.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
@@ -87,35 +89,31 @@ int main(int argc,char** argv)
//
runManager->Initialize();
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
// Get the pointer to the User Interface manager
//
G4UImanager * UI = G4UImanager::GetUIpointer();
G4UImanager * UImanager = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UI->ApplyCommand(command+fileName);
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else // interactive mode : define visualization and UI terminal
else // interactive mode : define UI session
{
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc,argv);
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
G4UIsession * session = 0;
#ifdef G4UI_USE_TCSH
session = new G4UIterminal(new G4UItcsh);
#else
session = new G4UIterminal();
UImanager->ApplyCommand("/control/execute vis.mac");
#endif
#ifdef G4VIS_USE
UI->ApplyCommand("/control/execute vis.mac");
ui->SessionStart();
delete ui;
#endif
session->SessionStart();
delete session;
#ifdef G4VIS_USE
delete visManager;