Import Geant4 10.6.0 source tree
This commit is contained in:
@@ -45,12 +45,8 @@
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "Randomize.hh"
|
||||
#ifdef G4VIS_USE
|
||||
#include "G4VisExecutive.hh"
|
||||
#endif
|
||||
#ifdef G4UI_USE
|
||||
#include "G4UIExecutive.hh"
|
||||
#endif
|
||||
#include "XrayFluoDetectorConstruction.hh"
|
||||
#include "XrayFluoPlaneDetectorConstruction.hh"
|
||||
#include "XrayFluoMercuryDetectorConstruction.hh"
|
||||
@@ -136,27 +132,20 @@ void XrayFluoSimulation::RunSimulation(int argc,char* argv[])
|
||||
runManager->SetUserInitialization
|
||||
(new XrayFluoActionInitializer(geometryNumber));
|
||||
|
||||
#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 (getenv("G4VIS_USE")) {
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
}
|
||||
|
||||
if (argc == 1) // Define UI session for interactive mode.
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute initInter.mac");
|
||||
#ifdef G4UI_USE
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
G4UIExecutive* ui = new G4UIExecutive(argc, argv);
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
#endif
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
@@ -166,13 +155,8 @@ void XrayFluoSimulation::RunSimulation(int argc,char* argv[])
|
||||
}
|
||||
|
||||
// job termination
|
||||
#ifdef G4VIS_USE
|
||||
delete visManager;
|
||||
G4cout << "visManager deleted"<< G4endl;
|
||||
#endif
|
||||
|
||||
|
||||
delete runManager;
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user