Index: trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc	(revision 703)
+++ trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc	(revision 705)
@@ -14,5 +14,5 @@
 #include "MParList.h"
 #include "MCerPhotEvt.h"
-#include "MCT1Pedestals.h"
+#include "MPedestalCam.h"
 
 ClassImp(MCT1ReadAscii)
@@ -57,9 +57,70 @@
     //  look for the pedestal class in the plist
     //
-    fPedest = (MCT1Pedestals*)pList->FindCreateObj("MCT1Pedestals");
+    fPedest = (MPedestalCam*)pList->FindCreateObj("MPedestalCam");
     if (!fPedest)
         return kFALSE;
 
+    fPedest->InitSize(127);
+
     return kTRUE;
+}
+
+void MCT1ReadAscii::ReadPedestals()
+{
+    *fLog << "MCT1Pedestals::AsciiRead: Reading Pedestals..." << endl;
+
+    //
+    // skip the next 4 values
+    //
+    Float_t val;
+
+    *fIn >> val;
+    *fIn >> val;
+    *fIn >> val;
+    *fIn >> val;
+
+    //
+    //    read in the next 127 numbers as the pedestals
+    //
+    for (Int_t i = 0; i<127; i++)
+    {
+        *fIn >> val;
+
+        if (val > 0.0)
+            (*fPedest)[i].SetSigma(val);
+    }
+}
+
+void MCT1ReadAscii::ReadData()
+{
+    //
+    // clear the list of cerphot-events
+    //
+    fNphot->Clear();
+
+    //
+    // five unsused numbers
+    //
+    Int_t val;
+
+    *fIn >> val;   // ener
+    *fIn >> val;   // zenang
+    *fIn >> val;   // sec1
+    *fIn >> val;   // sec2
+
+    //
+    // read in the number of cerenkov photons and add the 'new' pixel
+    // too the list with it's id, number of photons and error
+    //
+    for (Int_t i = 0; i<127; i++ )
+    {
+        Float_t nphot;
+
+        *fIn >> nphot;
+
+        if (nphot > 0.0)
+            fNphot->AddPixel(i, nphot, (*fPedest)[i].GetSigma());
+    }
+
 }
 
@@ -74,8 +135,8 @@
  
     //
-    // read in a dummy number (event number)
+    // read in the event nr
     //
-    Int_t dummyI;
-    *fIn >> dummyI;
+    Int_t evtnr;
+    *fIn >> evtnr;
 
     //
@@ -89,33 +150,13 @@
     // read in pedestals
     //
-    if (dummyI < 0)
-        fPedest->AsciiRead(*fIn);
+    // FIXME! Set InputStreamID
 
-    //
-    // five unsused numbers
-    //
-    *fIn >> dummyI;   // ener
-    *fIn >> dummyI;   // zenang
-    *fIn >> dummyI;   // sec1
-    *fIn >> dummyI;   // sec2
+    if (evtnr < 0)
+    {
+        ReadPedestals();
+        return kCONTINUE;
+    }
 
-    //
-    // clear the list of cerphot-events
-    //
-    fNphot->Clear();
-
-    //
-    // read in the number of cerenkov photons and add the 'new' pixel
-    // too the list with it's id, number of photons and error
-    //
-    for (Int_t i = 0; i<127; i++ )
-    {
-        Float_t nphot;
-
-        *fIn >> nphot;
-
-        if (nphot > 0.0)
-            fNphot->AddPixel(i, nphot, (*fPedest)[i]);
-    }
+    ReadData();
 
     return kTRUE;
Index: trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h	(revision 703)
+++ trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.h	(revision 705)
@@ -7,13 +7,16 @@
 
 class MCerPhotEvt;
-class MCT1Pedestals;
+class MPedestalCam;
 
 class MCT1ReadAscii : public MTask
 {
 private:
-    TString        fFileName;    //! the file name of the string
-    ifstream      *fIn;          //! the inputfile
-    MCerPhotEvt   *fNphot;       //! the data container for all data.
-    MCT1Pedestals *fPedest;      //! ct1 pedestals
+    TString       fFileName;    //! the file name of the string
+    ifstream     *fIn;          //! the inputfile
+    MCerPhotEvt  *fNphot;       //! the data container for all data.
+    MPedestalCam *fPedest;      //! ct1 pedestals
+
+    void ReadPedestals();
+    void ReadData();
 
 public:
Index: trunk/MagicSoft/Mars/manalysis/Makefile
===================================================================
--- trunk/MagicSoft/Mars/manalysis/Makefile	(revision 703)
+++ trunk/MagicSoft/Mars/manalysis/Makefile	(revision 705)
@@ -28,6 +28,5 @@
 .SUFFIXES: .c .cc .cxx .h .hxx .o 
 
-SRCFILES = MCT1Pedestals.cc \
-	   MCT1ReadAscii.cc \
+SRCFILES = MCT1ReadAscii.cc \
            MPedestalCam.cc \
            MPedestalPix.cc \
