Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -27,26 +27,27 @@
|
||||
/// \file exampleB5.cc
|
||||
/// \brief Main program of the basic B5 example
|
||||
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "ActionInitialization.hh"
|
||||
#include "DetectorConstruction.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4SteppingVerbose.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4StepLimiterPhysics.hh"
|
||||
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4SteppingVerbose.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
int main(int argc,char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Detect interactive mode (if no arguments) and define UI session
|
||||
//
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) { ui = new G4UIExecutive(argc, argv); }
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Use G4SteppingVerboseWithUnits
|
||||
G4int precision = 4;
|
||||
@@ -54,8 +55,7 @@ int main(int argc,char** argv)
|
||||
|
||||
// Construct the default run manager
|
||||
//
|
||||
auto runManager =
|
||||
G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
|
||||
auto runManager = G4RunManagerFactory::CreateRunManager(G4RunManagerType::Default);
|
||||
|
||||
// Mandatory user initialization classes
|
||||
runManager->SetUserInitialization(new B5::DetectorConstruction);
|
||||
@@ -76,16 +76,16 @@ int main(int argc,char** argv)
|
||||
// Get the pointer to the User Interface manager
|
||||
auto UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if ( !ui ) {
|
||||
if (!ui) {
|
||||
// execute an argument macro file if exist
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
}
|
||||
else {
|
||||
UImanager->ApplyCommand("/control/execute init_vis.mac");
|
||||
if (ui->IsGUI()) {
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
UImanager->ApplyCommand("/control/execute gui.mac");
|
||||
}
|
||||
// start interactive session
|
||||
ui->SessionStart();
|
||||
|
||||
Reference in New Issue
Block a user