Skip to content
Snippets Groups Projects
Commit 7f1b63bf 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.
parent ee2219ba
No related branches found
No related tags found
1 merge request!2034Fix Geant4 configuration
......@@ -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