return iSpec;
}
+int AliHLTComponent::Forward(const TObject* pObject)
+{
+ // see header file for function documentation
+ int iResult=0;
+ int idx=fCurrentInputBlock;
+ if (pObject) {
+ if (fpInputObjects==NULL || (idx=fpInputObjects->IndexOf(pObject))>=0) {
+ } else {
+ HLTError("unknown object %p", pObject);
+ iResult=-ENOENT;
+ }
+ }
+ if (idx>=0) {
+ fOutputBlocks.push_back(fpInputBlocks[idx]);
+ }
+ return iResult;
+}
+
+int AliHLTComponent::Forward(const AliHLTComponentBlockData* pBlock)
+{
+ // see header file for function documentation
+ int iResult=0;
+ int idx=fCurrentInputBlock;
+ if (pBlock) {
+ if (fpInputObjects==NULL || (idx=FindInputBlock(pBlock))>=0) {
+ } else {
+ HLTError("unknown Block %p", pBlock);
+ iResult=-ENOENT;
+ }
+ }
+ if (idx>=0) {
+ // check for fpInputBlocks pointer done in FindInputBlock
+ fOutputBlocks.push_back(fpInputBlocks[idx]);
+ }
+ return iResult;
+}
+
const AliHLTComponentBlockData* AliHLTComponent::GetFirstInputBlock(const AliHLTComponentDataType& dt)
{
// see header file for function documentation
*/
AliHLTUInt32_t GetSpecification(const AliHLTComponentBlockData* pBlock=NULL);
+ /**
+ * Forward an input object to the output.
+ * Forward the input block of an object previously fetched via
+ * GetFirstInputObject/NextInputObject or the last one if no object
+ * specified.
+ * The block descriptor of the input block is forwarded to the
+ * output block list.
+ * @param pObject pointer to TObject
+ * @return neg. error code if failed
+ */
+ int Forward(const TObject* pObject);
+
+ /**
+ * Forward an input block to the output.
+ * Forward the input block fetched via GetFirstInputObject/
+ * NextInputBlock or the last one if no block specified.
+ * The block descriptor of the input block is forwarded to the
+ * output block list.
+ * @param pBlock pointer to input block
+ * @return neg. error code if failed
+ */
+ int Forward(const AliHLTComponentBlockData* pBlock=NULL);
+
/**
* Insert an object into the output.
* If header is specified, it will be inserted before the root object,
{
// see header file for class documentation
int iResult=0;
- for (int n=0; n<(int)evtData.fBlockCnt; n++ ) {
- if (IsSelected(blocks[n])) {
- HLTDebug("block %d type %s %#x (ptr=%p offset=%d size=%d) selected by filter rules",
- n, DataType2Text(blocks[n].fDataType).c_str(), blocks[n].fSpecification,
- blocks[n].fPtr, blocks[n].fOffset, blocks[n].fSize);
- outputBlocks.push_back(blocks[n]);
+ for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock();
+ pBlock!=NULL;
+ pBlock=GetNextInputBlock()) {
+ if (IsSelected(*pBlock)) {
+ HLTDebug("block type %s %#x (ptr=%p offset=%d size=%d) selected by filter rules",
+ DataType2Text(pBlock->fDataType).c_str(), pBlock->fSpecification,
+ pBlock->fPtr, pBlock->fOffset, pBlock->fSize);
+ Forward();
} else {
- HLTDebug("block %d type %s %#x discarded by filter rules", n, DataType2Text(blocks[n].fDataType).c_str(), blocks[n].fSpecification);
+ HLTDebug("block type %s %#x discarded by filter rules", DataType2Text(pBlock->fDataType).c_str(), pBlock->fSpecification);
}
}
+// for (int n=0; n<(int)evtData.fBlockCnt; n++ ) {
+// if (IsSelected(blocks[n])) {
+// HLTDebug("block %d type %s %#x (ptr=%p offset=%d size=%d) selected by filter rules",
+// n, DataType2Text(blocks[n].fDataType).c_str(), blocks[n].fSpecification,
+// blocks[n].fPtr, blocks[n].fOffset, blocks[n].fSize);
+// outputBlocks.push_back(blocks[n]);
+// } else {
+// HLTDebug("block %d type %s %#x discarded by filter rules", n, DataType2Text(blocks[n].fDataType).c_str(), blocks[n].fSpecification);
+// }
+// }
size=0;
return iResult;
}