Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 462)
+++ trunk/MagicSoft/Mars/Changelog	(revision 463)
@@ -1,3 +1,25 @@
                                                                -*-*- END -*-*-
+ 2001/01/11: Harald Kornmayer
+
+ * ./: 
+   readraw.c, Makefile, Makefile.rules, LinkDef.h, MParList.cc, MReadTree.cc, 
+   MReadTree.h, mbase/Makefile, mraw/Makefile	   
+   - small changes in this files. Not really critical. 
+
+   mars.cc 
+   - added the main file for the gui
+
+   mgui/
+   GuiIncl.h, MGMarsMain.cc, GuiLinkDef.h, MGMarsMain.h, MGDataCheckMain.cc,
+   Makefile, MGDataCheckMain.h
+   - added the subdir mgui and this files 
+
+   mdatacheck/
+   DataCheckIncl.h, DataCheckLinkDef.h, MHistosAdc.cc, MHistosAdc.h, 
+   MDumpEvtHeader.cc, MDumpEvtHeader.h, MShowSpect.cc, MShowSpect.h,
+   MFillAdcSpect.cc, MFillAdcSpect.h, MViewAdcSpectra.cc, MViewAdcSpectra.h,
+   MGDisplayAdc.cc, MGDisplayAdc.h, Makefile
+   - added the subdir mdatacheck and this files
+     	
  2000/12/28: Thomas Bretz
   
Index: trunk/MagicSoft/Mars/LinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/LinkDef.h	(revision 462)
+++ trunk/MagicSoft/Mars/LinkDef.h	(revision 463)
@@ -6,2 +6,4 @@
 
 #endif
+
+
Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 462)
+++ trunk/MagicSoft/Mars/Makefile	(revision 463)
@@ -22,6 +22,5 @@
 # @code 
 
-PROGRAM1 = merpp
-PROGRAM2 = readraw
+PROGRAMS = merpp readraw mars
 SOLIB    = mars.so
 
@@ -29,5 +28,9 @@
 #  connect the include files defined in the config.mk file
 #
-INCLUDES = -I. -Imbase -Imraw
+#    WARNING: the result (whether the linkage works or not) depends on the
+#             order of the libraries
+#
+#
+INCLUDES = -I. -Imgui -Imbase -Imraw -Imdatacheck
 
 #
@@ -35,13 +38,11 @@
 #
 
-MARS_LIB = -Llib -lmbase  -lmraw 
-MARS_LIBB = libmbase.a libmraw.a
+MARS_LIB = -Llib -lmgui -lmdatacheck -lmraw -lmbase 
+MARS_LIBB = libmbase.a libmgui.a libmraw.a libmdatacheck.a
 
 
 #------------------------------------------------------------------------------
 
-#.SILENT:
-
-.SUFFIXES: .c .cc .cxx .h .hxx .o 
+.SUFFIXES: .c .cc .h .o 
 
 
@@ -51,19 +52,14 @@
 HEADERS = $(SRCFILES:.cc=.h)
 OBJS    = $(SRCFILES:.cc=.o) 
-OBJS1   = merpp.o 
-OBJS2   = readraw.o
 
 ############################################################
 
-all: rmlib $(PROGRAM1) $(PROGRAM2) $(SOLIB)
+all: rmlib $(PROGRAMS) $(SOLIB)
 
-$(PROGRAM1): $(MARS_LIBB) $(OBJS1) $(OBJS) MCint.o 
-	@echo " Linking $(PROGRAM1) ..." 
-	$(CXX) $(CXXFLAGS) $(OBJS1) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
- 
-$(PROGRAM2): $(MARS_LIBB) $(OBJS2) $(OBJS) MCint.o 
-	@echo " Linking $(PROGRAM2) ..." 
-	$(CXX) $(CXXFLAGS) $(OBJS2) $(OBJS) $(MARS_LIB) MCint.o $(ROOTLIBS) $(ROOTGLIBS) -o $@
-        
+# Use $(CXX) -v ... for a more verbose output
+$(PROGRAMS): $(MARS_LIBB) $(PROGRAMS:=.o) $(OBJS) MCint.o 
+	@echo " Linking $@ ..." 
+	$(CXX) $(CXXFLAGS) $@.o $(OBJS) $(MARS_LIB) MCint.o $(ROOTGLIBS) -o $@
+
 $(SOLIB): $(MARS_LIBB) $(OBJS) MCint.o
 	@echo " Linking $(SOLIB) ..."
@@ -79,7 +75,11 @@
 	(cd mraw; make; cd ..; mv mraw/libmraw.a lib) 
 
-libmocttest.a:
-	@echo " Creating libmocttest.a:"
-	(cd mocttest; make; cd .., mv mocttest/libmocttest.a lib) 
+libmgui.a:
+	@echo " Creating libmgui.a:"
+	(cd mgui; make; cd ..; mv mgui/libmgui.a lib) 
+
+libmdatacheck.a:
+	@echo " Creating libmdatacheck.a:"
+	(cd mdatacheck; make; cd ..; mv mdatacheck/libmdatacheck.a lib) 
         
 dox:
Index: trunk/MagicSoft/Mars/Makefile.conf.osf1
===================================================================
--- trunk/MagicSoft/Mars/Makefile.conf.osf1	(revision 462)
+++ trunk/MagicSoft/Mars/Makefile.conf.osf1	(revision 463)
@@ -14,7 +14,6 @@
 #
 
-INCLUDE_ROOT    = ${ROOTSYS}/include
+INCLUDE_ROOT    = $(ROOTSYS)/include
 INCLUDE_CPLUS   = /usr/include/cxx
-INCLUDE_MBASE   = ./mbase
 
 #
Index: trunk/MagicSoft/Mars/mars.cc
===================================================================
--- trunk/MagicSoft/Mars/mars.cc	(revision 463)
+++ trunk/MagicSoft/Mars/mars.cc	(revision 463)
@@ -0,0 +1,36 @@
+#include <TROOT.h>
+#include <TSystem.h>
+#include <TApplication.h>
+#include <TVirtualX.h>
+#include <TGClient.h>   
+
+#include "MGMarsMain.h"
+
+// **********************************************************************
+//
+//    MARS main program  
+//
+//    The only job of the main program is the initialisation of ROOT and 
+//    the start of the guiinterface for the mars program
+//
+//    started by  h. kornmayer      january, 3rd  2001 
+
+
+int main(int argc, char **argv )
+{
+  // initialise ROOT
+
+  TROOT simple("mars", "MARS - MAGIC analysis and reconstruction software");
+
+  TApplication theApp("App", &argc, argv);
+
+  // start the main window
+  
+  MGMarsMain mainWin(gClient->GetRoot(), 1, 1);     
+  
+  theApp.Run();
+
+  return 0;  
+}
+ 
+
Index: trunk/MagicSoft/Mars/mbase/MParList.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 462)
+++ trunk/MagicSoft/Mars/mbase/MParList.cc	(revision 463)
@@ -54,4 +54,5 @@
   //  check if the object (you want to add) exists
   //
+
   if (!obj) return kTRUE;
 
@@ -97,9 +98,10 @@
 void MParList::Print(Option_t *t)
 {
-    //
-    //   print some information about the current status of MParList
-    //
-    cout << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;
-    cout << endl;
+  //
+  //   print some information about the current status of MParList
+  //
+  cout << "ParList: " << this->GetName() << " <" << this->GetTitle() << ">" << endl;
+  cout << endl;
+  
 }
 
Index: trunk/MagicSoft/Mars/mbase/MReadTree.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 462)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.cc	(revision 463)
@@ -142,5 +142,8 @@
     // get entry
     //
-    fTree->GetEntry(fNumEntry/*++*/);
+    fTree->GetEntry(fNumEntry );
+
+    fNumEntry ++ ; 
+
     return kTRUE;
 }
Index: trunk/MagicSoft/Mars/mbase/MReadTree.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 462)
+++ trunk/MagicSoft/Mars/mbase/MReadTree.h	(revision 463)
@@ -15,5 +15,5 @@
     TTree  *fTree;       // Pointer to tree
 
-    UInt_t  fNumEntry;   // Namber of actual entry
+    UInt_t  fNumEntry;   // Number of actual entry
     UInt_t  fNumEntries; // Number of Events in Tree
 
@@ -28,4 +28,6 @@
     Bool_t PostProcess();
 
+    //    Bool_t GetEvent(Int_t num ) ; 
+
     Bool_t DecEventNum(UInt_t dec=1); // decrease number of event (position in tree)
     Bool_t IncEventNum(UInt_t inc=1); // increase number of event (position in tree)
Index: trunk/MagicSoft/Mars/mbase/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mbase/Makefile	(revision 462)
+++ trunk/MagicSoft/Mars/mbase/Makefile	(revision 463)
@@ -78,5 +78,5 @@
 $(LIB): $(OBJS) BaseCint.o
 	@echo " - Building Library $(LIB) ... "
-	@$(AR) $(LIB) *.o
+	$(AR) $(LIB) *.o
 
 BaseCint.cc: $(HEADERS) 
@@ -84,5 +84,5 @@
 	@echo " - Generating dictionary BaseCint.cc ..."
 
-	@$(ROOTSYS)/bin/rootcint -f BaseCint.cc \
+	$(ROOTSYS)/bin/rootcint -f BaseCint.cc \
 	-c $(INCLUDES) $(HEADERS) BaseIncl.h BaseLinkDef.h
 
Index: trunk/MagicSoft/Mars/mraw/Makefile
===================================================================
--- trunk/MagicSoft/Mars/mraw/Makefile	(revision 462)
+++ trunk/MagicSoft/Mars/mraw/Makefile	(revision 463)
@@ -77,5 +77,5 @@
 $(LIB): $(OBJS) RawCint.o
 	@echo " - Building Library $(LIB) ... "
-	@$(AR) $(LIB) *.o
+	$(AR) $(LIB) *.o
 
 RawCint.cc: $(HEADERS) 
@@ -83,5 +83,5 @@
 	@echo " - Generating dictionary RawCint.cc ..."
 
-	@$(ROOTSYS)/bin/rootcint -f RawCint.cc \
+	$(ROOTSYS)/bin/rootcint -f RawCint.cc \
 	-c $(INCLUDES) $(HEADERS) RawIncl.h RawLinkDef.h 
 
Index: trunk/MagicSoft/Mars/readraw.cc
===================================================================
--- trunk/MagicSoft/Mars/readraw.cc	(revision 462)
+++ trunk/MagicSoft/Mars/readraw.cc	(revision 463)
@@ -17,4 +17,6 @@
 #include "MRawCrateArray.h"
 #include "MInputStreamID.h"
+
+#include "MGMarsMain.h"
 
 /////////////////////////////////////////////////////////////////////////////
@@ -66,5 +68,5 @@
     //  open the file
     //
-    TFile input("delme.root", "READ");
+    TFile input(argv[1], "READ");
 
     //
