Import Geant4 10.5.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2018-06-29 10:58:11 +02:00
parent fe81a77428
commit 6aa23be517
1581 changed files with 124288 additions and 83758 deletions
+13 -18
View File
@@ -28,7 +28,10 @@
//
//
// $Id: $
//
//
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
#else
@@ -41,13 +44,8 @@
#include "FTFP_BERT.hh"
#include "RE03ActionInitialization.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//====================================================================
// Un-comment this line for user defined score writer
@@ -56,6 +54,12 @@
int main(int argc,char** argv)
{
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
G4UIExecutive* ui = nullptr;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Construct the run manager
//
#ifdef G4MULTITHREADED
@@ -87,12 +91,10 @@ int main(int argc,char** argv)
RE03ActionInitialization* actions = new RE03ActionInitialization;
runManager->SetUserInitialization(actions);
#ifdef G4VIS_USE
// Visualization manager
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
// Initialize G4 kernel
//
runManager->Initialize();
@@ -101,16 +103,11 @@ int main(int argc,char** argv)
//
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (argc==1) // Define UI session for interactive mode
if (ui) // Define UI session for interactive mode
{
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
#ifdef G4VIS_USE
UImanager->ApplyCommand("/control/execute vis.mac");
#endif
UImanager->ApplyCommand("/control/execute vis.mac");
ui->SessionStart();
delete ui;
#endif
}
else // Batch mode
{
@@ -124,9 +121,7 @@ int main(int argc,char** argv)
// owned and deleted by the run manager, so they should not
// be deleted in the main() program !
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
return 0;