]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
better estimation of output data size
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Nov 2008 13:12:48 +0000 (13:12 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Nov 2008 13:12:48 +0000 (13:12 +0000)
HLT/BASE/util/AliHLTCompStatCollector.cxx

index 99d9d6ca006b9af6316d719294b4f8e474daecd4..e28d353bf1f53caff759e76ace56d9cb568d7e86 100644 (file)
@@ -336,12 +336,14 @@ int AliHLTCompStatCollector::DoEvent( const AliHLTComponentEventData& /*evtData*
     iResult=1;
   }
 
+  int totalOutputSize=0;
   if (iResult>0) {
     fNofSets=fPosition;
     fpStatTree->Fill();
-    if (!bEmbeddedTree && ((iResult=PushBack(fpStatTree, kAliHLTDataTypeTTree|kAliHLTDataOriginOut))==-ENOSPC)) {
-      fSizeEstimator+=GetLastObjectSize();
+    if (!bEmbeddedTree) {
+      iResult=PushBack(fpStatTree, kAliHLTDataTypeTTree|kAliHLTDataOriginOut);
     }
+    totalOutputSize+=GetLastObjectSize();
 
     // init the timer for the next cycle
     if (!fpTimer)  fpTimer=new TStopwatch;
@@ -352,9 +354,11 @@ int AliHLTCompStatCollector::DoEvent( const AliHLTComponentEventData& /*evtData*
   }
 
   if (iResult>=0 /*&& eventType==gkAliEventTypeEndOfRun*/) {
-    if ((iResult=PushBack(fpFolder, kAliHLTDataTypeTObject|kAliHLTDataOriginOut))==-ENOSPC) {
-      fSizeEstimator+=GetLastObjectSize();
-    }
+    iResult=PushBack(fpFolder, kAliHLTDataTypeTObject|kAliHLTDataOriginOut);
+    totalOutputSize+=GetLastObjectSize();
+  }
+  if (iResult==-ENOSPC) {
+    fSizeEstimator+=totalOutputSize;
   }
 
   if (iResult>0) iResult=0;