Index: trunk/MagicSoft/Mars/mmain/MAnalysis.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MAnalysis.cc	(revision 949)
+++ trunk/MagicSoft/Mars/mmain/MAnalysis.cc	(revision 950)
@@ -30,6 +30,38 @@
 
 enum {
-  M_BUTTON_HILLAS
+    M_BUTTON_HILLAS,
+    M_CHECK_DISPLHIL
 };
+
+void MAnalysis::AddButtons()
+{
+    TGTextButton *hillas = new TGTextButton(fTop2, "Calculate Standard Hillas", M_BUTTON_HILLAS);
+
+    hillas->Associate(this);
+
+    fList->Add(hillas);
+
+    TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5);
+    fList->Add(laybut);
+
+    fTop2->AddFrame(hillas, laybut);
+}
+
+void MAnalysis::AddSetupTab()
+{
+    TGCompositeFrame *frame = CreateNewTab("Setup");
+
+    TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5);
+    fList->Add(laybut);
+
+    fCheckButton1 = new TGCheckButton(frame, "Display Hillas Histograms when finished", M_CHECK_DISPLHIL);
+    fCheckButton2 = new TGCheckButton(frame, "Display Star Map Histogram when finished", M_CHECK_DISPLHIL);
+
+    fList->Add(fCheckButton1);
+    fList->Add(fCheckButton2);
+
+    frame->AddFrame(fCheckButton1, laybut);
+    frame->AddFrame(fCheckButton2, laybut);
+}
 
 MAnalysis::MAnalysis(const TGWindow *main, const TGWindow *p,
@@ -37,14 +69,6 @@
 : MBrowser(main, p, w, h)
 {
-    TGTextButton *hillas = new TGTextButton(fTop2, "Calculate Standard Hillas", M_BUTTON_HILLAS);
-
-    hillas->Associate(this);
-
-    fList->Add(hillas);
-
-    TGLayoutHints *laybut = new TGLayoutHints(kLHintsTop|kLHintsLeft, 10, 10, 5, 5);
-    fList->Add(laybut);
-
-    fTop2->AddFrame(hillas, laybut);
+    AddButtons();
+    AddSetupTab();
 
     MapSubwindows();
@@ -74,9 +98,12 @@
 #include "MHillas.h"
 
-void MAnalysis::CalculateHillas(const char *fname)
+void MAnalysis::CalculateHillas() const
 {
     //
     // This is a demonstration program which calculates the Hillas
     // parameter out of a Magic root file.
+
+    const Bool_t displhillas  = fCheckButton1->GetState();
+    const Bool_t displstarmap = fCheckButton2->GetState();
 
     //
@@ -131,5 +158,5 @@
     //   CalEvents:  Calibration Events
     //
-    MReadTree      read("Events", fname);
+    MReadTree      read("Events", fInputFile);
     MCerPhotCalc   ncalc;
     MImgCleanStd   clean;
@@ -137,17 +164,4 @@
     MFillH         hfill(&hillas, hists);
     MFillH         sfill(&hillas, smap);
-    //
-    // FIXME:
-    // -----
-    // I cannot use MFillH fill("name", "name") here.
-    // for me it is not yet clear why this doesn't work
-    //
-
-    /*
-     MWriteRootFile write("hillas.root");
-     write.AddContainer("MHillas");
-     write.AddContainer("MHHillas");
-     write.AddContainer(smap);
-     */
 
     tlist.AddToList(&read);
@@ -157,5 +171,4 @@
     tlist.AddToList(&hfill);
     tlist.AddToList(&sfill);
-    //tlist.AddToList(&write);
 
     //
@@ -174,6 +187,10 @@
     // After the analysis is finished we can display the histograms
     //
-    hists->Draw();
-    smap->Draw();
+
+    if (displhillas)
+        hists->Draw();
+
+    if (displstarmap)
+        smap->Draw();
 }
 
@@ -199,5 +216,5 @@
         {
         case M_BUTTON_HILLAS:
-            CalculateHillas(fInputFile);
+            CalculateHillas();
             return kTRUE;
         }
Index: trunk/MagicSoft/Mars/mmain/MAnalysis.h
===================================================================
--- trunk/MagicSoft/Mars/mmain/MAnalysis.h	(revision 949)
+++ trunk/MagicSoft/Mars/mmain/MAnalysis.h	(revision 950)
@@ -10,8 +10,16 @@
 #endif
 
+class TGCheckButton;
+
 class MAnalysis : public MBrowser
 {
 private:
-    void CalculateHillas(const char *fname);
+    TGCheckButton *fCheckButton1;
+    TGCheckButton *fCheckButton2;
+
+    void CalculateHillas() const;
+
+    void AddButtons();
+    void AddSetupTab();
 
 public:
Index: trunk/MagicSoft/Mars/mmain/MBrowser.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 949)
+++ trunk/MagicSoft/Mars/mmain/MBrowser.cc	(revision 950)
@@ -175,6 +175,8 @@
 }
 
-void MBrowser::CreateTab1(TGCompositeFrame *frame)
-{
+void MBrowser::CreateTab1()
+{
+    TGCompositeFrame *frame = CreateNewTab("Input File");
+
     //
     // Create three frames for the first tab
@@ -202,4 +204,9 @@
 }
 
+TGCompositeFrame *MBrowser::CreateNewTab(const char *name)
+{
+    return fTabs->AddTab(name);
+}
+
 void MBrowser::CreateLowerFrame(TGCompositeFrame *framelow)
 {
@@ -211,18 +218,16 @@
     // ----- Create Object holding the Tabs -----
     //
-    TGTab *tabs = new TGTab(framelow, 400, 400);
-    fList->Add(tabs);
+    fTabs = new TGTab(framelow, 400, 400);
+    fList->Add(fTabs);
 
     TGLayoutHints *laytabs = new TGLayoutHints(kLHintsBottom|kLHintsExpandX|kLHintsExpandY, 5, 5, 5, 5);
     fList->Add(laytabs);
 
-    framelow->AddFrame(tabs, laytabs);
+    framelow->AddFrame(fTabs, laytabs);
 
     //
     // --- Create the first tab of the tabs ---
     //
-    TGCompositeFrame *tf = tabs->AddTab("Input File");
-
-    CreateTab1(tf);
+    CreateTab1();
 }
 
Index: trunk/MagicSoft/Mars/mmain/MBrowser.h
===================================================================
--- trunk/MagicSoft/Mars/mmain/MBrowser.h	(revision 949)
+++ trunk/MagicSoft/Mars/mmain/MBrowser.h	(revision 950)
@@ -11,4 +11,5 @@
 
 class TList;
+class TGTab;
 class TGListView;
 class TGComboBox;
@@ -19,21 +20,23 @@
 {
 private:
-    TGComboBox        *fDir;
+    TGTab            *fTabs;
 
-    TGPictureButton   *fCdup;
-    TGPictureButton   *fListMode;
-    TGPictureButton   *fDetail;
+    TGComboBox       *fDir;
 
-    TGFileContainer   *fFileCont;
-    TGListView        *fFileView;
+    TGPictureButton  *fCdup;
+    TGPictureButton  *fListMode;
+    TGPictureButton  *fDetail;
 
-    const TGPicture   *fPic1;
-    const TGPicture   *fPic2;
-    const TGPicture   *fPic3;
+    TGFileContainer  *fFileCont;
+    TGListView       *fFileView;
+
+    const TGPicture  *fPic1;
+    const TGPicture  *fPic2;
+    const TGPicture  *fPic3;
 
     void CreateMenuBar();
+    void CreateTab1();
     void CreateUpperFrame(TGCompositeFrame *frameup);
     void CreateLowerFrame(TGCompositeFrame *framelow);
-    void CreateTab1(TGCompositeFrame *frame);
     void CreateDirListMenu(TGCompositeFrame *frame);
     void CreateDirListBox(TGCompositeFrame *frame);
@@ -42,4 +45,6 @@
     TList  *fList;
     Char_t  fInputFile[256];
+
+    TGCompositeFrame *CreateNewTab(const char *name);
 
     void DisplError(const char *txt);
