// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
}
-void* AliHLTDataSource::fgpSpecialEvent=NULL;
-int AliHLTDataSource::fgSpecialEventSize=0;
-AliHLTComponentDataType AliHLTDataSource::fgSpecialEventDataType=kAliHLTVoidDataType;
-AliHLTUInt32_t AliHLTDataSource::fgSpecialEventSpecification=kAliHLTVoidDataSpec;
-
AliHLTDataSource::~AliHLTDataSource()
{
// see header file for class documentation
int AliHLTDataSource::DoProcessing( const AliHLTComponentEventData& evtData,
- const AliHLTComponentBlockData* /*blocks*/,
+ const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData,
AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size,
// see header file for class documentation
int iResult=0;
if (evtData.fBlockCnt > 0) {
- HLTWarning("Data source component skips input data blocks");
- }
- if (fgpSpecialEvent==NULL || fgSpecialEventSize==0) {
- // normal event publishing
- iResult=GetEvent(evtData, trigData, outputPtr, size, outputBlocks);
- HLTDebug("component %s (%p) GetEvent finished (%d)", GetComponentID(), this, iResult);
- } else {
- // publish special event
- if (size>=(unsigned)fgSpecialEventSize) {
- memcpy(outputPtr, fgpSpecialEvent, fgSpecialEventSize);
- AliHLTComponentBlockData bd;
- FillBlockData(bd);
- bd.fOffset=0;
- bd.fSize=fgSpecialEventSize;
- bd.fDataType=fgSpecialEventDataType;
- bd.fSpecification=fgSpecialEventSpecification;
- outputBlocks.push_back(bd);
- size=bd.fSize;
- } else {
- iResult=-ENOSPC;
+ int unknown=-1;
+ for (unsigned int block; block<evtData.fBlockCnt; block++) {
+ if (blocks[block].fDataType==kAliHLTDataTypeSOR ||
+ blocks[block].fDataType==kAliHLTDataTypeEOR ||
+ blocks[block].fDataType==kAliHLTDataTypeEvent) {
+ continue;
+ }
+ unknown=block;
+ break;
+ }
+ if (unknown>=0) {
+ HLTWarning("Data source component skips input data blocks: first unknown block %s",
+ DataType2Text(blocks[unknown].fDataType).c_str());
}
}
+ iResult=GetEvent(evtData, trigData, outputPtr, size, outputBlocks);
+ HLTDebug("component %s (%p) GetEvent finished (%d)", GetComponentID(), this, iResult);
edd = NULL;
return iResult;
}
int AliHLTDataSource::GetEvent( const AliHLTComponentEventData& evtData,
AliHLTComponentTriggerData& trigData,
AliHLTUInt8_t* /*outputPtr*/,
- AliHLTUInt32_t& /*size*/,
+ AliHLTUInt32_t& size,
vector<AliHLTComponentBlockData>& /*outputBlocks*/ )
{
// we just forward to the high level method, all other parameters already
// have been stored internally
+ size=0;
return GetEvent(evtData, trigData);
}
HLTFatal("no processing method implemented");
return -ENOSYS;
}
-
-AliHLTDataSource::AliSpecialEventGuard::AliSpecialEventGuard(AliHLTRunDesc* pDesc, AliHLTComponentDataType dt, AliHLTUInt32_t spec)
-{
- AliHLTDataSource::fgpSpecialEvent=pDesc;
- AliHLTDataSource::fgSpecialEventSize=sizeof(AliHLTRunDesc);
- AliHLTDataSource::fgSpecialEventDataType=dt;
- AliHLTDataSource::fgSpecialEventSpecification=spec;
-}
-
-AliHLTDataSource::AliSpecialEventGuard::~AliSpecialEventGuard()
-{
- AliHLTDataSource::fgpSpecialEvent=NULL;
- AliHLTDataSource::fgSpecialEventSize=0;
- AliHLTDataSource::fgSpecialEventDataType=kAliHLTVoidDataType;
- AliHLTDataSource::fgSpecialEventSpecification=kAliHLTVoidDataSpec;
-}