]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: doing a proper cleanup if the event processing failed. The DigitReader was...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Jul 2009 13:09:14 +0000 (13:09 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Jul 2009 13:09:14 +0000 (13:09 +0000)
the global instance of the decoder not released. Subsequent CF cycles could not get the decoder
instance. Further investigation is needed to spot the condition which lead to the error (not enough
space in output buffer.

HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx

index a3f8049546edb6764bafbeed5fe5f9bd73eb4a8c..405459b307d4476d5d34c049debc78c9eb847b4d 100644 (file)
@@ -304,6 +304,7 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
                                              vector<AliHLTComponentBlockData>& outputBlocks )
 {
   // see header file for class documentation
+  int iResult=0;
 
   if(fReader == NULL){
     HLTFatal("Digit reader not initialized, skipping HLT TPC cluster reconstruction.");
@@ -398,6 +399,7 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
        fClusterFinder->Read(iter->fPtr, iter->fSize );
        fClusterFinder->ProcessDigits();
       }
+      fReader->Reset();
 
       realPoints = fClusterFinder->GetNumberOfClusters();
        
@@ -426,7 +428,8 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
          Logging( kHLTLogFatal, "HLT::TPCClusterFinder::DoEvent", "Too much data", 
                   "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.",
                   tSize, size );
-         return -ENOSPC;
+         iResult=-ENOSPC;
+         break;
        }
        
       if(fUnsorted && fGetActivePads){
@@ -461,13 +464,12 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
        tSize+=nMCInfo*sizeof(AliHLTTPCClusterFinder::ClusterMCInfo);
 
       }
-
-      fReader->Reset();
     }
-    
-  size = tSize;
 
-  return 0;
+  if (iResult>=0)
+    size = tSize;
+
+  return iResult;
 }
 
 int AliHLTTPCClusterFinderComponent::Configure(const char* arguments){