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 biasing/ReverseMC01 example
//
//
// $Id: exampleRMC01.cc 101303 2016-11-14 11:21:18Z gcosmo $
// $Id: exampleRMC01.cc 110378 2018-05-22 07:43:50Z gcosmo $
//
//
// --------------------------------------------------------------
@@ -43,18 +43,15 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "G4Types.hh"
#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
#include "G4AdjointSimManager.hh"
#include "RMC01DetectorConstruction.hh"
@@ -70,8 +67,12 @@
int main(int argc,char** argv) {
// Instantiate G4UIExecutive if interactive mode
G4UIExecutive* ui = nullptr;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Construct the default run manager
G4RunManager * theRunManager = new G4RunManager;
@@ -101,17 +102,14 @@ int main(int argc,char** argv) {
//theAdjointSimManager->SetAdjointEventAction(new RMC01AdjointEventAction);
theAdjointSimManager->SetAdjointEventAction(new RMC01EventAction);
#ifdef G4VIS_USE
// visualization manager
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#endif
// get the pointer to the User Interface manager
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
if (!ui) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
@@ -119,17 +117,12 @@ int main(int argc,char** argv) {
}
else
{ // interactive mode : define UI session
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
ui->SessionStart();
delete ui;
#endif
}
// job termination
#ifdef G4VIS_USE
delete visManager;
#endif
delete theRunManager;
return 0;