Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -35,11 +35,7 @@
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "ActionInitialization.hh"
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#else
|
||||
#include "G4RunManager.hh"
|
||||
#endif
|
||||
#include "G4RunManagerFactory.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
@@ -50,7 +46,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv)
|
||||
{
|
||||
{
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = 0;
|
||||
@@ -60,13 +56,9 @@ int main(int argc,char** argv)
|
||||
|
||||
// Construct the default run manager
|
||||
//
|
||||
#ifdef G4MULTITHREADED
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
G4int nThreads = 4;
|
||||
G4MTRunManager * runManager = new G4MTRunManager;
|
||||
runManager->SetNumberOfThreads(nThreads);
|
||||
#else
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
#endif
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
@@ -83,20 +75,20 @@ int main(int argc,char** argv)
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
|
||||
if ( ! ui ) {
|
||||
// batch mode
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
else {
|
||||
else {
|
||||
// interactive mode
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
||||
// Job termination
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
Reference in New Issue
Block a user