- unsigned int offset=sizeof(AliHLTOUTEventHeader);
- const AliRawDataHeader* pCDH=fpRawreader->GetDataHeader();
- AliHLTUInt32_t id=(fpRawreader->GetEquipmentId());
- AliHLTUInt32_t statusFlags=pCDH->GetStatus();
- 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 missmatch, header %d, but buffer is %d", id, pHLTHeader->fLength, size);
- return NULL;
- }
-
- // determine the offset of the homer block
- // the HLT header is mandatory, HLT decision and HLT
- // payload are optional. HLT decision is always before HLT
- // payload if existent.
- if (statusFlags&(0x1<<kCDHFlagsHLTDecision)) {
- // the block contains HLT decision data, this is just
- // skipped here
- AliHLTUInt32_t* pDecisionLen=reinterpret_cast<AliHLTUInt32_t*>(pSrc+offset);
- if ((*pDecisionLen)*sizeof(AliHLTUInt32_t)+offset<size) {
- // the first 32bit word specifies the number of 32bit words in the
- // decision block -> +1 for this length word
- offset+=((*pDecisionLen)+1)*sizeof(AliHLTUInt32_t);
- } else {
- HLTWarning("size missmatch: HLT decision block bigger than total block length, skipping ...");
- return NULL;
- }
- }
-
- // check if there is payload
- if (!(statusFlags&(0x1<<kCDHFlagsHLTPayload))) return NULL;