export path to fix the path issue

This commit is contained in:
Ryan Tang 2022-07-14 14:37:03 -04:00
parent cea95f2f61
commit a5ac6ba05e
5 changed files with 16 additions and 16 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
DWBA*

View File

@ -22,7 +22,7 @@
#include <algorithm> #include <algorithm>
using namespace std; using namespace std;
string massData="../Cleopatra/mass20.txt"; string massData="/Cleopatra/mass20.txt";
// about the mass**.txt // about the mass**.txt
// Mass Excess = (ATOMIC MASS - A)*amu | e.g. n : (1.088664.91585E-6-1)*amu // Mass Excess = (ATOMIC MASS - A)*amu | e.g. n : (1.088664.91585E-6-1)*amu
@ -113,14 +113,12 @@ private:
bool isFindOnce; bool isFindOnce;
void findHeliosPath(){ void findHeliosPath(){
dataSource = massData; dataSource = massData;
// heliosPath = getenv("HELIOSSYS"); heliosPath = getenv("PtolemyPath");
// if( heliosPath ){ if( heliosPath ){
// dataSource = heliosPath; dataSource = heliosPath;
// dataSource += "/analysis" + massData; dataSource += "/.." + massData;
// }else{ }
// dataSource = ".." + massData;
// }
} }

View File

@ -17,7 +17,8 @@ Actually the program can run anywhere. It will copy the DWBA file to the present
1. DWBA.in, this is the input file for the ptolmey 1. DWBA.in, this is the input file for the ptolmey
2. DWBA.output, this is the output file for the ptolmey 2. DWBA.output, this is the output file for the ptolmey
3. DWBA.Ex.txt, this is the excitation energy 3. DWBA.Ex.txt, this is the excitation energy
4. DWBA.root, this is a root file contains the DWBA angular distribution in TGraph 4. DWBA.Xsec.txt, this is the angular distribution in txt format
5. DWBA.root, this is a root file contains the DWBA angular distribution in TGraph
# program structure # program structure

View File

@ -2,6 +2,8 @@
dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
export PtolemyPath=$dir
if [[ -f DWBA ]]; then if [[ -f DWBA ]]; then
dummy=10 dummy=10
else else

View File

@ -323,11 +323,7 @@ void MyMainFrame::OpenFile(int ID){
TString oldFileName = fileName; TString oldFileName = fileName;
if ( ID == 0 ) fileName = "detectorGeo.txt";
if ( ID == 1 ) fileName = "reactionConfig.txt";
if ( ID == 2 ) fileName = "Ex.txt";
if ( ID == 3 ) fileName = "DWBA"; if ( ID == 3 ) fileName = "DWBA";
if ( ID == 4 ) fileName = "../Armory/Check_Simulation_Config.txt";
if ( ID == 5 ) fileName = "DWBA.in"; if ( ID == 5 ) fileName = "DWBA.in";
if ( ID == 6 ) fileName = "DWBA.out"; if ( ID == 6 ) fileName = "DWBA.out";
if ( ID == 7 ) fileName = "DWBA.Xsec.txt"; if ( ID == 7 ) fileName = "DWBA.Xsec.txt";
@ -380,12 +376,14 @@ void MyMainFrame::Command(int ID) {
if( isRun->GetState() && IsFileExist("DWBA.in") ) { if( isRun->GetState() && IsFileExist("DWBA.in") ) {
//printf("run ptolemy...........\n"); //printf("run ptolemy...........\n");
char * path = getenv("PtolemyPath");
statusLabel->SetText("Running Ptolemy....."); statusLabel->SetText("Running Ptolemy.....");
int output = 1; int output = 1;
if( OS_Type == 1 ){ if( OS_Type == 1 ){
output = system("../Cleopatra/ptolemy <DWBA.in> DWBA.out"); output = system(Form("%s/../Cleopatra/ptolemy <DWBA.in> DWBA.out", path));
}else{ }else{
output = system("../Cleopatra/ptolemy_mac <DWBA.in> DWBA.out"); output = system(Form("%s/../Cleopatra/ptolemy_mac <DWBA.in> DWBA.out", path));
} }
statusLabel->SetText("Check terminal, if no massage, Ptolemy run well."); statusLabel->SetText("Check terminal, if no massage, Ptolemy run well.");