// and from v4-10-Release (Rev-02). For the moment we select directly
// to support older AliRoot versions
//Select("HLT");
- SelectEquipment(0,7680, 7689);
+ SelectEquipment(-1,7680, 7689);
UChar_t* pSrc=NULL;
while (ReadNextData(pSrc) && pSrc!=NULL && iResult>=0) {
AliHLTUInt32_t id=(GetEquipmentId());
AliHLTOUTEventHeader* pHLTHeader=reinterpret_cast<AliHLTOUTEventHeader*>(pSrc);
// consistency check for the block size
- if (pHLTHeader->fLength!=size) {
- HLTWarning("can not treat HLT data block %d: size mismatch, header %d, but buffer is %d", id, pHLTHeader->fLength, size);
+ if (pHLTHeader->fLength>size) {
+ HLTError("can not treat HLT data block %d: size mismatch, header %d, but buffer is %d", id, pHLTHeader->fLength, size);
return NULL;
+ } else if (pHLTHeader->fLength<size-3) {
+ // data payload is aligned to 32bit, so there can be a difference by at most 3 bytes
+ HLTWarning("size mismatch in HLT data block %d: header %d, but buffer is %d", id, pHLTHeader->fLength, size);
}
// determine the offset of the homer block
if (!(statusFlags&(0x1<<kCDHFlagsHLTPayload))) return NULL;
// continue if there is no data left in the buffer
- if (offset>=size) {
+ if (offset>=pHLTHeader->fLength) {
HLTWarning("no HLT payload available, but bit is set, skipping ...");
return NULL;
}
return NULL;
}
- return fpManager->OpenReaderBuffer(pSrc+offset, size-offset);
+ AliHLTUInt64_t eventId=pHLTHeader->fEventIDHigh;
+ eventId = eventId<<32;
+ eventId|=pHLTHeader->fEventIDLow;
+ SetEventId(eventId);
+ return fpManager->OpenReaderBuffer(pSrc+offset, pHLTHeader->fLength-offset);
}
int AliHLTOUTHomerCollection::WriteESD(const AliHLTUInt8_t* pBuffer, AliHLTUInt32_t size, AliHLTComponentDataType dt, AliESDEvent* tgtesd) const