+ pHLTOUT->WriteESD(pBuffer, size, dt, esd);
+ pHandler->ReleaseProcessedData(pBuffer, size);
+ }
+ pHLTOUT->MarkDataBlocksProcessed(&(*handler));
+ }
+
+ // process all kProprietary data blocks
+ for (handler=pProprietaryHandlers->begin(); handler!=pProprietaryHandlers->end() && iResult>=0; handler++) {
+ AliHLTOUT::AliHLTOUTSelectionGuard g(pHLTOUT, &(*handler));
+ AliHLTOUTHandler* pHandler=*handler;
+ const AliHLTUInt8_t* pBuffer=NULL;
+ AliHLTUInt32_t size=0;
+ pHandler->ProcessData(pHLTOUT);
+ if ((size=pHandler->GetProcessedData(pBuffer))>0) {
+ HLTWarning("data produced by kProprietary handler ignored");
+ pHandler->ReleaseProcessedData(pBuffer, size);
+ }
+ pHLTOUT->MarkDataBlocksProcessed(&(*handler));
+ }
+
+ // remove all empty handlers form the list (handlers which did not get a block this time)
+ AliHLTOUT::RemoveEmptyDuplicateHandlers(*pEsdHandlers);
+ AliHLTOUT::RemoveEmptyDuplicateHandlers(*pProprietaryHandlers);
+
+ return iResult;
+}
+
+int AliHLTSystem::ProcessHLTOUTkChain(AliHLTOUT* pHLTOUT)
+{
+ // see header file for class documentation
+ int iResult=0;
+ if (!pHLTOUT) return -EINVAL;
+
+ if (!fpChainHandlers)
+ fpChainHandlers=new AliHLTOUT::AliHLTOUTHandlerListEntryVector;
+
+ AliHLTOUT::AliHLTOUTHandlerListEntryVector* pChainHandlers=reinterpret_cast<AliHLTOUT::AliHLTOUTHandlerListEntryVector*>(fpChainHandlers);
+ if (!pChainHandlers) return -ENOMEM;
+
+ // invalidate all blocks
+ AliHLTOUT::InvalidateBlocks(*pChainHandlers);
+
+ // fill the list
+ pHLTOUT->FillHandlerList(*pChainHandlers, AliHLTModuleAgent::kChain);
+
+ // process all defined chain handlers
+ AliHLTOUT::AliHLTOUTHandlerListEntryVector::iterator chainHandler;
+ for (chainHandler=pChainHandlers->begin(); chainHandler!=pChainHandlers->end() && iResult>=0; chainHandler++) {
+ if (chainHandler->IsEmpty()) continue;
+ AliHLTOUT::AliHLTOUTSelectionGuard g(pHLTOUT, &(*chainHandler));
+ AliHLTOUTHandler* pHandler=*chainHandler;
+ const AliHLTUInt8_t* pBuffer=NULL;
+ AliHLTUInt32_t size=0;
+ pHandler->ProcessData(pHLTOUT);
+ if ((size=pHandler->GetProcessedData(pBuffer))>0) {
+ AliHLTModuleAgent::AliHLTOUTHandlerDesc desc=*chainHandler;
+ //AliHLTComponentDataType dt=desc;
+