Import Geant4 10.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-12-09 12:35:28 +01:00
parent 4ec577e5c4
commit a3452e42ac
3514 changed files with 210500 additions and 89628 deletions
+26 -32
View File
@@ -27,7 +27,7 @@
/// \brief Main program of the analysis/AnaEx02 example
//
//
// $Id: AnaEx02.cc 81444 2014-05-28 14:28:20Z gcosmo $
// $Id: AnaEx02.cc 100673 2016-10-31 10:43:05Z gcosmo $
//
//
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -44,18 +44,20 @@
#include "SteppingAction.hh"
#include "HistoManager.hh"
#ifdef G4VIS_USE
#include "G4VisExecutive.hh"
#endif
#ifdef G4UI_USE
#include "G4UIExecutive.hh"
#endif
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
int main(int argc,char** argv)
{
// Detect interactive mode (if no arguments) and define UI session
//
G4UIExecutive* ui = 0;
if ( argc == 1 ) {
ui = new G4UIExecutive(argc, argv);
}
// Construct the default run manager
//
G4RunManager * runManager = new G4RunManager;
@@ -91,38 +93,30 @@ int main(int argc,char** argv)
//
runManager->Initialize();
// Initialize visualization
//
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
// Get the pointer to the User Interface manager
//
G4UImanager* UImanager = G4UImanager::GetUIpointer();
if (argc!=1) // batch mode
{
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else
{ // interactive mode : define visualization and UI terminal
#ifdef G4VIS_USE
G4VisManager* visManager = new G4VisExecutive;
visManager->Initialize();
#ifdef G4UI_USE
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
#endif
UImanager->ApplyCommand("/control/execute vis.mac");
#endif
#ifdef G4UI_USE
ui->SessionStart();
delete ui;
#endif
#ifdef G4VIS_USE
delete visManager;
#endif
}
if ( ! ui ) {
// batch mode
G4String command = "/control/execute ";
G4String fileName = argv[1];
UImanager->ApplyCommand(command+fileName);
}
else {
// interactive mode
UImanager->ApplyCommand("/control/execute init_vis.mac");
ui->SessionStart();
delete ui;
}
// Job termination
delete visManager;
delete histo;
delete runManager;