]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliAltroRawStreamOld.cxx
Fix for 64-bit platforms
[u/mrichter/AliRoot.git] / RAW / AliAltroRawStreamOld.cxx
index 6a6b9040fffe08372951ed1329552025b840740d..13d264bd3b306684ccf9b6e07f08e5458f960c74 100644 (file)
@@ -50,11 +50,6 @@ AliAltroRawStreamOld::AliAltroRawStreamOld(AliRawReader* rawReader) :
 {
 // create an object to read Altro raw digits
   fSegmentation[0] = fSegmentation[1] = fSegmentation[2] = -1;
-
-  // Invalid Common Data Header is used
-  // --> therefore skip the header and read
-  // only the payload
-  rawReader->RequireHeader(kFALSE);
 }
 
 //_____________________________________________________________________________
@@ -274,24 +269,20 @@ 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()-29]) << 24;
-  position |= (fData[fRawReader->GetDataSize()-30]) << 16;
-  position |= (fData[fRawReader->GetDataSize()-31]) << 8;
-  position |= (fData[fRawReader->GetDataSize()-32]);
+  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]);
   // 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() - 64) != position)
-    AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d words (in the RCU trailer)!",
-                 fRawReader->GetDataSize()-64,
+  if ((fRawReader->GetDataSize() - 4) != position)
+    AliFatal(Form("Inconsistent raw data size ! Expected %d bytes (from the header), found %d bytes (in the RCU trailer)!",
+                 fRawReader->GetDataSize()-4,
                  position));
 
-  // Skip the Common Data Header which contains
-  // only 7 (!) words
-  fData += 32;
-
   // Return the position in units of 10-bit words
   return position*8/10;
 }