]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/STEER/AliSimulation.cxx
Clearer fatal message.
[u/mrichter/AliRoot.git] / STEER / STEER / AliSimulation.cxx
index 1c357549b76ff64281df458f43ab776ed3b2beae..f254ddb919ae6a1add6c2e4acf474448646bbf74 100644 (file)
@@ -866,7 +866,6 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min,
     AliError("gAlice was already run. Restart aliroot and try again.");
     return kFALSE;
   }
-
   AliInfo(Form("initializing gAlice with config file %s",
           fConfigFileName.Data()));
 
@@ -894,6 +893,17 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min,
 
   gAlice->Announce();
 
+  // - cholm - Add this here for consitency 
+  // If requested set the mag. field from the GRP entry.
+  // After this the field is loccked and cannot be changed by Config.C
+  if (fUseMagFieldFromGRP) {
+    AliGRPManager grpM;
+    grpM.ReadGRPEntry();
+    grpM.SetMagField();
+    AliInfo("Field is locked now. It cannot be changed in Config.C");
+  
+  }
+  
   gROOT->LoadMacro(setup);
   gInterpreter->ProcessLine(gAlice->GetConfigFunction());