Do not create an equipment object in case of SOR/EOR events without a payload
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Aug 2006 14:38:30 +0000 (14:38 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Aug 2006 14:38:30 +0000 (14:38 +0000)
RAW/AliMDC.cxx

index 58ca8a7..879d005 100644 (file)
@@ -338,13 +338,14 @@ Int_t AliMDC::ProcessEvent(void* event, Bool_t isIovecArray)
        }
 
       } else {  // Read only raw data but no equipment header
-       AliRawEquipment &equipment = *subEvent->NextEquipment();
-       AliRawData &subRaw = *equipment.GetRawData();
-       if ((status = ReadRawData(subRaw, rawSize, data)) != rawSize) {
-         return kErrEquipment;
+       if (rawSize) {
+         AliRawEquipment &equipment = *subEvent->NextEquipment();
+         AliRawData &subRaw = *equipment.GetRawData();
+         if ((status = ReadRawData(subRaw, rawSize, data)) != rawSize) {
+           return kErrEquipment;
+         }
+         toRead  -= rawSize;
        }
-       toRead  -= rawSize;
-
       }
 
       nsub++;