]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Old Altro and TPC raw stream modified in a way that they work with the TPC cosmic...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 May 2006 08:34:49 +0000 (08:34 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 May 2006 08:34:49 +0000 (08:34 +0000)
RAW/AliAltroRawStreamOld.cxx
TPC/AliTPCRawStreamOld.cxx

index 47a416c87562583495488a985326e323dcd5a7e7..6a6b9040fffe08372951ed1329552025b840740d 100644 (file)
@@ -274,23 +274,23 @@ Int_t AliAltroRawStreamOld::GetPosition()
 
   // Get the payload size from the RCU trailer
   // The trailer is actually one 32-bit word
-  Int_t position = (fData[fRawReader->GetDataSize()-1]) << 24;
-  position |= (fData[fRawReader->GetDataSize()-2]) << 16;
-  position |= (fData[fRawReader->GetDataSize()-3]) << 8;
-  position |= (fData[fRawReader->GetDataSize()-4]);
+  Int_t position = (fData[fRawReader->GetDataSize()-29]) << 24;
+  position |= (fData[fRawReader->GetDataSize()-30]) << 16;
+  position |= (fData[fRawReader->GetDataSize()-31]) << 8;
+  position |= (fData[fRawReader->GetDataSize()-32]);
   // The size is specified in a number of 40bits
   // Therefore we need to transform it to number of bytes
   position *= 5;
 
   // Check the consistency of the header and trailer
-  if ((fRawReader->GetDataSize() - 32) != position)
+  if ((fRawReader->GetDataSize() - 64) != position)
     AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d words (in the RCU trailer)!",
-                 fRawReader->GetDataSize()-32,
+                 fRawReader->GetDataSize()-64,
                  position));
 
   // Skip the Common Data Header which contains
   // only 7 (!) words
-  fData += 28;
+  fData += 32;
 
   // Return the position in units of 10-bit words
   return position*8/10;
index a82276d40104d5309f10924deaa156058e06f854..72b8bc794de7b8f0dea39c83fe516f799ecf9827 100644 (file)
@@ -126,7 +126,29 @@ void AliTPCRawStreamOld::ApplyAltroMapping()
   // Take the DDL index, load
   // the corresponding altro mapping
   // object and fill the sector,row and pad indeces
-  Int_t ddlNumber = GetDDLNumber()-228;
+  Int_t ddlNumber = GetDDLNumber();
+  switch (ddlNumber) {
+    case 152:
+      ddlNumber = 74;
+      break;
+    case 153:
+      ddlNumber = 75;
+      break;
+    case 253:
+      ddlNumber = 0;
+      break;
+    case 0:
+      ddlNumber = 73;
+      break;
+    case 1:
+      ddlNumber = 1;
+      break;
+    case 5:
+      ddlNumber = 72;
+      break;
+    default:
+      break;
+  }
   Int_t patchIndex;
   if (ddlNumber < 72) {
     fSector = ddlNumber / 2;