Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -27,29 +27,25 @@
|
||||
/// \brief Main program of the persistency/P02 example
|
||||
//
|
||||
//
|
||||
// $Id: exampleP02.cc 82291 2014-06-13 15:20:32Z gcosmo $
|
||||
// $Id: exampleP02.cc 110837 2018-06-15 15:16:45Z gcosmo $
|
||||
//
|
||||
//
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include "ExP02DetectorConstruction.hh"
|
||||
#include "ExP02DetConstrReader.hh"
|
||||
#include "ExP02PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "FTFP_BERT.hh"
|
||||
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -78,6 +74,9 @@ int main(int argc, char** argv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// User interface
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
|
||||
// Run manager
|
||||
G4RunManager * runManager = new G4RunManager;
|
||||
|
||||
@@ -87,12 +86,10 @@ int main(int argc, char** argv)
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
// Visualization, if you choose to have it!
|
||||
// Visualization
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
#endif
|
||||
|
||||
|
||||
// UserAction classes
|
||||
runManager->SetUserAction(new ExP02PrimaryGeneratorAction());
|
||||
|
||||
@@ -102,18 +99,11 @@ int main(int argc, char** argv)
|
||||
//get the pointer to the User Interface manager
|
||||
G4UImanager * UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
#ifdef G4UI_USE
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
#ifdef G4VIS_USE
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
#endif
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
#endif
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user