Index: trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 1076)
@@ -31,4 +31,8 @@
 #pragma link C++ class MInputStreamID+;
 
+#pragma link C++ class MGTask+;
+#pragma link C++ class MGList+;
+#pragma link C++ class MGGroupFrame+;
+
 #pragma link C++ class MClone+;
 #pragma link C++ class MPrint+;
Index: trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGGroupFrame.cc	(revision 1076)
@@ -0,0 +1,143 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  11/2001 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MGGroupFrame                                                            //
+//                                                                         //
+// This is a group frame derived from TGGroupFrame with some               //
+// enhancements:                                                           //
+//  - It holds a list which deletes all it's members in ~MGGroupFrame      //
+//    (use AddToList to add an object.                                     //
+//  - You can access the members of the list by their widget id (if they   //
+//    have one)                                                            //
+//  - All messages from associated GUI elemets are redirectd to a given    //
+//    task.                                                                //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+#include "MGGroupFrame.h"
+
+#include "MGList.h"
+#include "MGTask.h"
+
+ClassImp(MGGroupFrame);
+
+// --------------------------------------------------------------------------
+//
+//  For a detailed description check TGGroupFrame::TGGroupFrame.
+//  All messages from associated GUI elements are redirected to the given
+//  task.
+//  Creates a MGList object to store Widgets. Use AddToList to Add
+//  objects.
+//
+MGGroupFrame::MGGroupFrame(MGTask *task,
+                           const TGWindow *p, TGString *title,
+                           UInt_t options = kVerticalFrame,
+                           GContext_t norm=GetDefaultGC()(),
+                           FontStruct_t font=GetDefaultFontStruct(),
+                           ULong_t back=GetDefaultFrameBackground())
+    : TGGroupFrame(p, title, options, norm, font, back), TGWidget(-1)
+{
+    fWidgetFlags = 0;
+    fMsgWindow   = p;
+    fTask        = task;
+
+    fList = new MGList;
+}
+
+// --------------------------------------------------------------------------
+//
+//  For a detailed description check TGGroupFrame::TGGroupFrame.
+//  All messages from associated GUI elements are redirected to the given
+//  task.
+//  Creates a MGList object to store Widgets. Use AddToList to Add
+//  objects.
+//
+MGGroupFrame::MGGroupFrame(MGTask *task,
+                           const TGWindow *p, const char *title,
+                           UInt_t options = kVerticalFrame,
+                           GContext_t norm=GetDefaultGC()(),
+                           FontStruct_t font=GetDefaultFontStruct(),
+                           ULong_t back=GetDefaultFrameBackground())
+: TGGroupFrame(p, title, options, norm, font, back), TGWidget(-1)
+{
+    fWidgetFlags = 0;
+    fMsgWindow   = p;
+    fTask        = task;
+
+    fList = new MGList;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Deleted the MGList object and all its members.
+//
+MGGroupFrame::~MGGroupFrame()
+{
+    fList->SetOwner();
+    delete fList;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Add an object to the MGList. All the objects in MGList are deleted
+//  in the destructor MGGroupFrame automatically.
+//  You can add all object which have to exist until the Group Frame is
+//  destroyed (eg. TGLayoutElements)
+//  If an object is also derived from TGWidget you can get a pointer
+//  to it by its widget Id (use FindWidget)
+//
+void MGGroupFrame::AddToList(TObject *obj)
+{
+    fList->Add(obj);
+}
+
+// --------------------------------------------------------------------------
+//
+//  To get an object which has a widget id (is derived from TGWidget) by
+//  its widget id use FindWidget with the widget id of the object you
+//  are searching for. If no object with this widget id exists NULL
+//  is returned. See also MGList::FindWidget(Int_t)
+//
+TObject *MGGroupFrame::FindWidget(Int_t id) const
+{
+    return fList->FindWidget(id);
+}
+
+// --------------------------------------------------------------------------
+//
+//  If you associate an object with this MGGroupFrame object, like in the
+//  following example:
+//
+//   MGGroupFrame *f = new MGGroupFrame(...);
+//   TGTextEntry *entry = new TGTextEntry(...);
+//   entry->Associate(f);
+//
+//  All messages send to the group frame by the GUI elent are redirected
+//  to the task corresponing to the MGGroupFrame.
+//
+Bool_t MGGroupFrame::ProcessMessage(Long_t msg, Long_t param1, Long_t param2)
+{
+    return fTask->ProcessMessage(GET_MSG(msg), GET_SUBMSG(msg), param1, param2);
+}
Index: trunk/MagicSoft/Mars/mbase/MGGroupFrame.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGGroupFrame.h	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGGroupFrame.h	(revision 1076)
@@ -0,0 +1,42 @@
+#ifndef MARS_MGGroupFrame
+#define MARS_MGGroupFrame
+
+#ifndef ROOT_TGFrame
+#include <TGFrame.h>
+#endif
+#ifndef ROOT_TGWidget
+#include <TGWidget.h>
+#endif
+
+class MGTask;
+class MGList;
+
+class MGGroupFrame : public TGGroupFrame, public TGWidget
+{
+    MGTask  *fTask;
+    MGList *fList;
+
+public:
+    MGGroupFrame(MGTask *task,
+                 const TGWindow *p, TGString *title,
+                 UInt_t options = kVerticalFrame,
+                 GContext_t norm=GetDefaultGC()(),
+                 FontStruct_t font=GetDefaultFontStruct(),
+                 ULong_t back=GetDefaultFrameBackground());
+    MGGroupFrame(MGTask *task,
+                 const TGWindow *p, const char *title,
+                 UInt_t options = kVerticalFrame,
+                 GContext_t norm=GetDefaultGC()(),
+                 FontStruct_t font=GetDefaultFontStruct(),
+                 ULong_t back=GetDefaultFrameBackground());
+    virtual ~MGGroupFrame();
+
+    void     AddToList(TObject *obj);
+    TObject *FindWidget(Int_t id) const;
+
+    virtual Bool_t ProcessMessage(Long_t msg, Long_t param1, Long_t param2);
+
+    ClassDef(MGGroupFrame, 0)
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MGList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGList.cc	(revision 1076)
@@ -0,0 +1,161 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  11/2001 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+//  MGList                                                                 //
+//                                                                         //
+//  This is a TList object which has some enhancements for GUI elements.   //
+//  Use GetWidget to search for a GUI element with a given widget id.      //
+//  Add checkes for the existances of a GUI element with the same widget   //
+//  id (for IDs>=0).                                                       //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+#include "MGList.h"
+
+#include <iostream.h>
+
+#include <TClass.h>
+#include <TGWidget.h>
+
+
+ClassImp(MGList);
+
+// --------------------------------------------------------------------------
+//
+//  Does a dynamic cast from a TObject to a TGWidget. This is necesary
+//  if a class derived from TObject inherits also from TGWidget and
+//  you have only a pointer to the TObject available.
+//
+TGWidget *MGList::GetWidget(TObject *obj) const
+{
+    //
+    // - IsA gives a pointer to the parent class entry in the dictionary
+    // - DynamicCast tries to cast obj of class type obj->IsA to one
+    //   of its base classes TGWidget
+    // - This method is ment for dynamic casts (multi inheritance)
+    //
+    //  If this functions makes trouble check for the correct inheritance
+    //  first via obj->InheritsFrom(TGWidget::Class())
+    //
+    //  The root implementation is used, because for space reasons
+    //  the C++ dynamic_cast<TGWidget*> is turned off by the option
+    //  -fno-rtti, which could be used in 'plain' C++
+    //
+    return (TGWidget*)obj->IsA()->DynamicCast(TGWidget::Class(), obj);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Returns kTRUE if the object is derived from TGWidget and a widget
+//  with the TGWidget id of this object is already in the list.
+//  If the object is not derived from TGWidget or no TGWidget object
+//  with the same widget id is existing in the list kFALSE is returned.
+//  If the TGWidget has an object id < 0 kFALSE is always retuned.
+//
+Bool_t MGList::IsExisting(TObject *obj) const
+{
+    const TGWidget *wid = GetWidget(obj);
+
+    //
+    // check whether it is a TGWidget
+    //
+    if (!wid)
+        return kFALSE;
+
+    const Int_t id = wid->WidgetId();
+
+    //
+    // check whether is has a valid id
+    // (not id=-1, which is the standard id)
+    //
+    if (id < 0)
+        return kFALSE;
+
+    //
+    // check whether Widget id is already existing in the list
+    //
+    return (Bool_t)FindWidget(id);
+}
+
+// --------------------------------------------------------------------------
+//
+//  If the given object obj is derived from TGWidget and a TGWidget with
+//  the same widget id is already existing in the list the object is
+//  ignored, otherwise it is added to the list via TList::Add(TObject *)
+//
+void MGList::Add(TObject *obj)
+{
+    if (IsExisting(obj))
+    {
+        cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl;
+        return;
+    }
+
+    TList::Add(obj);
+}
+
+// --------------------------------------------------------------------------
+//
+//  If the given object obj is derived from TGWidget and a TGWidget with
+//  the same widget id is already existing in the list the object is
+//  ignored, otherwise it is added to the list via
+//  TList::Add(TObject *, Option_t *)
+//
+void MGList::Add(TObject *obj, Option_t *opt)
+{
+    if (IsExisting(obj))
+    {
+        cout << "Widget with id #" << GetWidget(obj)->WidgetId() << " already in list... ignored." << endl;
+        return;
+    }
+
+    TList::Add(obj, opt);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Search the list for a object derived from TGidget which has the given
+//  widget id. Returns a pointer to this object otherwise NULL.
+//  For IDs < 0 the function returns always NULL.
+//
+TObject *MGList::FindWidget(Int_t id) const
+{
+    if (id<0)
+        return NULL;
+
+    TObject *obj;
+    TIter Next(this);
+    while ((obj=Next()))
+    {
+        const TGWidget *wid = GetWidget(obj);
+
+        if (!wid)
+            continue;
+
+        if (id == wid->WidgetId())
+            return obj;
+    }
+    return NULL;
+}
Index: trunk/MagicSoft/Mars/mbase/MGList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGList.h	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGList.h	(revision 1076)
@@ -0,0 +1,28 @@
+#ifndef MARS_MGList
+#define MARS_MGList
+
+#ifndef ROOT_TList
+#include <TList.h>
+#endif
+
+class TGWidget;
+
+class MGList : public TList
+{
+private:
+    TGWidget *GetWidget(TObject *obj) const;
+    Bool_t    IsExisting(TObject *obj) const;
+
+public:
+    MGList() : TList() {}
+
+    void Add(TObject *obj);
+    void Add(TObject *obj, Option_t *opt);
+
+
+    TObject *FindWidget(Int_t id) const;
+
+    ClassDef(MGList, 0)
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MGTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGTask.cc	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGTask.cc	(revision 1076)
@@ -0,0 +1,179 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  11/2001 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+//   MGTask                                                                //
+//                                                                         //
+//   A MTask with several enhancments for a graphical interface.           //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#include "MGTask.h"
+
+#include <TMethod.h>
+
+#include "MLog.h"
+#include "MGGroupFrame.h"
+
+ClassImp(MGTask);
+
+// --------------------------------------------------------------------------
+//
+//  Default constructor. Initialized fFrame with NULL.
+//
+MGTask::MGTask(const char *name, const char *title)
+    : fFrame(NULL)
+{
+    fName  = name  ? name  : "MGTask";
+    fTitle = title ? title : "Base class for all tasks with graphical I/O.";
+}
+
+// --------------------------------------------------------------------------
+//
+//  Deletes the GUI if one was created.
+//
+MGTask::~MGTask()
+{
+    if (fFrame)
+        delete fFrame;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Hides the graphical interface if existing and calls
+//  MTask::CallPreProcess
+//
+Bool_t MGTask::CallPreProcess(MParList *plist)
+{
+    HideGui();
+
+    return MTask::CallPreProcess(plist);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Shows the graphical interface if existing and calls
+//  MTask::CallPostProcess
+//
+Bool_t MGTask::CallPostProcess()
+{
+    ShowGui();
+
+    return MTask::CallPostProcess();
+}
+
+// --------------------------------------------------------------------------
+//
+// Get the Widget from the MGGroupFrame (GUI) with the Id id.
+//
+TObject *MGTask::FindWidget(Int_t id) const
+{
+    return fFrame->FindWidget(id);
+}
+
+// --------------------------------------------------------------------------
+//
+//  Process a message. Redirect gui events (eg by calling
+//  TGButton->Associate()) to the MGGroupFrame when Creating the GUI in
+//  CreateGuiElements. And process the messages in the overwritten
+//  ProcessMessage function.
+//
+Bool_t MGTask::ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2)
+{
+    fLog->setf(ios::showbase);
+    *fLog << "Task " << GetDescriptor() << " received gui msg " << hex;
+    *fLog << msg << " " << submsg << " " << param1 << " " << param2 << endl;
+    return kTRUE;
+}
+
+// --------------------------------------------------------------------------
+//
+//  Show the gui (and its gui elements) of the task if existing.
+//
+void MGTask::ShowGui()
+{
+    if (fFrame)
+        fFrame->MapWindow();
+}
+
+// --------------------------------------------------------------------------
+//
+//  Hide the gui (and its gui elements) of the task if existing.
+//
+void MGTask::HideGui()
+{
+    if (fFrame)
+        fFrame->UnmapWindow();
+}
+
+// --------------------------------------------------------------------------
+//
+//  Check whether a gui for this task was already created.
+//  If not create a MGGroupFrame to group the gui elements and add it
+//  to the given frame with the given layout hints.
+//  Now call the overwritten function CreateGuiElements to fill the group
+//  frame.
+//
+void MGTask::CreateGui(TGCompositeFrame *f, TGLayoutHints *layout)
+{
+    //
+    // Check whether frame already exists
+    //
+    if (fFrame)
+    {
+        *fLog << GetDescriptor() << ": Gui already created... skipped." << endl;
+        return;
+    }
+
+    //
+    // Check whether a gui is implemented for this class
+    //  - IsA gives a pointer to the dictionary entry of the mostly
+    //    inherited class of this Task
+    //  - GetMethodAllAny checks for the existance of CreateGuiElements
+    //    in the class and all its base classes
+    //  - now get the dictionary entry of the corresponding class
+    //    (in which the mathos was found)
+    //  - if method isn't overwritten the result is the dictionary
+    //    entry for MGTask.
+    //
+    TMethod *method = IsA()->GetMethodAllAny("CreateGuiElements");
+    if (method->GetClass() == MGTask::Class())
+    {
+        *fLog << "Sorry, " << GetDescriptor();
+        *fLog << " doesn't override CreateGuiElements." << endl;
+        return;
+    }
+
+    //
+    //  create group frame
+    //
+    fFrame = new MGGroupFrame(this, f, ClassName());
+    f->AddFrame(fFrame, layout);
+
+    //
+    // add gui elements
+    //
+    CreateGuiElements(fFrame);
+}
Index: trunk/MagicSoft/Mars/mbase/MGTask.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MGTask.h	(revision 1076)
+++ trunk/MagicSoft/Mars/mbase/MGTask.h	(revision 1076)
@@ -0,0 +1,50 @@
+#ifndef MARS_MGTask
+#define MARS_MGTask
+
+/////////////////////////////////////////////////////////////////////////////
+//                                                                         //
+// MTask                                                                   //
+//                                                                         //
+// Abstract base class for a task                                          //
+//                                                                         //
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef MARS_MTask
+#include "MTask.h"
+#endif
+
+class MParList;
+
+class TGLayoutHints;
+class TGCompositeFrame;
+
+class MGGroupFrame;
+
+class MGTask : public MTask
+{
+private:
+    MGGroupFrame *fFrame;     //!
+
+    virtual void CreateGuiElements(MGGroupFrame *f) {}
+
+    void ShowGui();
+    void HideGui();
+
+protected:
+    TObject *FindWidget(Int_t id) const;
+
+public:
+    MGTask(const char *name=NULL, const char *title=NULL);
+    virtual ~MGTask();
+
+    Bool_t CallPreProcess(MParList *plist);
+    Bool_t CallPostProcess();
+
+    virtual Bool_t ProcessMessage(Int_t msg, Int_t submsg, Long_t param1, Long_t param2);
+
+    void CreateGui(TGCompositeFrame *f, TGLayoutHints *layout);
+
+    ClassDef(MGTask, 0)		//Abstract base class for a task
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MInputStreamID.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MInputStreamID.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MInputStreamID.cc	(revision 1076)
@@ -47,6 +47,5 @@
     fTitle = title;
 
-    fStreamId = "All"; //new char[4];
-    //strcpy(fStreamId, "All");
+    fStreamId = "All";
 }
 
Index: trunk/MagicSoft/Mars/mbase/MParContainer.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.cc	(revision 1076)
@@ -137,5 +137,5 @@
 {
     TROOT::IndentLevel();
-    *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << " : "
+    *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << ", "
         << Int_t(TestBit(kCanDelete)) << endl;
 }
@@ -147,5 +147,5 @@
 void MParContainer::Print(Option_t *) const
 {
-    *fLog <<"OBJ: " << IsA()->GetName() << "\t" << GetName() << "\t" << GetTitle() << endl;
+    *fLog <<"OBJ: " << GetDescriptor() << ": " << GetTitle() << endl;
 }
 
@@ -199,5 +199,5 @@
 {
     *fLog << "To use the the ascii input of " << GetName();
-    *fLog << " you have to overload " << GetName() << "::AsciiRead." << endl;
+    *fLog << " you have to overload " << ClassName() << "::AsciiRead." << endl;
 }
 
@@ -205,4 +205,4 @@
 {
     *fLog << "To use the the ascii output of " << GetName();
-    *fLog << " you have to overload " << GetName() << "::AsciiWrite." << endl;
-}
+    *fLog << " you have to overload " << ClassName() << "::AsciiWrite." << endl;
+}
Index: trunk/MagicSoft/Mars/mbase/MParContainer.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MParContainer.h	(revision 1076)
@@ -100,4 +100,6 @@
     virtual ~MParContainer() {}
 
+    virtual const char *GetDescriptor() const { return Form("%s [%s]", GetName(), ClassName()); }
+
     virtual TObject    *Clone(const char *newname="") const;
     virtual Int_t       Compare(const TObject *obj) const;
@@ -107,5 +109,5 @@
     virtual const char *GetName() const    { return fName.Data(); }
     virtual const char *GetTitle() const   { return fTitle.Data(); }
-    virtual ULong_t     Hash()             { return fName.Hash(); }
+    virtual ULong_t     Hash() const       { return fName.Hash(); }
     virtual Bool_t      IsSortable() const { return kTRUE; }
 
Index: trunk/MagicSoft/Mars/mbase/MParList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 1076)
@@ -227,5 +227,5 @@
 //  check if the object is in the list or not
 //
-TObject *MParList::FindObject(TObject *obj) const
+TObject *MParList::FindObject(const TObject *obj) const
 {
     return fContainer->FindObject(obj);
Index: trunk/MagicSoft/Mars/mbase/MParList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.h	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MParList.h	(revision 1076)
@@ -44,5 +44,5 @@
 
     TObject       *FindObject(const char *name) const;
-    TObject       *FindObject(TObject *obj) const;
+    TObject       *FindObject(const TObject *obj) const;
     MParContainer *FindCreateObj(const char *classname, const char *objname=NULL);
 
Index: trunk/MagicSoft/Mars/mbase/MTask.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MTask.cc	(revision 1076)
@@ -67,4 +67,5 @@
 #include "MTask.h"
 
+#include <TMethod.h>
 #include <TOrdCollection.h>
 
@@ -73,4 +74,5 @@
 
 #include "MFilter.h"
+#include "MGGroupFrame.h"
 
 ClassImp(MTask);
@@ -176,4 +178,5 @@
 
     fIsPreprocessed = kFALSE;
+
     return PostProcess();
 }
@@ -224,6 +227,6 @@
 void MTask::PrintStatistics(const Int_t lvl) const
 {
-    *fLog << setw(lvl) << " " << GetName() << " [";
-    *fLog << ClassName() << "] \t" << fNumExecutions;
-    *fLog << endl;
-}
+    *fLog << setw(lvl) << " " << GetDescriptor() << "\t";
+    *fLog << dec << fNumExecutions << endl;
+}
+
Index: trunk/MagicSoft/Mars/mbase/MTask.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTask.h	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MTask.h	(revision 1076)
@@ -73,11 +73,11 @@
     UInt_t GetNumExecutions() { return fNumExecutions; }
 
-    Bool_t CallPreProcess(MParList *plist);
-    Bool_t CallProcess();
-    Bool_t CallPostProcess();
+    virtual Bool_t CallPreProcess(MParList *plist);
+    virtual Bool_t CallProcess();
+    virtual Bool_t CallPostProcess();
 
     const TOrdCollection *GetListOfBranches() const { return fListOfBranches; }
 
-    ClassDef(MTask, 0)		//Abstract base class for a task
+    ClassDef(MTask, 0) //Abstract base class for a task
 };
 
Index: trunk/MagicSoft/Mars/mbase/MTaskList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.cc	(revision 1076)
@@ -197,5 +197,5 @@
 //  check if the object is in the list or not
 //
-TObject *MTaskList::FindObject(TObject *obj) const
+TObject *MTaskList::FindObject(const TObject *obj) const
 {
     return fTasks->FindObject(obj);
@@ -360,10 +360,9 @@
         *fLog << "Execution Statistics: " << endl;
         *fLog << "---------------------" << endl;
-        *fLog << GetName() << " [" << ClassName() << "]" << endl;
+        *fLog << GetDescriptor() << endl;
     }
     else
     {
-        *fLog << setw(lvl) << " " << GetName() << " [";
-        *fLog << ClassName() << "]" << endl;
+        *fLog << setw(lvl) << " " << GetDescriptor() << endl;
     }
 
@@ -380,5 +379,5 @@
 void MTaskList::Print(Option_t *t) const
 {
-    *fLog << "TaskList: " << GetName() << " <" << GetTitle() << ">" << endl;
+    *fLog << GetDescriptor() << " <" << GetTitle() << ">" << endl;
 
     fTasks->Print();
Index: trunk/MagicSoft/Mars/mbase/MTaskList.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MTaskList.h	(revision 1076)
@@ -40,5 +40,5 @@
 
     TObject *FindObject(const char *name) const;
-    TObject *FindObject(TObject *obj) const;
+    TObject *FindObject(const TObject *obj) const;
 
     Bool_t PreProcess(MParList *pList);
Index: trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 1076)
@@ -43,6 +43,6 @@
     fLog->setf(ios::showbase);
     *fLog << "MTime Information:  " << hex 
-        << " " <<setfill('0') << setw(2) << fTimeStamp[0]
-        << " " <<setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;
+        << " " << setfill('0') << setw(2) << fTimeStamp[0]
+        << " " << setfill('0') << setw(2) << fTimeStamp[1] << endl << endl;
 } 
 
Index: trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/MWriteRootFile.cc	(revision 1076)
@@ -116,5 +116,5 @@
 void MWriteRootFile::Print(Option_t *) const
 {
-    cout << "File: " << GetFileName() << endl;
+    cout << "File: " << GetFileName() << dec << endl;
     cout << "--------------------------------------------------" << endl;
 
Index: trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mbase/Makefile	(revision 1052)
+++ trunk/MagicSoft/Mars/mbase/Makefile	(revision 1076)
@@ -44,4 +44,7 @@
            MWriteAsciiFile.cc \
            MWriteRootFile.cc \
+           MGList.cc \
+           MGTask.cc \
+           MGGroupFrame.cc \
 	   MArray.cc \
 	   MArrayB.cc \
