]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
added protection for loading the same macro twice
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jul 2000 12:47:23 +0000 (12:47 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 25 Jul 2000 12:47:23 +0000 (12:47 +0000)
AliGeant4/macro/g4Config.C
AliGeant4/macro/g4menu.C

index a1a73c3140c099f6112b2be86151ee427cae61ef..657d40a81a9ec7b2bcbb055fb52b9c953fb67186 100644 (file)
@@ -13,12 +13,12 @@ void Config()
   // ============================= 
 
   // load Geant4 and AliRoot steer libraries
-  gROOT->LoadMacro("g4libs.C");
+  if (!gInterpreter->IsLoaded("g4libs.C")) gROOT->LoadMacro("g4libs.C");
   gInterpreter->ProcessLine("g4libs()");
   gInterpreter->ProcessLine("steerlibs()");
 
   // Create Geant4   
-  gROOT->LoadMacro("g4menu.C");
+  if (!gInterpreter->IsLoaded("g4menu.C")) gROOT->LoadMacro("g4menu.C");
   gInterpreter->ProcessLine("CreateGeant4()");
 
   // Physics process control
@@ -114,7 +114,6 @@ Int_t iSTART=0;
 
     // Exclude detectors that do not work with Geant4
       iRICH=0; 
-      iZDC=0; 
       iCASTOR=0;
     // Detectors with temporary problem
       iMUON=0;
index 6171afc1d71cc79890ac8b16dc5a4865b79ed063..bb89ed171ec05bf6fe3fc9feea143d880b35c87a 100644 (file)
@@ -3,7 +3,7 @@
 void g4menu()
 {
   // load Geant4 libraries
-  gROOT->LoadMacro("g4libs.C");
+  if (!gInterpreter->IsLoaded("g4libs.C")) gROOT->LoadMacro("g4libs.C");
   gInterpreter->ProcessLine("g4libs()");
 
   // load AliRoot core libraries