Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 457)
+++ trunk/MagicSoft/Mars/Changelog	(revision 457)
@@ -0,0 +1,29 @@
+                                                               -*-*- END -*-*-
+
+ 2000/12/22 - Thomas Bretz:
+ 
+ * readraw.cc: 
+    - changed some comments and the Root-Name of the program
+    - added check for the existance of the file
+    - changed name of numbers of entries from iEnt to nent
+
+ * dohtml.C:
+    - changed title of converted macros
+    
+ * MRawEvtData.cc:
+    - added a commet in Draw()
+    
+ * MRawEvtPixelIter.[h,cc]:
+    - Added the comment header of the file
+    - removed inheritance from TIterator (not needed)
+    - some changes to get it work (the one in the repository was untested 
+      and not working)
+    - changed calling style of iterator from do...while to while-loop
+    - changed some comments
+    
+ * MRawRunHeader.cc:
+    - added some comments
+
+ * Changelog, News: added
+ 
+ * test.C: removed
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 457)
+++ trunk/MagicSoft/Mars/NEWS	(revision 457)
@@ -0,0 +1,15 @@
+                                                               -*-*- END -*-*-
+ 
+ xxxx/yy/zz:
+ 
+    * First official release 0.1
+    
+    * Changes:
+    
+       - changed calling style of MRawPixelIterator from do...while to 
+         while-loop
+
+ 2000/12/20:
+ 
+    * Put the first version of the Mars code into the repository
+
Index: trunk/MagicSoft/Mars/macros/readpix.C
===================================================================
--- trunk/MagicSoft/Mars/macros/readpix.C	(revision 457)
+++ trunk/MagicSoft/Mars/macros/readpix.C	(revision 457)
@@ -0,0 +1,67 @@
+#include <iomanip>
+
+void readpix() {
+    //
+    // open the file
+    //
+    TFile input("delme.root", "READ");
+
+    //
+    // open the Run Header tree
+    //
+    TTree *runtree = (TTree*) input.Get("RunHeaders") ;
+    cout << " Entries in Tree RunHeaders: " << runtree->GetEntries() << endl ;
+
+    //
+    // create an instance of MRawRunHeader, enable the branch and
+    // read the header, print it
+    //
+    MRawRunHeader *runheader = new MRawRunHeader();
+    runtree->GetBranch("MRawRunHeader")->SetAddress(&runheader);
+    runtree->GetEvent(0);
+    runheader->Print();
+
+    //
+    // open the Data Tree
+    //
+    TTree *evttree = (TTree*) input.Get("Data") ;
+
+    //
+    // create the instances of the data to read in
+    //
+    MRawEvtData *evtdata = new MRawEvtData();
+
+    //
+    // enable the corresponding branches
+    //
+    evttree->GetBranch("MRawEvtData")->SetAddress(&evtdata);
+
+    evttree->GetEvent(0);
+
+    MRawEvtPixelIter pixel(evtdata);
+
+    while (pixel.Next())
+    {
+       
+       cout << "Pixel Nr: " << dec << pixel.GetPixelId() << " ";
+       cout << setfill('0') << endl;
+      
+       cout << "Hi Gains: ";
+       for (int i=0; i<evtdata->GetNumHiGainSamples(); i++)
+	  cout << setw(3) << (UInt_t)pixel.GetHiGainFadcSamples()[i];
+       cout << endl;
+      
+       cout << "Lo Gains: ";
+       if (pixel.IsLoGain())
+	  for (int i=0; i<evtdata->GetNumLoGainSamples(); i++)
+	     cout << setw(3) << (UInt_t)pixel.GetLoGainFadcSamples()[i];
+       cout << endl << endl;
+
+       if (pixel.GetPixelId() == 11)
+	 pixel.Draw();
+    };
+}
+
+
+
+
Index: trunk/MagicSoft/Mars/macros/test.C
===================================================================
--- trunk/MagicSoft/Mars/macros/test.C	(revision 456)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// This is an easy implementation of the Merging process (as root Macro)
-//
-// at the moment it reads a binary file ("rawtest.bin") which was written
-// in the DAQ raw format.
-//
-// The data are stored in root container objects (classes derived from
-// TObject like MRawRunHeader)
-//
-// This containers are written to a root file ("rawtest.root")
-//
-/////////////////////////////////////////////////////////////////////////////
-
-int test()
-{
-    //
-    // create a (empty) list of parameters which can be used by the tasks
-    // and an (empty) list of tasks which should be executed
-    //
-    MParList *plist  = new MParList;
-    MTaskList *tasks = new MTaskList;
-
-    //
-    // create the tasks which should be executed and add them to the list
-    // in the case you don't need parameter containers, all of them can
-    // be created by MRawFileRead::PreProcess
-    //
-    // REMARK: Don't change the order of the two instantiations.
-    //         I don't have an idea why, but here it crashes to
-    //         Interpreter.
-    //         (Using root 2.25/03, with Cint 5.14.50 on OSF1)
-    //
-    MRawFileWrite *writer = new MRawFileWrite("output.root", "RECREATE");
-    MReadTree     *reader = new MReadTree("delme.root", "Data");
-    tasks->AddToList(reader);
-    tasks->AddToList(writer);
-
-    plist->AddToList(tasks);
-
-    //
-    // create the looping object and thell it about the parameters to use
-    // and the tasks to execute
-    //
-    MEvtLoop magic;
-
-    magic.SetParList(plist);
-
-    //
-    // Start the eventloop which reads the raw file (MRawFileRead) and
-    // write all the information into a root file (MRawFileWrite)
-    //
-    // between reading and writing we can do, transformations, checks, etc.
-    // (I'm think of a task like MRawDataCheck)
-    //
-    magic.Eventloop();
-
-    return 0;
-}
-
-
