Index: /branches/Corsika7405Compatibility/Makefile
===================================================================
--- /branches/Corsika7405Compatibility/Makefile	(revision 18179)
+++ /branches/Corsika7405Compatibility/Makefile	(revision 18180)
@@ -78,6 +78,6 @@
           mmovie \
           mtools \
-          mmuon \
-	  mdebug 
+          mmuon 
+	 
 
 LIBNOVA_PATH := `which libnovaconfig`
Index: /branches/Corsika7405Compatibility/mcorsika/MCorsikaRead.cc
===================================================================
--- /branches/Corsika7405Compatibility/mcorsika/MCorsikaRead.cc	(revision 18179)
+++ /branches/Corsika7405Compatibility/mcorsika/MCorsikaRead.cc	(revision 18180)
@@ -54,4 +54,6 @@
 #include "MCorsikaEvtHeader.h"
 
+#include "../msim/MPhotonData.h"
+
 #include "MPhotonEvent.h"
 
@@ -476,8 +478,12 @@
 Int_t MCorsikaRead::Process()
 {
-	//std::cout << "Process \n\n" << std::endl;
+	fEvent->Clear();
+	fEvent->Reset();
+	fEvent->Resize(0);
+
+
+	std::cout << "\n\n MCorsikaRead Process " << std::endl;
    while (1)  // loop for multiple input files
    {
-	   //std::cout << "OuterLoop \n\n" << std::endl;
 
       if (fInFormat)
@@ -498,7 +504,4 @@
          Int_t status = kTRUE;
 
-         //std::cout << "||||ReadState: " << fReadState
-        //		 << "  Block: " << fBlockType << "\n\n" << std::endl;
-
          switch (fBlockType)
             {
@@ -516,5 +519,4 @@
                Float_t buffer[272];
                static int asd = 0;
-              // std::cout << "EventHeader |||||| " << ++asd << std::endl;
                if (!fInFormat->Read(buffer, 272 * sizeof(Float_t))) 
                   return kFALSE;
@@ -528,6 +530,4 @@
                status = fEvtHeader->ReadEvt(buffer);
 
-               //fEvtHeader->Print();
-               //std::cout << "TotReuse: " << fEvtHeader->GetTotReuse();
 
                if (fArrayIdx >= (Int_t)fEvtHeader->GetTotReuse())
@@ -543,6 +543,5 @@
 
             case 1204: // top level block for one array (only for eventio data)
-            //	std::cout << "EventIO1 |||||||" << std::endl;
-               if (fArrayIdx < 0 || fArrayIdx == fBlockIdentifier)
+              if (fArrayIdx < 0 || fArrayIdx == fBlockIdentifier)
                   { 
                   fReadState = 4;
@@ -558,14 +557,9 @@
             case 1205: // eventio data
                {
-              // std::cout << "EventIO2 |||||||" << std::endl;
                Int_t telIdx   = fBlockIdentifier % 1000;
-           //    std::cout << "TelIDX: " << telIdx << " fTelescopeIdx:" << fTelescopeIdx
-            //		   << " fBlockVersion" << fBlockVersion << std::endl;
 
                if (fBlockVersion == 0  && (fTelescopeIdx < 0 || fTelescopeIdx ==  telIdx) )
                {
                   status = fEvent->ReadEventIoEvt(fInFormat);
-
-                  //std::cout << " ArrayIdx:" << fBlockIdentifier / 1000.0 << std::endl;
 
                   Int_t arrayIdx = fBlockIdentifier / 1000;
@@ -579,4 +573,18 @@
                   fEvent->SimWavelength(fRunHeader->GetWavelengthMin(), 
                                           fRunHeader->GetWavelengthMax());
+
+
+                  bool tmpWeight = false;
+                  std::cout << "ReadEventIO Telescope data with " << fEvent->GetNumPhotons() << std::endl;
+                  for(int i=0; i<fEvent->GetNumPhotons(); i++)
+                  {
+
+                	  const MPhotonData &ph = (*fEvent)[i];
+                	  if(ph.GetWeight() != 1)
+                		  tmpWeight = true;
+                  }
+                  if(tmpWeight)
+                	  std::cout << "CorsikaRead Photon weight != 1" << std::endl;
+
                   }
                else
@@ -591,5 +599,4 @@
 
             case 1209:  // the event end
-           // 	std::cout << "EventEnd ||||||" << std::endl;
                status = fEvtHeader->ReadEvtEnd(fInFormat);
                
@@ -608,6 +615,5 @@
 
             case 1210:  // the run end
-            	//std::cout << "RunEnd ||||||" << std::endl;
-               status = fRunHeader->ReadEvtEnd(fInFormat, kTRUE);
+                status = fRunHeader->ReadEvtEnd(fInFormat, kTRUE);
                fNumEvents += fRunHeader->GetNumEvents();
                //fRunHeader->SetReadyToSave();
@@ -637,5 +643,5 @@
 
             case 1109:  // save corsika events
-            	//std::cout << "SaveCorsika ||||||" << std::endl;
+            	std::cout << "Block1109" << std::endl;
                fEvtHeader->InitXY();
                status = fEvent->ReadCorsikaEvt(&fRawEvemtBuffer[0], 
@@ -667,6 +673,4 @@
             }
 
-         std::cout << "Status: " << status << std::endl;
-
          if (status != kTRUE)
             // there was an error while data were read
@@ -674,7 +678,4 @@
 
          Int_t headerStatus =  ReadNextBlockHeader();
-
-         std::cout << "Header Status: " << headerStatus << std::endl;
-
 
          if (headerStatus == kFALSE) 
Index: /branches/Corsika7405Compatibility/mdebug/Makefile
===================================================================
--- /branches/Corsika7405Compatibility/mdebug/Makefile	(revision 18179)
+++ /branches/Corsika7405Compatibility/mdebug/Makefile	(revision 18180)
@@ -19,5 +19,7 @@
 #  connect the include files defined in the config.mk file
 #
-INCLUDES = -I. -I../mbase -I../mgui
+INCLUDES = -I. -I../mbase -I../mgeom -I../msim -I../msignal -I../mcorsika \
+	   -I../mmc -I../mgui -I../mcalib -I../mraw -I../mfileio -I../melectronics \
+	   -I../mtrigger -I../mpedestal -I../msimreflector
 # mgui - MCameraDC <MCamEvent>
 
Index: /branches/Corsika7405Compatibility/msim/MSimAtmosphere.cc
===================================================================
--- /branches/Corsika7405Compatibility/msim/MSimAtmosphere.cc	(revision 18179)
+++ /branches/Corsika7405Compatibility/msim/MSimAtmosphere.cc	(revision 18180)
@@ -786,4 +786,6 @@
 Int_t MSimAtmosphere::Process()
 {
+	std::cout << "MSimAtmo with " << fEvt->GetNumPhotons() << std::endl;
+
     // Get the number of photons in the list
     const Int_t num = fEvt->GetNumPhotons();
@@ -792,4 +794,15 @@
     //         * upgoing particles
     //         * Can we take the full length until the camera into account?
+
+	bool tmpWeight = false;
+	for (int i = 0; i < fEvt->GetNumPhotons(); i++) {
+
+		const MPhotonData &ph = (*fEvt)[i];
+		if (ph.GetWeight() != 1)
+			tmpWeight = true;
+	}
+	if (tmpWeight)
+		std::cout << "MSimAtmo Photon weight != 1 \a\a" << std::endl;
+
 
     // Counter for number of total and final events
@@ -814,4 +827,5 @@
     // Now we shrink the array to the number of new entries.
     fEvt->Shrink(cnt);
+
 
     return kTRUE;
Index: /branches/Corsika7405Compatibility/msim/MSimMMCS.cc
===================================================================
--- /branches/Corsika7405Compatibility/msim/MSimMMCS.cc	(revision 18179)
+++ /branches/Corsika7405Compatibility/msim/MSimMMCS.cc	(revision 18180)
@@ -191,4 +191,6 @@
 Int_t MSimMMCS::Process()
 {
+	std::cout << "MSimMMCS " << std::endl;
+
     fMcEvtBasic->SetEnergy(fEvtHeader->GetTotalEnergy());
     fMcEvtBasic->SetImpact(fEvtHeader->GetImpact());
Index: /branches/Corsika7405Compatibility/msimcamera/MSimBundlePhotons.cc
===================================================================
--- /branches/Corsika7405Compatibility/msimcamera/MSimBundlePhotons.cc	(revision 18179)
+++ /branches/Corsika7405Compatibility/msimcamera/MSimBundlePhotons.cc	(revision 18180)
@@ -147,4 +147,5 @@
     // Initialize a counter for the final number of photons.
     Int_t cnt=0;
+	
 
     // Loop over all photons
