]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpRegionalTrigger.cxx
Fix in AliMpSectorSegmentation::PadByPosition;
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpRegionalTrigger.cxx
index 3f0dbfabc9326b380a33b9544c236ec13eaeafef..ee1bf4d8b279c3afe8e4cbadf755ecd10aba2ba6 100644 (file)
@@ -119,6 +119,7 @@ Bool_t AliMpRegionalTrigger::ReadData(istream& in)
   TArrayI listInt;
   UShort_t crateId;
   Int_t nofBoards;
+  Int_t localBoardIndex(0);
   char line[80];
  
   // decode file and store in objects
@@ -188,10 +189,17 @@ Bool_t AliMpRegionalTrigger::ReadData(istream& in)
         board->SetTC(listInt[4]);
         
         // add local board into array
-        fLocalBoardArray.AddAt(board,board->GetId());
+        fLocalBoardArray.AddAt(board,localBoardIndex);
         fLocalBoardMap.Add(board->GetId(),board);
+      
+      ++localBoardIndex;
     }
   }
+
+  AliDebug(1,Form("%d trigger crate created",fTriggerCrates.GetSize()));
+  AliDebug(1,Form("%d local board added to the map",fLocalBoardMap.GetSize()));
+  AliDebug(1,Form("%d local board referenced from the array",fLocalBoardArray.GetLast()+1));
+  
   return kTRUE;
 }  
 
@@ -281,7 +289,7 @@ Int_t AliMpRegionalTrigger::GetNofLocalBoards() const
 { 
     /// Return number of local boards
     
-    return fLocalBoardArray.GetSize()
+    return fLocalBoardArray.GetLast()+1
 }
 
 //______________________________________________________________________________