Ignore errors in ReadGeoMatrices in case the GeoManager is not
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 16:30:35 +0000 (16:30 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 16:30:35 +0000 (16:30 +0000)
yet initialized.  (Rafaelle)

TPC/AliTPCParam.cxx

index c7e0555..9d21f81 100644 (file)
@@ -642,11 +642,14 @@ Bool_t AliTPCParam::ReadGeoMatrices(){
     }
 
     UShort_t volid = AliGeomManager::LayerToVolUID(iLayer,iModule);
-    const char *symname = AliGeomManager::SymName(volid);
-    TGeoPNEntry* pne = gGeoManager->GetAlignableEntry(symname);
-    const char *path = symname;
-    if(pne) path=pne->GetTitle();
-    if (!gGeoManager->cd(path)) return kFALSE;      
+    TGeoPNEntry* pne = gGeoManager->GetAlignableEntryByUID(volid);
+    if(!pne)
+    {
+      AliError(Form("Alignable entry for volume ID %d not in geometry. Exiting!",volid));
+      return kFALSE;
+    }
+    const char *path = pne->GetTitle();
+    if (!gGeoManager->cd(path)) return kFALSE;
     TGeoHMatrix *m = gGeoManager->GetCurrentMatrix();
  
     //