Protection against resetting the field map (Yu.Belikov)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Feb 2006 14:24:39 +0000 (14:24 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 Feb 2006 14:24:39 +0000 (14:24 +0000)
STEER/AliTracker.cxx

index 0322e99b2d22d3e684c7d9451efd8bb93ccca7d9..4233fc2abfc6f9c3147c04c162e3bf60be1d74c3 100644 (file)
@@ -53,6 +53,11 @@ void AliTracker::SetFieldMap(const AliMagF* map, Bool_t uni) {
   //--------------------------------------------------------------------
   if (map==0) AliFatalClass("Can't access the field map !");
 
   //--------------------------------------------------------------------
   if (map==0) AliFatalClass("Can't access the field map !");
 
+  if (fgkFieldMap) {
+     AliWarningClass("The magnetic field map has been already set !");
+     return;
+  }
+
   fgUniformField=uni;
   fgkFieldMap=map;
 
   fgUniformField=uni;
   fgkFieldMap=map;