Supress MC output block when it is empty (bug https://savannah.cern.ch/bugs/?73685)
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Oct 2010 12:10:08 +0000 (12:10 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 8 Oct 2010 12:10:08 +0000 (12:10 +0000)
HLT/ITS/tracking/AliHLTITSTrackerComponent.cxx

index 4d08ddc..56d7d14 100644 (file)
@@ -573,14 +573,15 @@ int AliHLTITSTrackerComponent::DoEvent
       currOutLabel++;
       outPtr->fCount++;
     }        
-    
-    AliHLTComponentBlockData resultData;
-    FillBlockData( resultData );
-    resultData.fOffset = size;
-    resultData.fSize = blockSize;
-    resultData.fDataType = kAliHLTDataTypeTrackMC|kAliHLTDataOriginITS;
-    outputBlocks.push_back( resultData );
-    size+= resultData.fSize;
+    if( iResult>=0 && outPtr->fCount>0 ){
+      AliHLTComponentBlockData resultData;
+      FillBlockData( resultData );
+      resultData.fOffset = size;
+      resultData.fSize = blockSize;
+      resultData.fDataType = kAliHLTDataTypeTrackMC|kAliHLTDataOriginITS;
+      outputBlocks.push_back( resultData );
+      size+= resultData.fSize;
+    }
   }
   
   fBenchmark.Stop(0);