Index: /trunk/MagicSoft/Mars/Changelog
===================================================================
--- /trunk/MagicSoft/Mars/Changelog	(revision 887)
+++ /trunk/MagicSoft/Mars/Changelog	(revision 888)
@@ -1,3 +1,13 @@
                                                                   -*-*- END -*-*-
+ 2001/07/20: Thomas Bretz
+ 
+   * mhist/MH.cc:
+     - added comments
+
+   * mhist/MFillH.cc:
+     - added comments
+
+
+
  2001/07/19: Thomas Bretz
  
@@ -7,4 +17,10 @@
    * mbase/MTaskList.cc:
      - changed the wrong 'break' for kCONTINUE into 'return kTRUE'
+     
+   * mhist/MH.[cc,h]
+     - added
+
+   * mhist/MFillH.[cc,h]
+     - added
      
    * mhist/HistLinkDef.h:
Index: /trunk/MagicSoft/Mars/mhist/MFillH.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 887)
+++ /trunk/MagicSoft/Mars/mhist/MFillH.cc	(revision 888)
@@ -16,6 +16,5 @@
 !
 !
-!   Author(s): Harald Kornmayer 1/2001 (harald@mppmu.mpg.de)
-!   Author(s): Thomas Bretz  12/2000 (tbretz@uni-sw.gwdg.de)
+!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
 !
 !   Copyright: MAGIC Software Development, 2000-2001
@@ -26,14 +25,20 @@
 //////////////////////////////////////////////////////////////////////////////
 //                                                                          //
-//  MFillHHillas                                                            //
+//  MFill                                                                   //
 //                                                                          //
-//  This task fills the hillas parameter from MHillas into                  //
-//  histograms (MHHillas)                                                   //
+//  This is a common interface (task) to fill mars histograms. Every mars   //
+//  histogram which is derived from MH can be filled with this task.        //
+//                                                                          //
+//  You must specifiy the parameter container with which data the histogram //
+//  container should be filled, and the histogram container which has       //
+//  to be filled. This can be done by either specifing the name of the      //
+//  objects in the parameter list or by specifiing a pointer to the object. //
+//  (s. Constructor)                                                        //
 //                                                                          //
 //  Input Containers:                                                       //
-//   MHillas                                                                //
+//   A parameter container                                                  //
 //                                                                          //
 //  Output Containers:                                                      //
-//   MHHillas                                                               //
+//   A histogram container                                                  //
 //                                                                          //
 //////////////////////////////////////////////////////////////////////////////
@@ -49,4 +54,8 @@
 
 // --------------------------------------------------------------------------
+//
+// Initializes name and title of the object. It is called by all
+// constructors.
+//
 void MFillH::Init(const char *name, const char *title)
 {
@@ -55,4 +64,13 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Constructor.
+//
+// - par is the name of the parameter container which should be filled into
+//   the histogram
+// - hist is the name of the histogram container (which must have been
+//   derived from MH)
+//
 MFillH::MFillH(const char *par, const char *hist, const char *name, const char *title)
 {
@@ -63,4 +81,13 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Constructor.
+//
+// - par is a pointer to the instance of your parameter container from which
+//   the data should be used to fill the histogram.
+// - hist is the name of the histogram container (which must have been
+//   derived from MH)
+//
 MFillH::MFillH(const MParContainer *par, const char *hist, const char *name, const char *title)
 {
@@ -71,4 +98,13 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Constructor.
+//
+// - par is a pointer to the instance of your parameter container from which
+//   the data should be used to fill the histogram.
+// - hist is a pointer to the instance of your histogram container (which must
+//   have been derived from MH) into which the data should flow
+//
 MFillH::MFillH(const char *par, MH *hist, const char *name, const char *title)
 {
@@ -79,4 +115,13 @@
 }
 
+// --------------------------------------------------------------------------
+//
+// Constructor.
+//
+// - par is a pointer to the instance of your parameter container from which
+//   the data should be used to fill the histogram.
+// - hist is the name of the histogram container (which must have been
+//   derived from MH)
+//
 MFillH::MFillH(const MParContainer *par, MH *hist, const char *name, const char *title)
 {
@@ -88,4 +133,11 @@
 
 // --------------------------------------------------------------------------
+//
+// Checks the parameter list for the existance of the parameter container. If
+// the name of it was given in the constructor. It checks also for the
+// existance of the histogram container in the parameter list if a name was
+// given. If it is not available it tried to create a histogram container
+// with the same type as the given object name.
+//
 Bool_t MFillH::PreProcess(MParList *pList)
 {
@@ -111,4 +163,7 @@
 
 // --------------------------------------------------------------------------
+//
+// Fills the data from the parameter conatiner into the histogram container
+//
 Bool_t MFillH::Process()
 {
@@ -118,4 +173,9 @@
 } 
 
+// --------------------------------------------------------------------------
+//
+// Set the ReadyToSave flag of the histogram container, because now all data
+// has been filled into the histogram.
+//
 Bool_t MFillH::PostProcess()
 {
Index: /trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- /trunk/MagicSoft/Mars/mhist/MH.cc	(revision 887)
+++ /trunk/MagicSoft/Mars/mhist/MH.cc	(revision 888)
@@ -1,9 +1,40 @@
-///////////////////////////////////////////////////////////////////////
-//
-// MHHillas
-//
-// This class contains histograms for every Hillas parameter
-//
-///////////////////////////////////////////////////////////////////////
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  07/2001 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+//////////////////////////////////////////////////////////////////////////////
+//                                                                          //
+//  MH                                                                      //
+//                                                                          //
+//  This is a base tasks for mars histograms. It defines a common interface //
+//  for filling the histograms with data (MH::Fill) which is used by a      //
+//  common 'filler' (s. MFillH)                                             //
+//                                                                          //
+//  If you want to create your own histogram class the new class must be    //
+//  derived from MH (instead of the base MParContainer) and you must        //
+//  the fill function of MH. This is the function which is called to fill   //
+//  the histogram(s) by the data of a corresponding parameter container.    //
+//                                                                          //
+//////////////////////////////////////////////////////////////////////////////
 
 #include "MH.h"
@@ -11,4 +42,9 @@
 ClassImp(MH);
 
+// --------------------------------------------------------------------------
+//
+// Default Constructor. It sets name and title only. Typically you won't
+// need to change this.
+//
 MH::MH(const char *name, const char *title)
 {
