]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
HLTOUTTask now added at the end of Recontruct instead of beginning of ProcessHLTOUT...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Aug 2011 13:09:30 +0000 (13:09 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 9 Aug 2011 13:09:30 +0000 (13:09 +0000)
HLT/BASE/AliHLTSystem.cxx

index 8f5c5e7b480ba8284afb0f08e20aecf040cb44f4..cfb05fab6ca1a20417e853cef86c53bc9bc451bf 100644 (file)
@@ -844,6 +844,24 @@ int AliHLTSystem::Reconstruct(int nofEvents, AliRunLoader* runLoader,
        if ((iResult=Run(nofEvents, 0, trgMask, timestamp, eventtype))<0) SetStatusFlags(kError);
       }
       }
+
+      // add the current HLTOUT task to the collection
+      if (fpHLTOUTTask) {
+       AliHLTOUT* pTask=dynamic_cast<AliHLTOUT*>(fpHLTOUTTask);
+       if (pTask && (iResult=pTask->Init())>=0) {
+         if (pTask->GetNofDataBlocks()>0) {
+           AliHLTOUT* pHLTOUT=RequestHLTOUT();
+           if (pHLTOUT) {
+             pHLTOUT->AddSubCollection(pTask);
+           } else {
+             HLTWarning("no HLTOUT instance available, output blocks of the chain are ignored");
+           }
+         }
+       } else {
+         HLTWarning("can not initialize HLTOUT sub collection %s for reconstruction chain (%d), data blocks are lost", pTask?fpHLTOUTTask->GetName():"nil", iResult);
+         iResult=0;
+       }
+      }
     } else {
       HLTError("wrong state %#x, required flags %#x", GetStatusFlags(), kReady);
     }
@@ -875,20 +893,6 @@ int AliHLTSystem::ProcessHLTOUT(AliHLTOUT* pHLTOUT, AliESDEvent* esd)
   if (!pHLTOUT) return -EINVAL;
   HLTDebug("processing %d HLT data blocks", pHLTOUT->GetNofDataBlocks());
 
-  // add the current HLTOUT task to the collection
-  if (fpHLTOUTTask) {
-    AliHLTOUT* pTask=dynamic_cast<AliHLTOUT*>(fpHLTOUTTask);
-    if (pTask && (iResult=pTask->Init())>=0) {
-      if (pTask->GetNofDataBlocks()>0) {
-       pHLTOUT->AddSubCollection(pTask);
-      }
-    } else {
-      HLTWarning("can not initialize HLTOUT sub collection %s for reconstruction chain (%d), data blocks are lost", pTask?fpHLTOUTTask->GetName():"nil", iResult);
-      iResult=0;
-    }
-  }
-
-  
   //
   // process all kChain handlers first
   //