Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -135,9 +135,9 @@ G4bool XrayFluoDataSet::LoadData(const G4String& fileName)
char* path;
path = getenv("XRAYDATA");
path = std::getenv("XRAYDATA");
if (!path)
path = getenv("PWD");
path = std::getenv("PWD");
//G4cout << path << G4endl;
//G4cout << fileName << G4endl;
@@ -251,7 +251,7 @@ void XrayFluoHPGeDetectorType::LoadResponseData(G4String fileName)
G4String name = ost.str();
char* path = getenv("XRAYDATA");
char* path = std::getenv("XRAYDATA");
G4String pathString(path);
G4String dirFile = pathString + "/" + name;
@@ -327,14 +327,14 @@ void XrayFluoHPGeDetectorType::LoadResponseData(G4String fileName)
void XrayFluoHPGeDetectorType::LoadEfficiencyData(G4String fileName)
{
/*
char* path = getenv("XRAYDATA");
char* path = std::getenv("XRAYDATA");
G4String dirFile;
if (path) {
G4String pathString(path);
dirFile = pathString + "/" + fileName;
}
else{
path = getenv("PWD");
path = std::getenv("PWD");
G4String pathString(path);
dirFile = pathString + "/" + fileName;
}
@@ -187,13 +187,13 @@ void XrayFluoRunAction::ReadData(G4double unitE, G4String fileName)
G4String name = ost.str();
char* path;
if (!(getenv("XRAYDATA"))) {
if (!(std::getenv("XRAYDATA"))) {
path = getenv("PWD");
path = std::getenv("PWD");
}
else {
path = getenv("XRAYDATA");
path = std::getenv("XRAYDATA");
}
@@ -312,7 +312,7 @@ void XrayFluoSiLiDetectorType::LoadResponseData(G4String fileName)
ost << fileName<<".dat";
G4String name = ost.str();
char* path = getenv("XRAYDATA");
char* path = std::getenv("XRAYDATA");
G4String dirFile;
if (path) {
G4String pathString(path);
@@ -320,7 +320,7 @@ void XrayFluoSiLiDetectorType::LoadResponseData(G4String fileName)
dirFile = pathString + "/" + name;
}
else{
path = getenv("PWD");
path = std::getenv("PWD");
G4String pathString(path);
pathString += "\0";
dirFile = pathString + "/" + name;
@@ -397,14 +397,14 @@ void XrayFluoSiLiDetectorType::LoadResponseData(G4String fileName)
void XrayFluoSiLiDetectorType::LoadEfficiencyData(G4String fileName)
{
char* path = getenv("XRAYDATA");
char* path = std::getenv("XRAYDATA");
G4String dirFile;
if (path) {
G4String pathString(path);
dirFile = pathString + "/" + fileName;
}
else{
path = getenv("PWD");
path = std::getenv("PWD");
G4String pathString(path);
dirFile = pathString + "/" + fileName;
}
@@ -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;
}