Index: trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc	(revision 1035)
+++ trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc	(revision 1048)
@@ -232,4 +232,6 @@
     // too the list with it's id, number of photons and error
     //
+    fNphot->InitSize(127);
+
     for (Int_t i = 0; i<127; i++ )
     {
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1035)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 1048)
@@ -45,8 +45,9 @@
 #include "MLogManip.h"
 
-#include "MRawEvtPixelIter.h"
+#include "MRawEvtData.h"       // MRawEvtData::GetNumPixels
 #include "MCerPhotEvt.h"
 #include "MPedestalPix.h"
 #include "MPedestalCam.h"
+#include "MRawEvtPixelIter.h"
 
 ClassImp(MCerPhotCalc);
@@ -65,5 +66,4 @@
     AddToBranchList("fHiGainFadcSamples");
     AddToBranchList("fLoGainFadcSamples");
-
 }
 
@@ -108,9 +108,9 @@
 Bool_t MCerPhotCalc::Process()
 {
+    fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
+
     MRawEvtPixelIter pixel(fRawEvt);
-
     while (pixel.Next())
     {
-
         const UInt_t pixid = pixel.GetPixelId();
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1035)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 1048)
@@ -47,10 +47,5 @@
     fTitle = title ? title : "(Number of Photon)-Event Information";
 
-    fPixels = new TClonesArray ("MCerPhotPix", 577);
-
-    //
-    // FIXME: is this really necessary?
-    //
-    Reset();
+    fPixels = new TClonesArray ("MCerPhotPix", 0);
 }
 
@@ -82,5 +77,5 @@
     // TClonesArray -> 'operator new with placement' should be used
 
-    fPixels->ExpandCreate(fNumPixels);
+    //    fPixels->ExpandCreate(fNumPixels);
     new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, err);
 }
@@ -93,5 +88,5 @@
 {
     fNumPixels = 0;
-//    fPixels->Delete();
+    fPixels->Delete();
 }
 
Index: trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1035)
+++ trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h	(revision 1048)
@@ -22,4 +22,6 @@
 
     UInt_t GetNumPixels() const { return fNumPixels; }
+    void   InitSize(UInt_t num) { fPixels->Expand(num); }
+
     void   AddPixel(Int_t id, Float_t nph, Float_t err);
 
@@ -31,6 +33,6 @@
     Float_t GetNumPhotonsMax() const;
 
-    MCerPhotPix &operator[](int i)       { return *(MCerPhotPix*)(fPixels->At(i)); }
-    MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->At(i)); }
+    MCerPhotPix &operator[](int i)       { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
+    MCerPhotPix &operator[](int i) const { return *(MCerPhotPix*)(fPixels->UncheckedAt(i)); }
 
     void Reset();
Index: trunk/MagicSoft/Mars/manalysis/MPedestalCam.h
===================================================================
--- trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 1035)
+++ trunk/MagicSoft/Mars/manalysis/MPedestalCam.h	(revision 1048)
@@ -23,8 +23,8 @@
     ~MPedestalCam();
 
-    void InitSize(const UInt_t i) { fArray->ExpandCreateFast(i); }
+    void InitSize(const UInt_t i) { fArray->ExpandCreate(i); }
 
-    MPedestalPix &operator[](Int_t i)       { return *(MPedestalPix*)fArray->At(i); }
-    MPedestalPix &operator[](Int_t i) const { return *(MPedestalPix*)fArray->At(i); }
+    MPedestalPix &operator[](Int_t i)       { return *(MPedestalPix*)fArray->UncheckedAt(i); }
+    MPedestalPix &operator[](Int_t i) const { return *(MPedestalPix*)fArray->UncheckedAt(i); }
 
     ClassDef(MPedestalCam, 1)	// Storage Container for all pedestal information of the camera
