Index: /trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 763)
+++ /trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc	(revision 764)
@@ -23,9 +23,12 @@
 \* ======================================================================== */
 
-/////////////////////////////////////////////////////////////////////////////
-//                                                                         //
-//   MCerPhotCalc                                                          //
-//                                                                         //
-/////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//                                                                          //
+//   MCerPhotCalc                                                           //
+//                                                                          //
+//   This is a task which calculates the number of photons from the FADC    //
+//   time slices. At the moment it integrates simply the FADC values.       //
+//                                                                          //
+//////////////////////////////////////////////////////////////////////////////
 
 #include "MCerPhotCalc.h"
@@ -43,8 +46,8 @@
 ClassImp(MCerPhotCalc)
 
-    MRawEvtData  *fRawEvt;     // raw event data (time slices)
-    MPedestalCam *fPedestals;  // Pedestals of all pixels in the camera
-    MCerPhotEvt  *fCerPhotEvt; // Cerenkov Photon Event used for calculation
-
+// --------------------------------------------------------------------------
+//
+// Default constructor.
+//
 MCerPhotCalc::MCerPhotCalc(const char *name, const char *title)
 {
@@ -53,4 +56,14 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// The PreProcess searches for the following input containers:
+//  - MRawEvtData
+//  - MPedestalCam
+//
+// The following output containers are also searched and created if
+// they were not found:
+//  - MCerPhotEvt
+//
 Bool_t MCerPhotCalc::PreProcess( MParList *pList )
 {
@@ -76,4 +89,9 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Calculate the integral of the FADC time slaices and store them as a new
+// pixel in the MCerPhotEvt container.
+//
 Bool_t MCerPhotCalc::Process()
 {
Index: /trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 763)
+++ /trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc	(revision 764)
@@ -38,9 +38,11 @@
 ClassImp(MCerPhotEvt)
 
+// --------------------------------------------------------------------------
+//
+// Creates a MCerPhotPix object for each pixel in the event
+//
 MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0)
 {
-  //   the default constructor 
-
-  
+
   *fName  = name  ? name  : "MCerPhotEvt";
   *fTitle = name  ? name  : "(Number of Photon)-Event Information";
@@ -54,4 +56,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// This is not yet implemented like it should.
+//
 void MCerPhotEvt::Draw(Option_t* option) 
 {
@@ -68,24 +74,29 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// add a new pixel to the list and increase the number
+// of valid pixels in the list by one
+//
 void MCerPhotEvt::AddPixel(Int_t id, Float_t nph, Float_t err)
 {
-    //
-    // add a new pixel to the list and increase the number
-    // of valid pixels in the list by one
-    //
-
     // TClonesArray -> 'operator new with placement' should be used
     new ((*fPixels)[fNumPixels++]) MCerPhotPix( id, nph, err);
 }
 
+// --------------------------------------------------------------------------
+//
+// reset counter and delete netries in list.
+//
 void MCerPhotEvt::Clear(Option_t *)
 {
-    //
-    // reset counter and delete netries in list.
-    //
     fNumPixels = 0 ;
     fPixels->Clear() ;
 }
 
+// --------------------------------------------------------------------------
+//
+//  Dump the cerenkov photon event to *fLog
+//
 void MCerPhotEvt::Print(Option_t *)
 {
@@ -101,9 +112,10 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Checks if in the pixel list is an entry with pixel id
+//
 Bool_t MCerPhotEvt::IsPixelExisting(Int_t id)
 {
-    //
-    // Checks if in the pixel list is an entry with pixel id
-    //
     const Int_t entries = fPixels->GetEntries();
 
@@ -117,9 +129,10 @@
 } 
 
+// --------------------------------------------------------------------------
+//
+//   Checks if in the pixel list is an entry with pixel id
+//
 Bool_t MCerPhotEvt::IsPixelUsed(Int_t id)
 {
-    //
-    //   Checks if in the pixel list is an entry with pixel id
-    //
     const Int_t entries = fPixels->GetEntries();
 
@@ -135,9 +148,10 @@
 } 
 
+// --------------------------------------------------------------------------
+//
+//   Checks if in the pixel list is an entry with pixel id
+//
 Bool_t MCerPhotEvt::IsPixelCore(Int_t id)
 {
-    //
-    //   Checks if in the pixel list is an entry with pixel id
-    //
     const Int_t entries = fPixels->GetEntries();
 
@@ -153,9 +167,10 @@
 } 
 
+// --------------------------------------------------------------------------
+//
+// get the minimum number of photons of all valid pixels in the list
+//
 Float_t MCerPhotEvt::GetNumPhotonsMin()
 {
-    //
-    // get the minimum number of photons of all valid pixels in the list
-    //
     if (fNumPixels <= 0)
         return -5. ;
@@ -175,9 +190,10 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// get the maximum number of photons of all valid pixels in the list
+//
 Float_t MCerPhotEvt::GetNumPhotonsMax()
 {
-    //
-    // get the maximum number of photons of all valid pixels in the list
-    //
     if (fNumPixels <= 0)
         return 50.;
Index: /trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc
===================================================================
--- /trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc	(revision 763)
+++ /trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc	(revision 764)
@@ -30,21 +30,32 @@
 ClassImp(MCerPhotPix)
 
-MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot ) :
+// --------------------------------------------------------------------------
+//
+// Default constructor. The pixel is assumed as used and not a core pixel.
+//
+MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot) :
     fPixId(pix), fIsUsed(kTRUE), fIsCore(kFALSE), fPhot(phot), fErrPhot(errphot)
 {
 } 
 
+// --------------------------------------------------------------------------
+//
+// Sets the information of one pixel.  The pixel is assumed as used and
+// not a core pixel.
+//
 void MCerPhotPix::SetPixelContent(Int_t pix, Float_t phot, Float_t errphot)
 {
-  fPixId    = pix ; 
-  fIsUsed   = kTRUE ; 
-  fIsUsed   = kFALSE ; 
-  fPhot     = phot ; 
-  fErrPhot  = errphot ; 
+    fPixId   = pix;
+    fIsUsed  = kTRUE;
+    fPhot    = phot;
+    fErrPhot = errphot;
 }
 
+// --------------------------------------------------------------------------
+//
+//  Print information to gLog.
+//
 void MCerPhotPix::Print(Option_t *)
 { 
-  //   information about a pixel
     gLog << "MCerPhotPix: Pixel: "<< fPixId ;
 
Index: /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc
===================================================================
--- /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 763)
+++ /trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc	(revision 764)
@@ -41,4 +41,9 @@
 ClassImp(MRawRunHeader)
 
+// --------------------------------------------------------------------------
+//
+// Default constructor. Creates array which stores the pixel assignment.
+//
+//
 MRawRunHeader::MRawRunHeader(const char *name, const char *title) : fPixAssignment(NULL)
 {
@@ -52,4 +57,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Destructor. Deletes the 'pixel-assignment-array'
+//
 MRawRunHeader::~MRawRunHeader()
 {
@@ -57,4 +66,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Read in one run header from the binary file
+//
 void MRawRunHeader::ReadEvt(istream& fin)
 {
@@ -106,9 +119,10 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// print run header information on *fLog
+//
 void MRawRunHeader::Print(Option_t *t)
 {
-    //
-    // print run header information on screen
-    //
     *fLog << endl;
     *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl;
@@ -145,4 +159,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Return the assigned pixel number for the given FADC channel
+//
 UShort_t MRawRunHeader::GetPixAssignment(UShort_t i) const
 {
@@ -151,4 +169,8 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// return the number of pixel in this event.
+//
 UShort_t MRawRunHeader::GetNumPixel() const
 {
