Skip to content
Snippets Groups Projects
Commit 5ae2795a authored by Administrator's avatar Administrator
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.

(cherry picked from commit 7f1b63bf)
(cherry picked from MR2034)
parent 240a0b96
No related branches found
No related tags found
No related merge requests found
......@@ -52,10 +52,12 @@ void Config()
TString configm(gSystem->Getenv("CONFIG_DIR"));
TString configm1 = configm + "/g4config.in";
configm1.ReplaceAll("//", "/");
cout << " -I g4Config() using g4conf macro: " << configm1 << endl;
// set the common cuts
TString cuts = configm + "/SetCuts.C";
cuts.ReplaceAll("//", "/");
cout << "Physics cuts with script \n " << cuts.Data() << endl;
Int_t cut = gROOT->LoadMacro(cuts.Data());
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