returning null and warning when the symbolic name for a missing volume is queried
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Jun 2008 08:55:26 +0000 (08:55 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Jun 2008 08:55:26 +0000 (08:55 +0000)
STEER/AliGeomManager.cxx

index 04dd1ed..2cb421e 100644 (file)
@@ -450,7 +450,14 @@ const char* AliGeomManager::SymName(ELayerID layerId, Int_t modId)
     return NULL;
   }
 
-  return fgPNEntry[layerId-kFirstLayer][modId]->GetName();
+  TGeoPNEntry* pne = fgPNEntry[layerId-kFirstLayer][modId];
+  if(!pne)
+  {
+    AliWarningClass(Form("Module %d of layer %s is not activated!",modId,LayerName(layerId)));
+    return NULL;
+  }
+  return pne->GetName();
+
 }
 
 //_____________________________________________________________________________