Index: trunk/FACT++/gui/FactGui.h
===================================================================
--- trunk/FACT++/gui/FactGui.h	(revision 11809)
+++ trunk/FACT++/gui/FactGui.h	(revision 11820)
@@ -1279,9 +1279,10 @@
 
         const int16_t start = fEventData->StartPix[p];
-        if (fDrsRuns[0]==0 || start<0)
+
+        if (fDrsCalibBaseline->value()==0  || start<0)
             d0->Reset();
-        if (fDrsRuns[1]==0 || start<0)
+        if (fDrsCalibGain->value()==0      || start<0)
             d1->Reset();
-        if (fDrsRuns[2]==0 || start<0)
+        if (fDrsCalibTrgOffset->value()==0 || start<0)
             d2->Reset();
 
@@ -1301,5 +1302,5 @@
                 continue;
 
-            if (fDrsRuns[0]>0)
+            if (fDrsCalibBaseline->value()>0)
             {
                 d0->SetBinContent(i+1, fDrsCalibration[1440*1024*0 + p*1024+(start+i)%1024]);
@@ -1307,10 +1308,10 @@
 
             }
-            if (fDrsRuns[1]>0)
+            if (fDrsCalibGain->value()>0)
             {
                 d1->SetBinContent(i+1, fDrsCalibration[1440*1024*2 + p*1024+(start+i)%1024]);
                 d1->SetBinError(i+1,   fDrsCalibration[1440*1024*3 + p*1024+(start+i)%1024]);
             }
-            if (fDrsRuns[2]>0)
+            if (fDrsCalibTrgOffset->value()>0)
             {
                 d2->SetBinContent(i+1, fDrsCalibration[1440*1024*4 + p*1024 + i]);
@@ -1491,5 +1492,4 @@
     }
 
-    uint32_t fDrsRuns[3];
     vector<float> fDrsCalibration;
 
@@ -1498,7 +1498,7 @@
         if (d.size()==0)
         {
-            fDrsRuns[0] = 0;
-            fDrsRuns[1] = 0;
-            fDrsRuns[2] = 0;
+            fDrsCalibBaseline->setValue(0);
+            fDrsCalibGain->setValue(0);
+            fDrsCalibTrgOffset->setValue(0);
             fDrsCalibration.assign(1024*1440*6, 0);
             DisplayEventData();
@@ -1511,7 +1511,8 @@
 
         const uint32_t *run = d.ptr<uint32_t>();
-        fDrsRuns[0] = run[0];
-        fDrsRuns[1] = run[1];
-        fDrsRuns[2] = run[2];
+
+        fDrsCalibBaseline->setValue(run[0]);
+        fDrsCalibGain->setValue(run[1]);
+        fDrsCalibTrgOffset->setValue(run[2]);
 
         const float *dat = d.ptr<float>(sizeof(uint32_t)*3);
Index: trunk/FACT++/gui/design.ui
===================================================================
--- trunk/FACT++/gui/design.ui	(revision 11809)
+++ trunk/FACT++/gui/design.ui	(revision 11820)
@@ -6927,4 +6927,99 @@
                 </property>
                </spacer>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_184">
+                <property name="text">
+                 <string>DRS Calib RunNo</string>
+                </property>
+                <property name="alignment">
+                 <set>Qt::AlignCenter</set>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="Line" name="line_24">
+                <property name="orientation">
+                 <enum>Qt::Horizontal</enum>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_183">
+                <property name="text">
+                 <string>Baseline</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fDrsCalibBaseline">
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="readOnly">
+                 <bool>true</bool>
+                </property>
+                <property name="buttonSymbols">
+                 <enum>QAbstractSpinBox::NoButtons</enum>
+                </property>
+                <property name="prefix">
+                 <string/>
+                </property>
+                <property name="maximum">
+                 <number>9999</number>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_182">
+                <property name="text">
+                 <string>Gain</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fDrsCalibGain">
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="readOnly">
+                 <bool>true</bool>
+                </property>
+                <property name="buttonSymbols">
+                 <enum>QAbstractSpinBox::NoButtons</enum>
+                </property>
+                <property name="prefix">
+                 <string/>
+                </property>
+                <property name="maximum">
+                 <number>9999</number>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QLabel" name="label_181">
+                <property name="text">
+                 <string>Trigger Offset</string>
+                </property>
+               </widget>
+              </item>
+              <item>
+               <widget class="QSpinBox" name="fDrsCalibTrgOffset">
+                <property name="alignment">
+                 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+                </property>
+                <property name="readOnly">
+                 <bool>true</bool>
+                </property>
+                <property name="buttonSymbols">
+                 <enum>QAbstractSpinBox::NoButtons</enum>
+                </property>
+                <property name="prefix">
+                 <string/>
+                </property>
+                <property name="maximum">
+                 <number>9999</number>
+                </property>
+               </widget>
               </item>
              </layout>
