Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 11132)
+++ /trunk/FACT++/gui/FactGui.h	(revision 11133)
@@ -389,4 +389,6 @@
     DimStampedInfo fDimFadEventData;
     DimStampedInfo fDimFadConnections;
+    DimStampedInfo fDimFadFwVersion;
+    DimStampedInfo fDimFadStatistics;
 
     map<string, DimInfo*> fServices;
@@ -1040,4 +1042,6 @@
     }
 
+    vector<uint8_t> fFadConnections;
+
     void handleFadConnections(const DimData &d)
     {
@@ -1058,5 +1062,73 @@
 
         SetLedColor(fFadLEDEventBuilder, ptr[40]==0?kLedRed:kLedGreen, d.time);
-    }
+
+        fFadConnections.assign(ptr, ptr+40);
+    }
+
+    template<typename T>
+        bool CheckConsistency(const T *v)
+    {
+        for (int i=1; i<40; i++)
+            if (fFadConnections[i]==9 && v[i]!=v[0])
+                return false;
+
+        return true;
+    }
+
+    template<typename T>
+        T GetFirst(const T *v)
+    {
+        for (int i=0; i<40; i++)
+            if (fFadConnections[i]==9)
+                return v[i];
+
+        return T();
+    }
+
+    void handleFadFwVersion(const DimData &d)
+    {
+        if (!CheckSize(d, 40*sizeof(float)))
+            return;
+
+        const float *ptr = d.ptr<float>();
+        fFadFwVersion->setValue(GetFirst(ptr));
+
+        ostringstream tip;
+        tip << "<table border='1'><tr><th colspan='11'>" << Time().GetAsStr() << "</th></tr><tr><th></th>";
+        for (int b=0; b<10; b++)
+            tip << "<th>" << b << "</th>";
+        tip << "</tr>";
+
+        for (int c=0; c<4; c++)
+        {
+            tip << "<tr><th>" << c << "</th>";
+            for (int b=0; b<10; b++)
+                tip << "<td>" << ptr[c*10+b] << "</td>";
+            tip << "</tr>";
+        }
+        tip << "</table>";
+
+        fFadFwVersion->setToolTip(tip.str().c_str());
+    }
+
+    void handleFadStatistics(const DimData &d)
+    {
+        if (!CheckSize(d, 8*sizeof(int64_t)))
+            return;
+
+        const int64_t *stat = d.ptr<int64_t>();
+
+        fFadBufferMax->setMaximum(stat[0]/1000000);
+        fFadBuffer->setMaximum(stat[0]);
+        fFadBuffer->setValue(stat[5]);
+
+        fFadEvtWait->setValue(stat[1]);
+        fFadEvtSkip->setValue(stat[2]);
+        fFadEvtDel->setValue(stat[3]);
+        fFadEvtTot->setValue(stat[4]);
+        fFadEvtRead->setValue(stat[6]);
+        fFadEvtConn->setValue(stat[7]);
+    }
+
 
     // ===================== FTM ============================================
@@ -1832,4 +1904,10 @@
             return PostInfoHandler(&FactGui::handleFadConnections);
 
+        if (getInfo()==&fDimFadFwVersion)
+            return PostInfoHandler(&FactGui::handleFadFwVersion);
+
+        if (getInfo()==&fDimFadStatistics)
+            return PostInfoHandler(&FactGui::handleFadStatistics);
+
         if (getInfo()==&fDimFadEvents)
             return PostInfoHandler(&FactGui::handleFadEvents);
@@ -2256,17 +2334,18 @@
         fDimLoggerNumSubs      ("DATA_LOGGER/NUM_SUBS",         const_cast<char*>(""), 0, this),
 
-        fDimFtmPassport      ("FTM_CONTROL/PASSPORT",        (void*)NULL, 0, this),
-        fDimFtmTriggerCounter("FTM_CONTROL/TRIGGER_COUNTER", (void*)NULL, 0, this),
-        fDimFtmError         ("FTM_CONTROL/ERROR",           (void*)NULL, 0, this),
-        fDimFtmFtuList       ("FTM_CONTROL/FTU_LIST",        (void*)NULL, 0, this),
-        fDimFtmStaticData    ("FTM_CONTROL/STATIC_DATA",     (void*)NULL, 0, this),
-        fDimFtmDynamicData   ("FTM_CONTROL/DYNAMIC_DATA",    (void*)NULL, 0, this),
-        fDimFtmCounter       ("FTM_CONTROL/COUNTER",         (void*)NULL, 0, this),
-        fDimFadFiles         ("FAD_CONTROL/FILES",           (void*)NULL, 0, this),
-        fDimFadRuns          ("FAD_CONTROL/RUNS",            (void*)NULL, 0, this),
-        fDimFadEvents        ("FAD_CONTROL/EVENTS",          (void*)NULL, 0, this),
-        fDimFadCurrentEvent  ("FAD_CONTROL/CURRENT_EVENT",   (void*)NULL, 0, this),
-        fDimFadEventData     ("FAD_CONTROL/EVENT_DATA",      (void*)NULL, 0, this),
-        fDimFadConnections   ("FAD_CONTROL/CONNECTIONS",     (void*)NULL, 0, this)
+        fDimFtmPassport      ("FTM_CONTROL/PASSPORT",         (void*)NULL, 0, this),
+        fDimFtmTriggerCounter("FTM_CONTROL/TRIGGER_COUNTER",  (void*)NULL, 0, this),
+        fDimFtmError         ("FTM_CONTROL/ERROR",            (void*)NULL, 0, this),
+        fDimFtmFtuList       ("FTM_CONTROL/FTU_LIST",         (void*)NULL, 0, this),
+        fDimFtmStaticData    ("FTM_CONTROL/STATIC_DATA",      (void*)NULL, 0, this),
+        fDimFtmDynamicData   ("FTM_CONTROL/DYNAMIC_DATA",     (void*)NULL, 0, this),
+        fDimFtmCounter       ("FTM_CONTROL/COUNTER",          (void*)NULL, 0, this),
+        fDimFadFiles         ("FAD_CONTROL/FILES",            (void*)NULL, 0, this),
+        fDimFadRuns          ("FAD_CONTROL/RUNS",             (void*)NULL, 0, this),
+        fDimFadEvents        ("FAD_CONTROL/EVENTS",           (void*)NULL, 0, this),
+        fDimFadCurrentEvent  ("FAD_CONTROL/CURRENT_EVENT",    (void*)NULL, 0, this),
+        fDimFadEventData     ("FAD_CONTROL/EVENT_DATA",       (void*)NULL, 0, this),
+        fDimFadConnections   ("FAD_CONTROL/CONNECTIONS",      (void*)NULL, 0, this),
+        fDimFadStatistics    ("FAD_CONTROL/STATISTICS",       (void*)NULL, 0, this)
     {
         fClockCondFreq->addItem("--- Hz",  QVariant(-1));
