Fix to avoid eating 100% of CPU when stopping a data source...
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 15:07:17 +0000 (15:07 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Feb 2008 15:07:17 +0000 (15:07 +0000)
(Laurent)

MUON/AliMUONPainterDataSourceItem.cxx

index b47b1da..4ea9305 100644 (file)
@@ -22,6 +22,7 @@
 #include "AliLog.h"
 #include <TGLabel.h>
 #include <TGButton.h>
+#include <TSystem.h>
 #include <TThread.h>
 #include <Riostream.h>
 
@@ -53,6 +54,7 @@ namespace
     while ( ok ) 
     {
       ok = reader->NextEvent();
+      if ( !reader->IsRunning() ) gSystem->Sleep(1000);
     }
     
     calling->Rewind();