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
@@ -27,7 +27,7 @@
/// \brief Main program of the Par01 example
//
//
// $Id: examplePar01.cc 101151 2016-11-08 08:06:16Z gcosmo $
// $Id: examplePar01.cc 110256 2018-05-17 14:16:33Z gcosmo $
//
//
// --------------------------------------------------------------
@@ -39,6 +39,8 @@
// i.e. "Fast Simulation"
//-------------------------------------------------------------------
#include "G4Types.hh"
//---------------
// -- Geometries:
//---------------
@@ -63,18 +65,19 @@
// ----------------------------------------------------------------
#include "Par01ActionInitialization.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)
{
// Instantiate G4UIExecutive if interactive mode
G4UIExecutive* ui = nullptr;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
//-------------------------------
// Initialization of Run manager
//-------------------------------
@@ -136,22 +139,17 @@ int main(int argc, char** argv)
//----------------
// Visualization:
//----------------
#ifdef G4VIS_USE
G4cout << "Instantiating Visualization Manager......." << G4endl;
G4VisManager* visManager = new G4VisExecutive;
visManager -> Initialize ();
#endif
if(argc==1)
if(ui)
{
//--------------------------
// Define (G)UI
//--------------------------
#ifdef G4UI_USE
G4UIExecutive * ui = new G4UIExecutive(argc, argv);
ui->SessionStart();
delete ui;
#endif
}
else
{
@@ -165,9 +163,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;