Index: trunk/FACT++/Makefile.am
===================================================================
--- trunk/FACT++/Makefile.am	(revision 12296)
+++ trunk/FACT++/Makefile.am	(revision 12297)
@@ -1,3 +1,3 @@
-include aminclude.am
+#include aminclude.am
 
 #-------------------------------------------------------------------------
@@ -328,5 +328,5 @@
 
 fitsdump_SOURCES = src/fitsdump.cc 
-fitsdump_LDADD   = libConfiguration.la
+fitsdump_LDADD   = libConfiguration.la libTime.la
 
 readfits_SOURCES = src/readfits.cc src/ReadFits.h
@@ -368,5 +368,6 @@
 viewer_QT_SOURCES = \
 	gui/RawEventsViewer/RawEventsViewer.cc \
-	gui/BasicGlCamera.cc
+	gui/BasicGlCamera.cc \
+	gui/QCameraWidget.cc
 
 viewer_SRCADD = $(viewer_DIALOGS:.ui=.h) $(viewer_RESOURCES:.qrc=.cc) $(viewer_QT_SOURCES:.cc=.moc.cc)
Index: trunk/FACT++/gui/BasicGlCamera.cc
===================================================================
--- trunk/FACT++/gui/BasicGlCamera.cc	(revision 12296)
+++ trunk/FACT++/gui/BasicGlCamera.cc	(revision 12297)
@@ -46,4 +46,5 @@
         logScale = false;
         cameraRotation = 0;
+        fTextEnabled = true;
         unitsText = "";
         titleText = "";
@@ -294,4 +295,8 @@
 
     }
+    void BasicGlCamera::enableText(bool on)
+    {
+        fTextEnabled = on;
+    }
     void BasicGlCamera::setPatchColor(int id, float color[3])
     {
@@ -435,4 +440,6 @@
     void BasicGlCamera::DrawCameraText()
     {
+        if (!fTextEnabled)
+            return;
         glPushMatrix();
         glLoadIdentity();
Index: trunk/FACT++/gui/BasicGlCamera.h
===================================================================
--- trunk/FACT++/gui/BasicGlCamera.h	(revision 12296)
+++ trunk/FACT++/gui/BasicGlCamera.h	(revision 12297)
@@ -84,4 +84,7 @@
     void updateCamera();
     void assignPixelMap(const PixelMap& );
+    void enableText(bool);
+
+    bool fTextEnabled;
 
     float ss[5];// = {0.00, 0.25, 0.5, 0.75, 1.00};
Index: trunk/FACT++/gui/QCameraWidget.cc
===================================================================
--- trunk/FACT++/gui/QCameraWidget.cc	(revision 12296)
+++ trunk/FACT++/gui/QCameraWidget.cc	(revision 12297)
@@ -88,4 +88,6 @@
     void QCameraWidget::DrawCameraText()
     {
+        if (!fTextEnabled) return;
+
         glPushMatrix();
         glLoadIdentity();
Index: trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc
===================================================================
--- trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc	(revision 12296)
+++ trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc	(revision 12297)
@@ -352,5 +352,5 @@
  * CONSTRUCTOR.
  ************************************************************/
-RawDataViewer::RawDataViewer(QWidget *cParent) : BasicGlCamera(cParent)
+RawDataViewer::RawDataViewer(QWidget *cParent) : BasicGlCamera(cParent), RMSvalues(1440)
 {
  //   setFormat(QGLFormat(QGL::DoubleBuffer));// | QGL::DepthBuffer));
@@ -608,4 +608,5 @@
     }
     eventData = new float[(1440+160)*nRoi];
+
     rawEventData = new int16_t[(1440+160)*nRoi];
     waveLetArray = new int16_t[1024*1440];
@@ -1037,4 +1038,14 @@
         DataCalib::Apply(eventData, rawEventData, startPix, nRoi);
         CalibData::RemoveSpikes(eventData, nRoi);
+
+        vector<float> pixelStatsData(1440*4);
+        CalibData::GetPixelStats(pixelStatsData.data(), eventData, nRoi);
+
+
+        for (vector<PixelMapEntry>::const_iterator it=fPixelMap.begin(); it!=fPixelMap.end(); it++)
+        {
+            RMSvalues[it->index] = pixelStatsData[1*1440+it->hw()];
+        }
+
         /*
 
@@ -1050,5 +1061,6 @@
     }
     */
-        updateGL();
+        if (isVisible())
+            updateGL();
     emit signalCurrentEvent(eventNum);
     emit signalCurrentPixel(selectedPixel);
@@ -1189,4 +1201,6 @@
     entireCameraScale->setChecked(true);
 
+    GLWindow_2->enableText(false);
+
     QObject::connect(GLWindow, SIGNAL(colorPaletteHasChanged()),
                      this, SLOT(on_autoScaleColor_clicked()));
@@ -1471,4 +1485,8 @@
 void UIConnector::currentEventHasChanged(int )
 {
+
+    GLWindow_2->SetData(GLWindow->RMSvalues);
+    if (GLWindow_2->isVisible())
+        GLWindow_2->updateGL();
     ostringstream str;
 //    str << "Displaying Event " << cEvent;
Index: trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h
===================================================================
--- trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h	(revision 12296)
+++ trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.h	(revision 12297)
@@ -96,6 +96,8 @@
     int selectedPixel;
     float *eventData;
+    float *rmsData;
     int16_t* rawEventData;
     int16_t* waveLetArray;
+    valarray<double> RMSvalues;//(1440);
 
 private:
Index: trunk/FACT++/gui/RawEventsViewer/viewer.ui
===================================================================
--- trunk/FACT++/gui/RawEventsViewer/viewer.ui	(revision 12296)
+++ trunk/FACT++/gui/RawEventsViewer/viewer.ui	(revision 12297)
@@ -16,5 +16,5 @@
   <widget class="QWidget" name="centralwidget">
    <layout class="QGridLayout" name="gridLayout_2">
-    <item row="0" column="1">
+    <item row="0" column="0">
      <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="10,0">
       <item>
@@ -201,4 +201,30 @@
            </layout>
           </widget>
+          <widget class="QWidget" name="tab_2">
+           <attribute name="title">
+            <string>RMS</string>
+           </attribute>
+           <layout class="QGridLayout" name="gridLayout_6">
+            <item row="0" column="0">
+             <widget class="QCameraWidget" name="GLWindow_2" native="true">
+              <property name="enabled">
+               <bool>true</bool>
+              </property>
+              <property name="sizePolicy">
+               <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+                <horstretch>0</horstretch>
+                <verstretch>0</verstretch>
+               </sizepolicy>
+              </property>
+              <property name="maximumSize">
+               <size>
+                <width>10000</width>
+                <height>10000</height>
+               </size>
+              </property>
+             </widget>
+            </item>
+           </layout>
+          </widget>
          </widget>
         </item>
@@ -213,5 +239,5 @@
          <widget class="QLabel" name="label">
           <property name="text">
-           <string>FACT - Raw events viewer - v0.3</string>
+           <string>FACT - Raw events viewer - v0.4</string>
           </property>
          </widget>
@@ -475,5 +501,5 @@
      </layout>
     </item>
-    <item row="1" column="1">
+    <item row="1" column="0">
      <layout class="QGridLayout" name="gridLayout">
       <item row="0" column="7">
@@ -1012,4 +1038,10 @@
    <extends>QGLWidget</extends>
    <header>RawEventsViewer.h</header>
+  </customwidget>
+  <customwidget>
+   <class>QCameraWidget</class>
+   <extends>QWidget</extends>
+   <header>../QCameraWidget.h</header>
+   <container>1</container>
   </customwidget>
  </customwidgets>
