Fix for infinite loop.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Nov 2010 13:03:08 +0000 (13:03 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 10 Nov 2010 13:03:08 +0000 (13:03 +0000)
HLT/programs/print-RAW-HLTdecision.C

index 85d5922..3cc19f6 100644 (file)
@@ -69,24 +69,24 @@ void print_RAW_HLTdecision(const char* rawFileName,
       break;
     }
     bool found=false;
-    do {
-      TObject* decision=NULL;
-      // in the original implementation, the GlobalTriggerDecision has been
-      // sent with data type kAliHLTDataTypeTObject, thats why we check for
-      // both
-      if (pHLTOUT->SelectFirstDataBlock(kAliHLTDataTypeGlobalTrigger)>=0 ||
-         pHLTOUT->SelectFirstDataBlock(kAliHLTDataTypeTObject)>=0) {
-       decision=pHLTOUT->GetDataObject();
-      }
-      if (decision) {
-       if (decision->IsA() == AliHLTGlobalTriggerDecision::Class()) {
-         cout << "HLT Global Trigger: " << decision->GetOption() << "   " << decision->GetTitle() << endl;
-         decision->Print();
-         found=true;
-       }
-       pHLTOUT->ReleaseDataObject(decision);
-      }
-    } while (!found && pHLTOUT->SelectNextDataBlock());
+    
+    // in the original implementation, the GlobalTriggerDecision has been
+    // sent with data type kAliHLTDataTypeTObject, thats why we check for
+    // both
+    if (pHLTOUT->SelectFirstDataBlock(kAliHLTDataTypeGlobalTrigger)>=0 ||
+        pHLTOUT->SelectFirstDataBlock(kAliHLTDataTypeTObject)>=0) {
+      do {
+        TObject* decision = pHLTOUT->GetDataObject();
+        if (decision) {
+         if (decision->IsA() == AliHLTGlobalTriggerDecision::Class()) {
+           cout << "HLT Global Trigger: " << decision->GetOption() << "   " << decision->GetTitle() << endl;
+           decision->Print();
+           found=true;
+         }
+         pHLTOUT->ReleaseDataObject(decision);
+        }
+      } while (!found && pHLTOUT->SelectNextDataBlock());
+    }
 
     if (!found) {
       cout << "   no HLT decision found" << endl;