Skip to content
Snippets Groups Projects
Commit 59db4e68 authored by Administrator's avatar Administrator Committed by Pierre-Alain Loizeau
Browse files

Fix geant4 config script

Depending on an environment variable it can happen that a path contains a //.
In such a case the excution of the specified macro fails which is now fixed.
parent 73b2f727
No related branches found
No related tags found
No related merge requests found
Pipeline #33679 failed
...@@ -52,10 +52,12 @@ void Config() ...@@ -52,10 +52,12 @@ void Config()
TString configm(gSystem->Getenv("CONFIG_DIR")); TString configm(gSystem->Getenv("CONFIG_DIR"));
TString configm1 = configm + "/g4config.in"; TString configm1 = configm + "/g4config.in";
configm1.ReplaceAll("//", "/");
cout << " -I g4Config() using g4conf macro: " << configm1 << endl; cout << " -I g4Config() using g4conf macro: " << configm1 << endl;
// set the common cuts // set the common cuts
TString cuts = configm + "/SetCuts.C"; TString cuts = configm + "/SetCuts.C";
cuts.ReplaceAll("//", "/");
cout << "Physics cuts with script \n " << cuts.Data() << endl; cout << "Physics cuts with script \n " << cuts.Data() << endl;
Int_t cut = gROOT->LoadMacro(cuts.Data()); Int_t cut = gROOT->LoadMacro(cuts.Data());
if (cut == 0) gInterpreter->ProcessLine("SetCuts()"); if (cut == 0) gInterpreter->ProcessLine("SetCuts()");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment