From 587c9cf9d629fe06f3b0dbd192ef27244d1c49c8 Mon Sep 17 00:00:00 2001 From: richterm Date: Thu, 7 Aug 2008 13:07:08 +0000 Subject: [PATCH] handling of steering events - protection added in GetEvent to process data events only - AliHLTCompStatCollector: publishing of data set only if component statistics block is available --- HLT/BASE/util/AliHLTCompStatCollector.cxx | 17 ++++++++++------- HLT/BASE/util/AliHLTEsdCollectorComponent.cxx | 2 +- HLT/BASE/util/AliHLTFilePublisher.cxx | 4 ++++ .../util/AliHLTLoaderPublisherComponent.cxx | 4 ++++ HLT/BASE/util/AliHLTOUTPublisherComponent.cxx | 4 ++++ .../util/AliHLTRawReaderPublisherComponent.cxx | 4 ++++ 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/HLT/BASE/util/AliHLTCompStatCollector.cxx b/HLT/BASE/util/AliHLTCompStatCollector.cxx index 226cda1d41d..45c988a0004 100644 --- a/HLT/BASE/util/AliHLTCompStatCollector.cxx +++ b/HLT/BASE/util/AliHLTCompStatCollector.cxx @@ -184,21 +184,24 @@ int AliHLTCompStatCollector::DoEvent( const AliHLTComponentEventData& /*evtData* fpSpecArray[current]=pBlock->fSpecification; fpBlockNoArray[current]=blockNo; } + // indicate availability of component statistic block + iResult=1; } - if (iResult>=0) { + if (iResult>0) { fNofSets=fPosition; fpStatTree->Fill(); iResult=PushBack(fpStatTree, kAliHLTDataTypeTTree); - } - // init the timer for the next cycle - if (!fpTimer) fpTimer=new TStopwatch; - if (fpTimer) { - fpTimer->Reset(); - fpTimer->Start(); + // init the timer for the next cycle + if (!fpTimer) fpTimer=new TStopwatch; + if (fpTimer) { + fpTimer->Reset(); + fpTimer->Start(); + } } + if (iResult>0) iResult=-1; return iResult; } diff --git a/HLT/BASE/util/AliHLTEsdCollectorComponent.cxx b/HLT/BASE/util/AliHLTEsdCollectorComponent.cxx index c7ba03042cf..c9875d73235 100644 --- a/HLT/BASE/util/AliHLTEsdCollectorComponent.cxx +++ b/HLT/BASE/util/AliHLTEsdCollectorComponent.cxx @@ -92,7 +92,7 @@ int AliHLTEsdCollectorComponent::DumpEvent( const AliHLTComponentEventData& /*ev pBlock=GetNextInputBlock()) { if (pBlock->fDataType!=kAliHLTDataTypeESDObject && pBlock->fDataType!=kAliHLTDataTypeESDTree) continue; - HLTInfo("writing ESD, data type %s", (DataType2Text(pBlock->fDataType).c_str())); + HLTInfo("writing ESD, data type %s event %d", (DataType2Text(pBlock->fDataType).c_str()), GetEventCount()); iResult=fpManager->WriteESD(reinterpret_cast(pBlock->fPtr), pBlock->fSize, pBlock->fDataType, NULL, GetEventCount()); } diff --git a/HLT/BASE/util/AliHLTFilePublisher.cxx b/HLT/BASE/util/AliHLTFilePublisher.cxx index 0862266ccc2..caaeb91fde7 100644 --- a/HLT/BASE/util/AliHLTFilePublisher.cxx +++ b/HLT/BASE/util/AliHLTFilePublisher.cxx @@ -328,6 +328,10 @@ int AliHLTFilePublisher::GetEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentBlockDataList& outputBlocks ) { // see header file for class documentation + + // process data events only + if (!IsDataEvent()) return 0; + int iResult=0; TObjLink *lnk=fpCurrent; if (lnk==NULL) lnk=fEvents.FirstLink(); diff --git a/HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx b/HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx index a61a66fd4c2..ea8905704a1 100644 --- a/HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx +++ b/HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx @@ -200,6 +200,10 @@ int AliHLTLoaderPublisherComponent::GetEvent(const AliHLTComponentEventData& /*e AliHLTComponentTriggerData& /*trigData*/) { // see header file for class documentation + + // process data events only + if (!IsDataEvent()) return 0; + int iResult=0; // fetch runLoader instance from interface AliRunLoader* pRunLoader=GetRunLoader(); diff --git a/HLT/BASE/util/AliHLTOUTPublisherComponent.cxx b/HLT/BASE/util/AliHLTOUTPublisherComponent.cxx index 449ad080350..502aeaddda7 100644 --- a/HLT/BASE/util/AliHLTOUTPublisherComponent.cxx +++ b/HLT/BASE/util/AliHLTOUTPublisherComponent.cxx @@ -195,6 +195,10 @@ int AliHLTOUTPublisherComponent::GetEvent( const AliHLTComponentEventData& /*evt { // see header file for class documentation int iResult=0; + + // process data events only + if (!IsDataEvent()) return 0; + unsigned int offset=0; AliHLTOUT* pHLTOUT=NULL; AliRawReader* pRawReader=GetRawReader(); diff --git a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx index 863f1934f80..16fe5de12ba 100644 --- a/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx +++ b/HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx @@ -222,6 +222,10 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData& { // see header file for class documentation int iResult=0; + + // process data events only + if (!IsDataEvent()) return 0; + unsigned int offset=0; assert(outputPtr!=NULL || size==0); AliRawReader* pRawReader=GetRawReader(); -- 2.43.0