From 706eaf0b3f34175b97aac86ec131bf2ecbbb311a Mon Sep 17 00:00:00 2001 From: shahoian Date: Tue, 15 Jun 2010 14:36:26 +0000 Subject: [PATCH] Produce fatal also when wrong currents configuration is requested --- STEER/AliMagF.cxx | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/STEER/AliMagF.cxx b/STEER/AliMagF.cxx index fe2b78de520..be668d6dc56 100644 --- a/STEER/AliMagF.cxx +++ b/STEER/AliMagF.cxx @@ -183,8 +183,7 @@ AliMagF::~AliMagF() Bool_t AliMagF::LoadParameterization() { if (fMeasuredMap) { - AliError(Form("Field data %s are already loaded from %s\n",GetParamName(),GetDataFileName())); - return kTRUE; + AliFatal(Form("Field data %s are already loaded from %s\n",GetParamName(),GetDataFileName())); } // char* fname = gSystem->ExpandPathName(GetDataFileName()); @@ -487,8 +486,7 @@ AliMagF* AliMagF::CreateFieldMap(Float_t l3Cur, Float_t diCur, Int_t convention, if (TMath::Abs((sclDip=diCur/diNominalCurrent)-1.) > tolerance && !uniform) { if (diCur <= zero) sclDip = 0.; // some small current.. -> Dipole OFF else { - AliErrorGeneral("AliMagF",Form("Wrong dipole current (%f A)!",diCur)); - return 0; + AliFatalGeneral("AliMagF",Form("Wrong dipole current (%f A)!",diCur)); } } // @@ -503,16 +501,14 @@ AliMagF* AliMagF::CreateFieldMap(Float_t l3Cur, Float_t diCur, Int_t convention, else if (TMath::Abs((sclL3=l3Cur/l3NominalCurrent2)-1.) < tolerance) map = k2kG; else if (l3Cur <= zero && diCur<=zero) { sclL3=0; sclDip=0; map = k5kGUniform;} else { - AliErrorGeneral("AliMagF",Form("Wrong L3 current (%f A)!",l3Cur)); - return 0; + AliFatalGeneral("AliMagF",Form("Wrong L3 current (%f A)!",l3Cur)); } } // if (sclDip!=0 && map!=k5kGUniform) { if ( (l3Cur<=zero) || ((convention==kConvLHC && l3Pol!=diPol) || (convention==kConvDCS2008 && l3Pol==diPol)) ) { - AliErrorGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d", + AliFatalGeneral("AliMagF",Form("Wrong combination for L3/Dipole polarities (%c/%c) for convention %d", l3Pol>0?'+':'-',diPol>0?'+':'-',GetPolarityConvention())); - return 0; } } // -- 2.43.0