Index: trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc	(revision 3190)
+++ trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.cc	(revision 3199)
@@ -108,5 +108,5 @@
 //
 MPedCalcPedRun::MPedCalcPedRun(const char *name, const char *title)
-    : fRawEvt(NULL), fPedestals(NULL), fSignals(NULL)
+    : fRawEvt(NULL), fPedestals(NULL)
 {
     fName  = name  ? name  : "MPedCalcPedRun";
@@ -121,15 +121,9 @@
 void MPedCalcPedRun::Clear(const Option_t *o)
 {
-
-  fNumHiGainSamples = 0;
-  fNumPixels        = 0;
-  fNumSamplesTot    = 0;
-  
-  fRawEvt    = NULL;
-  fPedestals = NULL;
-  fSignals   = NULL;
-
-  return;
-  
+    fNumHiGainSamples = 0;
+    fNumSamplesTot    = 0;
+
+    fRawEvt    = NULL;
+    fPedestals = NULL;
 }
 
@@ -148,4 +142,6 @@
 Int_t MPedCalcPedRun::PreProcess( MParList *pList )
 {
+    Clear();
+
     fRawEvt = (MRawEvtData*)pList->FindObject("MRawEvtData");
     if (!fRawEvt)
@@ -159,8 +155,4 @@
         return kFALSE;
 
-    fSignals = (MExtractedSignalCam*)pList->FindObject("MExtractedSignalCam");
-
-    fNumSamplesTot=0;
-
     return kTRUE;
 }
@@ -186,14 +178,14 @@
             return kTRUE;
 
-    fNumPixels = fPedestals->GetSize();
-
-    if(fSumx.GetSize()==0)
-      {
-	fSumx.Set(fNumPixels);
-	fSumx2.Set(fNumPixels);
+    Int_t n = fPedestals->GetSize();
+
+    if (fSumx.GetSize()==0)
+    {
+	fSumx.Set(n);
+	fSumx2.Set(n);
 
 	fSumx.Reset();
 	fSumx2.Reset();
-      }
+    }
 
     // Calculate an even number for the hi gain samples to avoid
Index: trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h	(revision 3190)
+++ trunk/MagicSoft/Mars/manalysis/MPedCalcPedRun.h	(revision 3199)
@@ -1,12 +1,4 @@
 #ifndef MARS_MPedCalcPedRun
 #define MARS_MPedCalcPedRun
-
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-// MPedCalcPedRun                                                          //
-//                                                                         //
-// Evaluate the pedestals from pedestal runs                               //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
 
 #ifndef MARS_MTask
@@ -14,19 +6,18 @@
 #endif
 
+#ifndef ROOT_TArrayF
 #include <TArrayF.h>
+#endif
 
 class MRawEvtData;
 class MPedestalCam;
-class MExtractedSignalCam;
 
 class MPedCalcPedRun : public MTask
 {
-    Byte_t   fNumHiGainSamples;
-    UShort_t fNumPixels;
-    UInt_t   fNumSamplesTot;
+    Byte_t fNumHiGainSamples;
+    UInt_t fNumSamplesTot;
 
-    MRawEvtData         *fRawEvt;     // raw event data (time slices)
-    MPedestalCam        *fPedestals;  // Pedestals of all pixels in the camera
-    MExtractedSignalCam *fSignals;    // Signals of all pixels in the camera    
+    MRawEvtData  *fRawEvt;     // raw event data (time slices)
+    MPedestalCam *fPedestals;  // Pedestals of all pixels in the camera
 
     TArrayF fSumx;   // sum of values
Index: trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 3190)
+++ trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 3199)
@@ -13,40 +13,39 @@
 class MGeomCam;
 class MPedestalPix;
+
 class MPedestalCam : public MCamEvent, public MParContainer
 {
 private:
+    TClonesArray *fArray;  //-> FIXME: Change TClonesArray away from a pointer?
+    UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
 
-  TClonesArray *fArray;  // FIXME: Change TClonesArray away from a pointer?
-  UInt_t fTotalEntries;  // Total number of times, the Process was executed (to estimate the error of pedestal)
-  
 public:
-  MPedestalCam(const char *name=NULL, const char *title=NULL);
-  ~MPedestalCam();
-  
-  void Clear(Option_t *o="");
-  
-  void InitSize(const UInt_t i);
-  
-  MPedestalPix &operator[](Int_t i);
-  const MPedestalPix &operator[](Int_t i) const;
+    MPedestalCam(const char *name=NULL, const char *title=NULL);
+    ~MPedestalCam();
 
-  // Setters
-  void SetTotalEntries(const UInt_t n)    { fTotalEntries = n; }
+    void Clear(Option_t *o="");
 
-  // Getters
-  UInt_t GetSize()                          const;
-  UInt_t GetTotalEntries()                  const { return fTotalEntries; }
+    void InitSize(const UInt_t i);
 
-  Float_t GetPedestalMin(const MGeomCam *cam) const;
-  Float_t GetPedestalMax(const MGeomCam *cam) const;
-  
-  void Print(Option_t *o="") const;
-  
-  Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
-  void DrawPixelContent(Int_t idx) const;
-  
-  ClassDef(MPedestalCam, 1)	// Storage Container for all pedestal information of the camera
+    MPedestalPix &operator[](Int_t i);
+    const MPedestalPix &operator[](Int_t i) const;
+
+    // Setters
+    void SetTotalEntries(const ULong_t n) { fTotalEntries = n; }
+
+    // Getters
+    Int_t   GetSize()         const;
+    ULong_t GetTotalEntries() const { return fTotalEntries; }
+
+    Float_t GetPedestalMin(const MGeomCam *cam) const;
+    Float_t GetPedestalMax(const MGeomCam *cam) const;
+
+    void Print(Option_t *o="") const;
+
+    Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
+    void DrawPixelContent(Int_t idx) const;
+
+    ClassDef(MPedestalCam, 1)	// Storage Container for all pedestal information of the camera
 };
 
 #endif
-
