From: hristov Date: Mon, 8 Dec 2014 14:08:58 +0000 (+0100) Subject: Initialize magnetic field in RunLego as it is done in Run in case we get X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=123b7fa024e5ac489346485c3e87f86cd00bd83f Initialize magnetic field in RunLego as it is done in Run in case we get the setting from OCDB. Christian Holm --- diff --git a/STEER/STEER/AliSimulation.cxx b/STEER/STEER/AliSimulation.cxx index 1c357549b76..f254ddb919a 100644 --- a/STEER/STEER/AliSimulation.cxx +++ b/STEER/STEER/AliSimulation.cxx @@ -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());