]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
proper cleanup of HLTOUT at the end of the reconstruction for the case of inactive...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Apr 2012 11:06:32 +0000 (11:06 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 2 Apr 2012 11:06:32 +0000 (11:06 +0000)
HLT/rec/AliHLTReconstructor.cxx

index de24f0d9f23757bc7cddd36715872ba76d2021e2..797214f3ec82018433a20aaa846a5c3f14b20cc6 100644 (file)
@@ -214,6 +214,20 @@ void AliHLTReconstructor::Terminate() const
   if (fpPluginBase) {
     AliHLTSystem* pSystem=fpPluginBase->GetInstance();
     if (pSystem) {
+      // 2012-04-02
+      // clean up the HLTOUT instance if still existing, currently FinishEvent
+      // is not called at the end of the event processing and the cleanup
+      // needs to be done here to avoid a warning message. Later it can be
+      // declared a malfunction if the HLTOUT instance is still existing at
+      // this point.
+      AliHLTOUT* pHLTOUT=NULL;
+      pSystem->InvalidateHLTOUT(&pHLTOUT);
+      if (pHLTOUT) {
+       pHLTOUT->Reset();
+       delete pHLTOUT;
+       pHLTOUT=NULL;
+      }
+
       AliDebug(0, Form("terminate HLT system: status %#x", pSystem->GetStatusFlags()));
       if (pSystem->CheckStatus(AliHLTSystem::kStarted)) {
        // send specific 'event' to execute the stop sequence