]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Write only these alignment objects for which a matching volume exists in geometry...
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Oct 2008 14:26:20 +0000 (14:26 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Oct 2008 14:26:20 +0000 (14:26 +0000)
TRD/AliTRDalignment.cxx

index 2517a45be0d8a4ac78dc194b1ff4308146d66cb5..be3b444d7769b938c45a6808ec338e83586341d7 100644 (file)
@@ -485,15 +485,13 @@ void AliTRDalignment::ReadCurrentGeo()
   // represent just the last alignment. -- check this!
   //
 
+  TGeoPNEntry *pne;
   TGeoHMatrix *ideSm[18];  // ideal
   TGeoHMatrix *misSm[18];  // misaligned
-  for (int i = 0; i < 18; i++) {
+  for (int i = 0; i < 18; i++) if (pne = gGeoManager->GetAlignableEntry(GetSmName(i))) {
 
     // read misaligned and original matrices
 
-    TGeoPNEntry      *pne  = gGeoManager->GetAlignableEntry(GetSmName(i));
-    if (!pne) AliError(Form("no such physical node entry: %s",GetSmName(i)));
-    if (!pne) continue;
     TGeoPhysicalNode *node = pne->GetPhysicalNode();
     if (!node) AliError(Form("physical node entry %s has no physical node",GetSmName(i)));
     if (!node) continue;
@@ -525,13 +523,10 @@ void AliTRDalignment::ReadCurrentGeo()
 
   TGeoHMatrix *ideCh[540]; // ideal
   TGeoHMatrix *misCh[540]; // misaligned
-  for (int i = 0; i < 540; i++) {
+  for (int i = 0; i < 540; i++) if (pne = gGeoManager->GetAlignableEntry(GetChName(i))) {
 
     // read misaligned and original matrices
 
-    TGeoPNEntry      *pne  = gGeoManager->GetAlignableEntry(GetChName(i));
-    if (!pne) AliError(Form("no such physical node entry: %s",GetChName(i)));
-    if (!pne) continue;
     TGeoPhysicalNode *node = pne->GetPhysicalNode();
     if (!node) AliError(Form("physical node entry %s has no physical node",GetChName(i)));
     if (!node) continue;
@@ -1204,13 +1199,15 @@ void AliTRDalignment::NumbersToAr(TClonesArray *ar)
   }
 
   for (int i = 0; i < 540; i++) {
-    new(alobj[nobj]) AliAlignObjParams(GetChName(i)
-                                      ,GetVoi(i)
-                                     ,fCh[i][0],fCh[i][1],fCh[i][2]
-                                     ,fCh[i][3],fCh[i][4],fCh[i][5]
-                                     ,0);
-    ((AliAlignObj *) alobj[nobj])->ApplyToGeometry();
-    nobj++;
+    if (gGeoManager->GetAlignableEntry(GetChName(i))) {
+      new(alobj[nobj]) AliAlignObjParams(GetChName(i)
+                                        ,GetVoi(i)
+                                        ,fCh[i][0],fCh[i][1],fCh[i][2]
+                                        ,fCh[i][3],fCh[i][4],fCh[i][5]
+                                        ,0);
+      ((AliAlignObj *) alobj[nobj])->ApplyToGeometry();
+      nobj++;
+    }
   }
   AliInfo("current geometry modified");