]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixes need in order to use the raw-reader in HLT (Jochen)
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2007 11:24:31 +0000 (11:24 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 20 Nov 2007 11:24:31 +0000 (11:24 +0000)
RAW/AliRawReaderMemory.cxx
RAW/AliRawReaderMemory.h

index 710368232f7b56d24c71cf36447946d91c4c88e3..d8741c6ec949fc756680621fa5186940dc1e1785 100644 (file)
@@ -82,7 +82,10 @@ Bool_t AliRawReaderMemory::ReadHeader()
     
     // Check that the header is sane, that is the size does not go past the buffer.
     // Otherwise try again at the next word location.
-    if (fHeader->fSize == 0 or fPosition+fCount+fHeader->fSize > fBufferSize) {
+    if ( ( (fHeader->fSize == 0) || 
+          ((Int_t)fPosition + fCount + (Int_t)fHeader->fSize > (Int_t)fBufferSize ) ) 
+        && fHeader->fSize != 0xFFFFFFFF) {
+
       if (fPosition + sizeof(UInt_t) <= fBufferSize) {
         fPosition += sizeof(UInt_t);
         continue;
@@ -97,7 +100,7 @@ Bool_t AliRawReaderMemory::ReadHeader()
     if (fHeader->fSize != 0xFFFFFFFF) {
       fCount = fHeader->fSize - sizeof(AliRawDataHeader);
     } else {
-      fCount = fBufferSize - fPosition - sizeof(AliRawDataHeader);
+      fCount = fBufferSize - sizeof(AliRawDataHeader);
     }
   } while (!IsSelected());
 
index f0c5ca1e2f1d679dd33b9ea99adc28d279c278ff..40a82345f44e8668701b96f54e5ca11e07b8ea16 100644 (file)
@@ -41,7 +41,7 @@ class AliRawReaderMemory: public AliRawReader {
     virtual UInt_t   GetGDCId() const {return 0;};
     virtual UInt_t   GetTimestamp() const {return 0;};
 
-    virtual Int_t    GetEquipmentSize() const {return 0;};
+    virtual Int_t    GetEquipmentSize() const {return fBufferSize;};
     virtual Int_t    GetEquipmentType() const {return 0;};
     virtual Int_t    GetEquipmentId() const {return fEquipmentId;};
     virtual const UInt_t* GetEquipmentAttributes() const {return NULL;};
@@ -77,3 +77,4 @@ class AliRawReaderMemory: public AliRawReader {
 };
 
 #endif
+