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
+10 -1
View File
@@ -1,4 +1,4 @@
$Id: History 101677 2016-11-21 09:26:55Z gcosmo $
$Id: History 110043 2018-05-15 06:03:57Z gcosmo $
-------------------------------------------------------------------
=========================================================
@@ -15,6 +15,15 @@ track of all tags.
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
May 14, 2018 J. Allison (exampleRE01-V10-04-01)
- Remove G4UI_USE and G4VIS_USE.
- Move instantiation of G4UIExecutive to start of main.
May 08, 2018 B.Morgan (exampleRE01-V10-04-00)
- Include G4Types before use of G4MULTITHREADED. For forward
compatibility with move to #defines over -D for G4 preprocessor
symbols.
Nov 19, 2016 A. Dotti (exampleRE01-V10-02-02)
- Explicitly add SD to manager
+14 -20
View File
@@ -29,16 +29,17 @@
//
// $Id: $
//
//
//
// --------------------------------------------------------------
// GEANT4 - RE01 exsample code
//
// --------------------------------------------------------------
// Comments
//
//
//
// --------------------------------------------------------------
#include "G4Types.hh"
#ifdef G4MULTITHREADED
#include "G4MTRunManager.hh"
@@ -54,17 +55,17 @@
#include "G4ParallelWorldPhysics.hh"
#include "RE01ActionInitialization.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
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);
}
#ifdef G4MULTITHREADED
G4MTRunManager * runManager = new G4MTRunManager;
//runManager->SetNumberOfThreads(4);
@@ -72,11 +73,9 @@ int main(int argc,char** argv)
G4RunManager * runManager = new G4RunManager;
#endif
#ifdef G4VIS_USE
// Visualization manager construction
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
G4String parallelWorldName = "ReadoutWorld";
G4VUserDetectorConstruction* detector
@@ -90,31 +89,26 @@ int main(int argc,char** argv)
physicsList->RegisterPhysics(
new G4ParallelWorldPhysics(parallelWorldName));
runManager->SetUserInitialization(physicsList);
runManager->SetUserInitialization(
new RE01ActionInitialization);
runManager->Initialize();
if(argc==1)
if(ui)
{
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
ui->SessionStart();
delete ui;
#endif
}
else
{
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4UImanager* UImanager = G4UImanager::GetUIpointer();
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
#ifdef G4VIS_USE
delete visManager;
#endif
delete runManager;
File diff suppressed because it is too large Load Diff