]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveEventManagerEditor.cxx
Checking Storage Manager state added to ED. Now GUI reacts depending on status of SM.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveEventManagerEditor.cxx
index f7ccefb94205a53254220614181b21f67a751066..36c752a2fc16af16ee3642963ea7199ee182751c 100644 (file)
@@ -177,12 +177,17 @@ AliEveEventManagerWindow::AliEveEventManagerWindow(AliEveEventManager* mgr) :
     fTrigSel->Select(-1,kFALSE);
     f->AddFrame(fTrigSel, new TGLayoutHints(kLHintsNormal, 10, 5, 0, 0));
     fTrigSel->Connect("Selected(char*)", cls, this, "DoSetTrigSel()");
-  }
 
+    fStorageStatus = MkLabel(f,"Storage: Waiting",0,8,8);
+      
+  }
+    
   fEventInfo = new TGTextView(this, 400, 600);
   AddFrame(fEventInfo, new TGLayoutHints(kLHintsNormal | kLHintsExpandX | kLHintsExpandY));
 
   fM->Connect("NewEventLoaded()", cls, this, "Update()");
+    fM->Connect("StorageManagerOk()",cls,this,"StorageManagerChangedState(=1)");
+    fM->Connect("StorageManagerDown()",cls,this,"StorageManagerChangedState(=0)");
 
   SetCleanup(kDeepCleanup);
   Layout();
@@ -320,6 +325,20 @@ void AliEveEventManagerWindow::Update()
   Layout();
 }
 
+void AliEveEventManagerWindow::StorageManagerChangedState(int state)
+{
+    if (state == 0)
+    {
+        fStorageStatus->SetText("Storage: DOWN");
+        fMarkEvent->SetEnabled(false);
+    }
+    else if(state == 1)
+    {
+        fStorageStatus->SetText("Storage: OK");
+        fMarkEvent->SetEnabled(true);
+    }
+}
+
 //------------------------------------------------------------------------------
 // Protected methods
 //------------------------------------------------------------------------------