]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: reset of sub-collection flag
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jul 2008 19:37:59 +0000 (19:37 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jul 2008 19:37:59 +0000 (19:37 +0000)
HLT/BASE/AliHLTOUT.cxx

index 292539bcd136da26d166eeba9dec421d0dd825ae..bc90ff2e4d0f45013d03382c9bf48f3fb1ba113a 100644 (file)
@@ -738,7 +738,11 @@ int AliHLTOUT::AddSubCollection(AliHLTOUT* pCollection)
     iResult++;
   }
   if (iResult>0) {
-    pCollection->SetStatusFlag(kIsSubCollection);
+    if (CheckStatusFlag(kIsSubCollection)) {
+      fLog.LoggingVarargs(kHLTLogWarning, "AliHLTOUT", "AddSubCollection" , __FILE__ , __LINE__ , "HLTOUT object %p has already been added as sub-collection", pCollection);
+    } else {
+      pCollection->SetStatusFlag(kIsSubCollection);
+    }
   }
   ClearStatusFlag(kCollecting);  
 
@@ -759,6 +763,7 @@ int AliHLTOUT::ReleaseSubCollection(AliHLTOUT* pCollection)
     }
     block++;
   }
+  pCollection->ClearStatusFlag(kIsSubCollection);
 
   return iResult;
 }
@@ -781,8 +786,10 @@ int AliHLTOUT::Reset()
   }
 
   for (AliHLTOUTPVector::iterator collection=subCollections.begin(); 
-       collection!=subCollections.end(); collection++)
+       collection!=subCollections.end(); collection++) {
     (*collection)->Reset();
+    (*collection)->ClearStatusFlag(kIsSubCollection);
+  }
 
   ResetInput();