Index: trunk/FACT++/gui/FactGui.h
===================================================================
--- trunk/FACT++/gui/FactGui.h	(revision 11225)
+++ trunk/FACT++/gui/FactGui.h	(revision 11226)
@@ -1027,28 +1027,13 @@
     } __attribute__((__packed__));;
 
-    void handleFadEventData(const DimData &d)
-    {
-	if (d.size()==0)
-            return;
-
+    DimEventData *fEventData;
+
+    void DisplayEventData()
+    {
 #ifdef HAVE_ROOT
-	const DimEventData &dat = d.ref<DimEventData>();
-
-        if (d.size()<sizeof(DimEventData))
-        {
-            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << sizeof(DimEventData) << endl;
-            return;
-        }
-
-        if (d.size()!=dat.Roi*2+sizeof(DimEventData))
-        {
-            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << dat.Roi*2+sizeof(DimEventData) << endl;
-            return;
-        }
-
 	TCanvas *c = fAdcDataCanv->GetCanvas();
 
 	TH1 *h = dynamic_cast<TH1*>(c->FindObject("EventData"));
-	if (h && h->GetNbinsX()!=dat.Roi)
+	if (h && h->GetNbinsX()!=fEventData->Roi)
 	{
 	    delete h;
@@ -1060,5 +1045,5 @@
 	    c->cd();
 
-	    TH1D hist("EventData", "", dat.Roi, -0.5, dat.Roi-0.5);
+	    TH1D hist("EventData", "", fEventData->Roi, -0.5, fEventData->Roi-0.5);
 	    hist.SetStats(kFALSE);
 	    //hist->SetBit(TH1::kNoTitle);
@@ -1074,6 +1059,9 @@
 	}
 
-	ostringstream str;
-	str << "ADC Pipeline (start=" << dat.StartPix << ") " << dat.EventNum;
+        ostringstream str;
+        str << "Event ID = " << fEventData->EventNum << "   Trigger type = " << fEventData->TriggerType << "  PC Time=" << fEventData->PCTime << "   Board time = " << fEventData->BoardTime;
+        h->SetTitle(str.str().c_str());
+        str.str("");
+	str << "ADC Pipeline (start=" << fEventData->StartPix << ")";
 	h->SetXTitle(str.str().c_str());
 
@@ -1082,10 +1070,55 @@
 	//hist->SetTitle(str.str().c_str());
 
-	for (int i=0; i<dat.Roi; i++)
-	    h->SetBinContent(i+1, dat.Adc_Data[i]*0.5);
+        const uint32_t p = fAdcChannel->value()+fAdcBoard->value()*36+fAdcCrate->value()*360;
+
+	for (int i=0; i<fEventData->Roi; i++)
+	    h->SetBinContent(i+1, fEventData->Adc_Data[p*fEventData->Roi+i]*0.5);
+
+        if (fAdcAutoScale->isChecked())
+        {
+            h->SetMinimum(-1111);
+            h->SetMaximum(-1111);
+        }
+
+        if (!fAdcAutoScale->isChecked())
+        {
+            if (h->GetMinimum()==-1111)
+                h->SetMinimum(-1026);
+            if (h->GetMaximum()==-1111)
+                h->SetMaximum(1025);
+        }
 
 	c->Modified();
 	c->Update();
 #endif
+    }
+
+    void handleFadEventData(const DimData &d)
+    {
+	if (d.size()==0)
+            return;
+
+        if (fAdcStop->isChecked())
+            return;
+
+	const DimEventData &dat = d.ref<DimEventData>();
+
+        if (d.size()<sizeof(DimEventData))
+        {
+            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << sizeof(DimEventData) << endl;
+            return;
+        }
+
+        if (d.size()!=sizeof(DimEventData)+dat.Roi*2*1440)
+        {
+            cout << "Size mismatch in " << d.name << ": Found=" << d.size() << " Expected=" << dat.Roi*2+sizeof(DimEventData) << endl;
+            return;
+        }
+
+        delete fEventData;
+        fEventData = reinterpret_cast<DimEventData*>(new char[d.size()]);
+        memcpy(fEventData, d.ptr<void>(), d.size());
+
+        DisplayEventData();
     }
 
@@ -2550,5 +2583,7 @@
         fDimFadRefClock        ("FAD_CONTROL/REFERENCE_CLOCK",  (void*)NULL, 0, this),
         fDimFadStatus          ("FAD_CONTROL/STATUS",           (void*)NULL, 0, this),
-        fDimFadStatistics      ("FAD_CONTROL/STATISTICS",       (void*)NULL, 0, this)
+        fDimFadStatistics      ("FAD_CONTROL/STATISTICS",       (void*)NULL, 0, this),
+        //-
+        fEventData(0)
     {
         fClockCondFreq->addItem("--- Hz",  QVariant(-1));
@@ -2751,5 +2786,5 @@
 
         c = fAdcDataCanv->GetCanvas();
-        c->SetBit(TCanvas::kNoContextMenu);
+        //c->SetBit(TCanvas::kNoContextMenu);
         c->SetBorderMode(0);
         c->SetFrameBorderMode(0);
Index: trunk/FACT++/gui/MainWindow.h
===================================================================
--- trunk/FACT++/gui/MainWindow.h	(revision 11225)
+++ trunk/FACT++/gui/MainWindow.h	(revision 11226)
@@ -48,7 +48,9 @@
     // Tab Widget
     void on_fTabWidget_tabCloseRequested(int which);
-    virtual void on_fTabWidget_currentChanged(int) { }
+    virtual void on_fTabWidget_currentChanged(int) = 0;
 
     // Tab: FAD
+    void slot_fFadLED_clicked();
+
     void on_fFadStartRun_clicked();
     void on_fFadStopRun_clicked();
@@ -73,4 +75,10 @@
     void on_fFadRunNumberCmd_valueChanged(int);
     void on_fFadRoiCmd_valueChanged(int);
+
+    // Tab: Adc
+    virtual void DisplayEventData() = 0;
+    void on_fAdcCrate_valueChanged(int)   { DisplayEventData(); }
+    void on_fAdcBoard_valueChanged(int)   { DisplayEventData(); }
+    void on_fAdcChannel_valueChanged(int) { DisplayEventData(); }
 
     // Tab: FTM
@@ -115,25 +123,22 @@
 
     // Tab: Rates
-    virtual void on_fPixelEnable_stateChanged(int) { }
-    virtual void on_fThresholdVal_valueChanged(int) { }
-    virtual void on_fThresholdIdx_valueChanged(int) { }
-    virtual void on_fThresholdCrate_valueChanged(int) { }
-    virtual void on_fThresholdBoard_valueChanged(int) { }
-    virtual void on_fThresholdPatch_valueChanged(int) { }
-    virtual void on_fPixelIdx_valueChanged(int) { }
+    virtual void on_fPixelEnable_stateChanged(int) = 0;
+    virtual void on_fThresholdVal_valueChanged(int) = 0;
+    virtual void on_fThresholdIdx_valueChanged(int) = 0;
+    virtual void on_fThresholdCrate_valueChanged(int) = 0;
+    virtual void on_fThresholdBoard_valueChanged(int) = 0;
+    virtual void on_fThresholdPatch_valueChanged(int) = 0;
+    virtual void on_fPixelIdx_valueChanged(int) = 0;
 
     void on_fPixelEnableAll_clicked();
     void on_fPixelDisableAll_clicked();
 
-    virtual void on_fPixelDisableOthers_clicked() { }
-    virtual void on_fThresholdDisableOthers_clicked() { }
+    virtual void on_fPixelDisableOthers_clicked() = 0;
+    virtual void on_fThresholdDisableOthers_clicked() = 0;
 
-    virtual void on_fRatePatch1_valueChanged(int) { }
-    virtual void on_fRatePatch2_valueChanged(int) { }
-    virtual void on_fRateBoard1_valueChanged(int) { }
-    virtual void on_fRateBoard2_valueChanged(int) { }
-
-    // Tab: FADs
-    void slot_fFadLED_clicked();
+    virtual void on_fRatePatch1_valueChanged(int) = 0;
+    virtual void on_fRatePatch2_valueChanged(int) = 0;
+    virtual void on_fRateBoard1_valueChanged(int) = 0;
+    virtual void on_fRateBoard2_valueChanged(int) = 0;
 
     // Tab: Chat
@@ -142,11 +147,11 @@
     // Tab: Commands
     /// Needs access to DimNetwork thus it is implemented in the derived class
-    virtual void on_fDimCmdSend_clicked() { }
+    virtual void on_fDimCmdSend_clicked() = 0;
 
     // Main menu
     //    void on_fMenuLogSaveAs_triggered(bool)
 
-    virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) { }
-    virtual void slot_RootUpdate() { }
+    virtual void slot_RootEventProcessed(TObject *, unsigned int, TCanvas *) = 0;
+    virtual void slot_RootUpdate() = 0;
 
     void slot_TimeUpdate();
Index: trunk/FACT++/gui/design.ui
===================================================================
--- trunk/FACT++/gui/design.ui	(revision 11225)
+++ trunk/FACT++/gui/design.ui	(revision 11226)
@@ -53,5 +53,5 @@
       </property>
       <property name="currentIndex">
-       <number>3</number>
+       <number>5</number>
       </property>
       <property name="documentMode">
@@ -3117,43 +3117,4 @@
             </property>
            </widget>
-           <widget class="QPushButton" name="fFadStart">
-            <property name="geometry">
-             <rect>
-              <x>530</x>
-              <y>30</y>
-              <width>94</width>
-              <height>24</height>
-             </rect>
-            </property>
-            <property name="text">
-             <string>Start</string>
-            </property>
-           </widget>
-           <widget class="QPushButton" name="fFadStop">
-            <property name="geometry">
-             <rect>
-              <x>530</x>
-              <y>60</y>
-              <width>94</width>
-              <height>24</height>
-             </rect>
-            </property>
-            <property name="text">
-             <string>Stop</string>
-            </property>
-           </widget>
-           <widget class="QPushButton" name="fFadAbort">
-            <property name="geometry">
-             <rect>
-              <x>530</x>
-              <y>90</y>
-              <width>94</width>
-              <height>24</height>
-             </rect>
-            </property>
-            <property name="text">
-             <string>Abort</string>
-            </property>
-           </widget>
            <widget class="QPushButton" name="fFadResetTriggerId">
             <property name="geometry">
@@ -5192,4 +5153,10 @@
             <item row="0" column="0">
              <widget class="QFrame" name="frame">
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
               <property name="frameShape">
                <enum>QFrame::StyledPanel</enum>
@@ -5199,4 +5166,7 @@
               </property>
               <layout class="QGridLayout" name="gridLayout_52">
+               <property name="margin">
+                <number>3</number>
+               </property>
                <item row="0" column="0">
                 <widget class="RootWidget" name="fAdcDataCanv" native="true"/>
@@ -5204,4 +5174,93 @@
               </layout>
              </widget>
+            </item>
+            <item row="0" column="1">
+             <layout class="QVBoxLayout" name="verticalLayout_6">
+              <property name="rightMargin">
+               <number>0</number>
+              </property>
+              <item>
+               <widget class="QLabel" name="label_148">
+                <property name="text">
+                 <string>Crate</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fAdcCrate"/>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_149">
+                <property name="text">
+                 <string>Board</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fAdcBoard"/>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_138">
+                <property name="text">
+                 <string>Channel</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fAdcChannel"/>
+              </item>
+              <item>
+               <spacer name="verticalSpacer_33">
+                <property name="orientation">
+                 <enum>Qt::Vertical</enum>
+                </property>
+                <property name="sizeType">
+                 <enum>QSizePolicy::Fixed</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>20</width>
+                  <height>20</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+              <item>
+               <widget class="QCheckBox" name="fAdcStop">
+                <property name="text">
+                 <string>Stop</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QCheckBox" name="fAdcAutoScale">
+                <property name="text">
+                 <string>AutoScale</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <spacer name="verticalSpacer_32">
+                <property name="orientation">
+                 <enum>Qt::Vertical</enum>
+                </property>
+                <property name="sizeHint" stdset="0">
+                 <size>
+                  <width>20</width>
+                  <height>40</height>
+                 </size>
+                </property>
+               </spacer>
+              </item>
+             </layout>
             </item>
            </layout>
@@ -7031,6 +7090,6 @@
    <property name="minimumSize">
     <size>
-     <width>230</width>
-     <height>431</height>
+     <width>208</width>
+     <height>494</height>
     </size>
    </property>
@@ -7058,57 +7117,12 @@
      <item>
       <layout class="QGridLayout" name="gridLayout_11">
-       <item row="1" column="4">
-        <widget class="QLabel" name="fStatusDNSLabel">
-         <property name="text">
-          <string>Offline</string>
+       <item row="2" column="0" colspan="5">
+        <widget class="Line" name="line">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
          </property>
         </widget>
        </item>
-       <item row="3" column="4">
-        <widget class="QLabel" name="fStatusFTMLabel">
-         <property name="text">
-          <string>Offline</string>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="3">
-        <widget class="QPushButton" name="fStatusFTMLed">
-         <property name="enabled">
-          <bool>true</bool>
-         </property>
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>18</width>
-           <height>16777215</height>
-          </size>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-         <property name="icon">
-          <iconset resource="design.qrc">
-           <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>16</width>
-           <height>16</height>
-          </size>
-         </property>
-         <property name="checkable">
-          <bool>false</bool>
-         </property>
-         <property name="flat">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1">
+       <item row="3" column="0">
         <widget class="QCheckBox" name="fStatusFTMEnable">
          <property name="enabled">
@@ -7135,12 +7149,5 @@
         </widget>
        </item>
-       <item row="2" column="0" colspan="6">
-        <widget class="Line" name="line">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="2">
+       <item row="3" column="1">
         <widget class="QLabel" name="fStatusFTM">
          <property name="sizePolicy">
@@ -7161,5 +7168,5 @@
         </widget>
        </item>
-       <item row="1" column="2">
+       <item row="1" column="1">
         <widget class="QLabel" name="fStatusDNS">
          <property name="sizePolicy">
@@ -7180,56 +7187,5 @@
         </widget>
        </item>
-       <item row="1" column="5">
-        <spacer name="horizontalSpacer_8">
-         <property name="orientation">
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0">
-          <size>
-           <width>40</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item row="1" column="3">
-        <widget class="QPushButton" name="fStatusDNSLed">
-         <property name="enabled">
-          <bool>true</bool>
-         </property>
-         <property name="sizePolicy">
-          <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="maximumSize">
-          <size>
-           <width>18</width>
-           <height>16777215</height>
-          </size>
-         </property>
-         <property name="text">
-          <string/>
-         </property>
-         <property name="icon">
-          <iconset resource="design.qrc">
-           <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset>
-         </property>
-         <property name="iconSize">
-          <size>
-           <width>16</width>
-           <height>16</height>
-          </size>
-         </property>
-         <property name="checkable">
-          <bool>false</bool>
-         </property>
-         <property name="flat">
-          <bool>true</bool>
-         </property>
-        </widget>
-       </item>
-       <item row="4" column="2">
+       <item row="4" column="1">
         <widget class="QLabel" name="label_59">
          <property name="sizePolicy">
@@ -7247,5 +7203,30 @@
         </widget>
        </item>
-       <item row="5" column="2">
+       <item row="5" column="0">
+        <widget class="QCheckBox" name="fStatusFADEnable">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>20</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+         <property name="checked">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="1">
         <widget class="QLabel" name="fStatusFAD">
          <property name="sizePolicy">
@@ -7266,5 +7247,5 @@
         </widget>
        </item>
-       <item row="6" column="2">
+       <item row="6" column="1">
         <widget class="QLabel" name="label_124">
          <property name="text">
@@ -7276,5 +7257,5 @@
         </widget>
        </item>
-       <item row="7" column="2">
+       <item row="7" column="1">
         <widget class="QLabel" name="label_135">
          <property name="text">
@@ -7283,5 +7264,5 @@
         </widget>
        </item>
-       <item row="8" column="2">
+       <item row="8" column="1">
         <widget class="QLabel" name="label_60">
          <property name="text">
@@ -7293,5 +7274,30 @@
         </widget>
        </item>
-       <item row="9" column="2">
+       <item row="9" column="0">
+        <widget class="QCheckBox" name="fStatusLoggerEnable">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>20</width>
+           <height>16777215</height>
+          </size>
+         </property>
+         <property name="text">
+          <string/>
+         </property>
+         <property name="checked">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="9" column="1">
         <widget class="QLabel" name="fStatusLogger">
          <property name="sizePolicy">
@@ -7312,5 +7318,5 @@
         </widget>
        </item>
-       <item row="10" column="2">
+       <item row="10" column="1">
         <widget class="QLabel" name="fStatusChat">
          <property name="sizePolicy">
@@ -7331,11 +7337,11 @@
         </widget>
        </item>
-       <item row="9" column="1">
-        <widget class="QCheckBox" name="fStatusLoggerEnable">
+       <item row="1" column="2">
+        <widget class="QPushButton" name="fStatusDNSLed">
          <property name="enabled">
-          <bool>false</bool>
+          <bool>true</bool>
          </property>
          <property name="sizePolicy">
-          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+          <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
@@ -7344,5 +7350,5 @@
          <property name="maximumSize">
           <size>
-           <width>20</width>
+           <width>18</width>
            <height>16777215</height>
           </size>
@@ -7351,16 +7357,49 @@
           <string/>
          </property>
-         <property name="checked">
+         <property name="icon">
+          <iconset resource="design.qrc">
+           <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>16</width>
+           <height>16</height>
+          </size>
+         </property>
+         <property name="checkable">
+          <bool>false</bool>
+         </property>
+         <property name="flat">
           <bool>true</bool>
          </property>
         </widget>
        </item>
-       <item row="5" column="1">
-        <widget class="QCheckBox" name="fStatusFADEnable">
+       <item row="1" column="3">
+        <widget class="QLabel" name="fStatusDNSLabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="4">
+        <spacer name="horizontalSpacer_8">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>40</width>
+           <height>20</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+       <item row="3" column="2">
+        <widget class="QPushButton" name="fStatusFTMLed">
          <property name="enabled">
-          <bool>false</bool>
+          <bool>true</bool>
          </property>
          <property name="sizePolicy">
-          <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
+          <sizepolicy hsizetype="Fixed" vsizetype="Minimum">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
@@ -7369,5 +7408,5 @@
          <property name="maximumSize">
           <size>
-           <width>20</width>
+           <width>18</width>
            <height>16777215</height>
           </size>
@@ -7376,10 +7415,30 @@
           <string/>
          </property>
-         <property name="checked">
+         <property name="icon">
+          <iconset resource="design.qrc">
+           <normaloff>:/Resources/icons/gray circle 1.png</normaloff>:/Resources/icons/gray circle 1.png</iconset>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>16</width>
+           <height>16</height>
+          </size>
+         </property>
+         <property name="checkable">
+          <bool>false</bool>
+         </property>
+         <property name="flat">
           <bool>true</bool>
          </property>
         </widget>
        </item>
-       <item row="4" column="3">
+       <item row="3" column="3">
+        <widget class="QLabel" name="fStatusFTMLabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="2">
         <widget class="QPushButton" name="fStatusFTULed">
          <property name="maximumSize">
@@ -7401,5 +7460,5 @@
         </widget>
        </item>
-       <item row="5" column="3">
+       <item row="5" column="2">
         <widget class="QPushButton" name="fStatusFADLed">
          <property name="enabled">
@@ -7439,5 +7498,5 @@
         </widget>
        </item>
-       <item row="6" column="3">
+       <item row="6" column="2">
         <widget class="QPushButton" name="fStatusEventBuilderLed">
          <property name="enabled">
@@ -7477,5 +7536,5 @@
         </widget>
        </item>
-       <item row="7" column="3">
+       <item row="7" column="2">
         <widget class="QPushButton" name="fStatusFSCLed">
          <property name="maximumSize">
@@ -7497,5 +7556,5 @@
         </widget>
        </item>
-       <item row="8" column="3">
+       <item row="8" column="2">
         <widget class="QPushButton" name="fStatusSchedulerLed">
          <property name="maximumSize">
@@ -7517,5 +7576,33 @@
         </widget>
        </item>
-       <item row="9" column="3">
+       <item row="7" column="3">
+        <widget class="QLabel" name="fStatusFSCLabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="6" column="3">
+        <widget class="QLabel" name="fStatusEventBuilderLabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="5" column="3">
+        <widget class="QLabel" name="fStatusFADLabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="4" column="3">
+        <widget class="QLabel" name="fStatusFTULabel">
+         <property name="text">
+          <string>Offline</string>
+         </property>
+        </widget>
+       </item>
+       <item row="9" column="2">
         <widget class="QPushButton" name="fStatusLoggerLed">
          <property name="enabled">
@@ -7555,5 +7642,5 @@
         </widget>
        </item>
-       <item row="10" column="3">
+       <item row="10" column="2">
         <widget class="QPushButton" name="fStatusChatLed">
          <property name="enabled">
@@ -7593,33 +7680,5 @@
         </widget>
        </item>
-       <item row="4" column="4">
-        <widget class="QLabel" name="fStatusFTULabel">
-         <property name="text">
-          <string>Offline</string>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="4">
-        <widget class="QLabel" name="fStatusFADLabel">
-         <property name="text">
-          <string>Offline</string>
-         </property>
-        </widget>
-       </item>
-       <item row="6" column="4">
-        <widget class="QLabel" name="fStatusEventBuilderLabel">
-         <property name="text">
-          <string>Offline</string>
-         </property>
-        </widget>
-       </item>
-       <item row="7" column="4">
-        <widget class="QLabel" name="fStatusFSCLabel">
-         <property name="text">
-          <string>Offline</string>
-         </property>
-        </widget>
-       </item>
-       <item row="8" column="4">
+       <item row="8" column="3">
         <widget class="QLabel" name="fStatusSchedulerLabel">
          <property name="text">
@@ -7628,5 +7687,5 @@
         </widget>
        </item>
-       <item row="9" column="4">
+       <item row="9" column="3">
         <widget class="QLabel" name="fStatusLoggerLabel">
          <property name="text">
@@ -7635,5 +7694,5 @@
         </widget>
        </item>
-       <item row="10" column="4">
+       <item row="10" column="3">
         <widget class="QLabel" name="fStatusChatLabel">
          <property name="text">
@@ -7665,4 +7724,11 @@
      </item>
      <item>
+      <widget class="QLabel" name="label_144">
+       <property name="text">
+        <string>FTM</string>
+       </property>
+      </widget>
+     </item>
+     <item>
       <layout class="QHBoxLayout" name="horizontalLayout_25">
        <property name="topMargin">
@@ -7680,4 +7746,55 @@
          <property name="text">
           <string>Stop run</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_34">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Fixed</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>3</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QLabel" name="label_150">
+       <property name="text">
+        <string>FAD</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_26">
+       <property name="topMargin">
+        <number>0</number>
+       </property>
+       <item>
+        <widget class="QPushButton" name="fFadStart">
+         <property name="text">
+          <string>Start</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="fFadStop">
+         <property name="text">
+          <string>Stop</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="fFadAbort">
+         <property name="text">
+          <string>Abort</string>
          </property>
         </widget>
Index: trunk/FACT++/src/EventBuilderWrapper.h
===================================================================
--- trunk/FACT++/src/EventBuilderWrapper.h	(revision 11225)
+++ trunk/FACT++/src/EventBuilderWrapper.h	(revision 11226)
@@ -1236,5 +1236,5 @@
 	static DimEventData *data = 0;
 
-	const size_t sz = sizeof(DimEventData)+event->Roi*2;
+	const size_t sz = sizeof(DimEventData)+event->Roi*2*1440;
 
 	if (data && data->Roi != event->Roi)
@@ -1257,5 +1257,5 @@
 	data->StartTM     = event->StartTM[0];
 
-        memcpy(data->Adc_Data, event->Adc_Data, event->Roi*2);
+        memcpy(data->Adc_Data, event->Adc_Data, event->Roi*2*1440);
 
         fDimEventData.setData(data, sz);
@@ -1542,11 +1542,8 @@
         }
 
-
-
         /*
          uint16_t fTriggerType;
          uint32_t fTriggerId;
          uint32_t fEventCounter;
-         uint32_t fFreqRefClock;
          uint16_t fAdcClockPhaseShift;
          uint16_t fNumTriggersToGenerate;
