Skip to content
Snippets Groups Projects
Commit 84b6396c 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 e0263c65
No related branches found
No related tags found
No related merge requests found
Pipeline #33561 failed
......@@ -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.
Please register or to comment