From 285aba1798b12994193c39ae0f98a54006220298 Mon Sep 17 00:00:00 2001 From: richterm Date: Fri, 18 Nov 2011 07:04:26 +0000 Subject: [PATCH] publishing histograms at EOD; bugfix for ignoring empty events --- .../AliHLTTPCDataCompressionMonitorComponent.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/HLT/TPCLib/comp/AliHLTTPCDataCompressionMonitorComponent.cxx b/HLT/TPCLib/comp/AliHLTTPCDataCompressionMonitorComponent.cxx index d9f0b964ef0..1849dd7eb2d 100644 --- a/HLT/TPCLib/comp/AliHLTTPCDataCompressionMonitorComponent.cxx +++ b/HLT/TPCLib/comp/AliHLTTPCDataCompressionMonitorComponent.cxx @@ -130,7 +130,13 @@ int AliHLTTPCDataCompressionMonitorComponent::DoEvent( const AliHLTComponentEven /// inherited from AliHLTProcessor: data processing int iResult=0; - if (!IsDataEvent()) return 0; + AliHLTUInt32_t eventType=gkAliEventTypeUnknown; + if (!IsDataEvent(&eventType)) { + if (eventType==gkAliEventTypeEndOfRun && fPublishingMode!=kPublishOff) { + iResult=Publish(fPublishingMode); + } + return iResult; + } const AliHLTComponentBlockData* pDesc=NULL; unsigned rawDataSize=0; @@ -157,7 +163,7 @@ int AliHLTTPCDataCompressionMonitorComponent::DoEvent( const AliHLTComponentEven AliHLTUInt8_t* pData=reinterpret_cast(pDesc->fPtr); pData+=sizeof(AliRawDataHeader); if (fpHWClusterDecoder->Init(pData, pDesc->fSize-sizeof(AliRawDataHeader))<0 || - (fpHWClusterDecoder->CheckVersion()<0 && (int)pDesc->fSize>fpHWClusterDecoder->GetRCUTrailerSize())) { + (fpHWClusterDecoder->CheckVersion()<0 && (int)(pDesc->fSize-sizeof(AliRawDataHeader))>fpHWClusterDecoder->GetRCUTrailerSize())) { HLTError("data block of type %s corrupted: can not decode format", AliHLTComponent::DataType2Text(pDesc->fDataType).c_str()); } else { @@ -250,7 +256,7 @@ int AliHLTTPCDataCompressionMonitorComponent::DoEvent( const AliHLTComponentEven } if ((fFlags&kHaveHWClusters)!=0 && (fFlags&kHaveRawData)!=0) { - if (rawDataSize!=rawEventSizeFromRCUtrailer) { + if (rawDataSize!=rawEventSizeFromRCUtrailer && rawEventSizeFromRCUtrailer>0) { HLTError("got different raw event size from raw data and rcu trailer: raw %d, rcu trailer %d", rawDataSize, rawEventSizeFromRCUtrailer); } } -- 2.43.0