Index: trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
===================================================================
--- trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 5085)
+++ trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx	(revision 5094)
@@ -21,7 +21,7 @@
 //
 // $RCSfile: camera.cxx,v $
-// $Revision: 1.70 $
+// $Revision: 1.71 $
 // $Author: moralejo $ 
-// $Date: 2004-09-16 15:23:12 $
+// $Date: 2004-09-17 09:20:52 $
 //
 ////////////////////////////////////////////////////////////////////////
@@ -1075,6 +1075,6 @@
     for (int i=0;i<numberBranches;i++) {
       EvtData[i] = new MRawEvtData();
-      EvtData[i]->Init(RunHeader);     //  We need thr RunHeader to read
-                                       //  number of pixels
+      EvtData[i]->InitRead(RunHeader);   //  We need the RunHeader to read
+                                         //  number of pixels
     }
   }
@@ -1182,5 +1182,5 @@
   //  Fill branches for MRawRunHeader
 
-  RunHeader->SetMagicNumber(kMagicNumber);
+  RunHeader->SetMagicNumber(MRawRunHeader::kMagicNumber);
   RunHeader->SetFormatVersion(4);
   RunHeader->SetSoftVersion((UShort_t) (VERSION*10));
@@ -2294,5 +2294,5 @@
 	      for(int i=0;i<numberBranches;i++){
 		EvtHeader[i]->Clear() ;
-		EvtData[i]->DeletePixels();
+		EvtData[i]->ResetPixels (0, 0);
 	      }
 	    }
@@ -2545,5 +2545,5 @@
 	  for(int ict=0;ict<ct_Number;ict++){
 	    if (Write_RawEvt) EvtHeader[ict]->Clear() ;
-	    if (Write_RawEvt) EvtData[ict]->DeletePixels();
+	    if (Write_RawEvt) EvtData[ict]->ResetPixels(0,0);
 	    if (Write_McTrig) McTrig[ict]->Clear() ;
 	    if (Write_McEvt) McEvt[ict]->Clear() ; 
@@ -4363,4 +4363,12 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.70  2004/09/16 15:23:12  moralejo
+//
+// Changed "flashadc" and "trigger" in procedure produce_nsbrates from
+// objects to pointers (followed by dynamical allocation). This is only
+// to avoid memory problems (-> segmentation fault) in some systems.
+// Introduced missing initialization to 0 of *itotnphe in produce_phes.
+// Now the number of phes produced by stars shown on the screen make sense.
+//
 //
 // Revision 1.69  2004/03/30
