Index: /trunk/MagicSoft/Mars/macros/Test.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/Test.C	(revision 971)
+++ /trunk/MagicSoft/Mars/macros/Test.C	(revision 971)
@@ -0,0 +1,1 @@
+xxx
Index: /trunk/MagicSoft/Mars/macros/collarea.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/collarea.C	(revision 971)
+++ /trunk/MagicSoft/Mars/macros/collarea.C	(revision 971)
@@ -0,0 +1,87 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+void collarea(char *filename = "data/camera.root")
+{ 
+    // FIXME: Harald, you should tell the people what the result of
+    // this macro really is.
+
+    //
+    // first we have to create our empty lists
+    //
+    MParList  parlist;
+    MTaskList tasklist;
+
+    //
+    // Setup the parameter list.
+    //  - we need to create MCollArea only. The other containers
+    //    are created automatically without loss - we don't have to
+    //    access them-
+    //  - MCollArea must be created by us because we need the pointer
+    //    to it and if it would get created automatically it would also be
+    //    deleted automatically
+    //
+    parlist.AddToList(&tasklist);
+
+    MHMcCollectionArea *collArea = new MHMcCollectionArea;
+    parlist.AddToList(collArea);
+
+    //
+    // Setup out tasks:
+    //  - First we have to read the events
+    //  - Then we can fill the efficiency histograms
+    //
+    MReadTree reader("Events", filename);
+    reader.UseLeaf("fImpact");
+    reader.UseLeaf("fEnergy");
+    reader.UseLeaf("fNumFirstLevel");
+    tasklist.AddToList(&reader);
+
+    MMcCollectionAreaCalc effi;
+    tasklist.AddToList(&effi);
+
+    MTask task;
+    tasklist.AddToList(&task);
+
+
+    //
+    // set up the loop for the processing
+    //
+    MEvtLoop magic;
+    magic.SetParList(&parlist);
+
+    //
+    // Start to loop over all events
+    //
+    if (!magic.Eventloop())
+        return;
+
+    tasklist.PrintStatistics();
+
+    //
+    // Now the histogram we wanted to get out of the data is
+    // filled and can be displayd
+    //
+    collArea->Draw();
+}
Index: /trunk/MagicSoft/Mars/macros/dohtml.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/dohtml.C	(revision 970)
+++ /trunk/MagicSoft/Mars/macros/dohtml.C	(revision 971)
@@ -26,27 +26,29 @@
 void dohtml()
 {
-  //
-  //  don't forget that the shared object must be loaded
-  //
+    //
+    //  don't forget that the shared object must have been loaded
+    //
 
-  //
-  //   create the html document class
-  //
-  MHtml html;
+    //
+    //   create the html document class
+    //
+    MHtml html;
 
-  html.SetOutputDir("htmldoc");
-  html.SetSourceDir(".:mbase:mraw:mgui:manalysis:mdatacheck:mmain:meventdisp:mmc:mmontecarlo:mhist");
-  html.SetXwho("http://hegra1.mppmu.mpg.de/MAGICWeb/collaborators.html?");
+    html.SetOutputDir("htmldoc");
+    html.SetSourceDir(".:mbase:mraw:mgui:manalysis:mdatacheck:mmain:meventdisp:mmc:mmontecarlo:mhist");
+    html.SetXwho("http://hegra1.mppmu.mpg.de/MAGICWeb/collaborators.html?");
 
-  html.MakeAll(kTRUE);
+    html.MakeAll(kTRUE);
 
-  html.SetSourceDir("macros");
-  html.Convert("merpp.C",       "MARS - Merging and Preprocessing");
-  html.Convert("readraw.C",     "MARS - How To Read A Raw");
-  html.Convert("rootlogon.C",   "MARS - rootlogon.C");
-  html.Convert("readCT1.C",     "MARS - Read and display CT1 Events");
-  html.Convert("readMagic.C",   "MARS - Read and display Magic Events");
-  html.Convert("CT1Hillas.C",   "MARS - Calculate CT1 Hillas");
-  html.Convert("MagicHillas.C", "MARS - Calculate Magic Hillas");
-  html.Convert("getCollArea.C", "MARS - Calculate Collection Area from a MC root file");
+    html.SetSourceDir("macros");
+    html.Convert("merpp.C",       "MARS - Merging and Preprocessing");
+    html.Convert("readraw.C",     "MARS - How To Read A Raw");
+    html.Convert("rootlogon.C",   "MARS - rootlogon.C");
+    html.Convert("readCT1.C",     "MARS - Read and display CT1 Events");
+    html.Convert("readMagic.C",   "MARS - Read and display Magic Events");
+    html.Convert("CT1Hillas.C",   "MARS - Calculate CT1 Hillas");
+    html.Convert("MagicHillas.C", "MARS - Calculate Magic Hillas");
+    html.Convert("collarea.C",    "MARS - Calculate Collection Area from a MC root file");
+    html.Convert("threshold.C",   "MARS - Calculate Energy Threshold from a MC root file");
+    html.Convert("trigrate.C",    "MARS - Calculate Trigger Rate from a MC root file");
 }
Index: unk/MagicSoft/Mars/macros/getCollArea.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/getCollArea.C	(revision 970)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
-!
-!   Copyright: MAGIC Software Development, 2000-2001
-!
-!
-\* ======================================================================== */
-
-
-void getCollArea(char *filename = "camera.root")
-{ 
-    // FIXME: Harald, you should tell the people what the result of
-    // this macro really is.
-
-    //
-    // first we have to create our empty lists
-    //
-    MParList  parlist;
-    MTaskList tasklist;
-
-    //
-    // Setup the parameter list.
-    //  - we need to create MCollArea only. The other containers
-    //    are created automatically without loss - we don't have to
-    //    access them-
-    //  - MCollArea must be created by us because we need the pointer
-    //    to it and if it would get created automatically it would also be
-    //    deleted automatically
-    //
-    parlist.AddToList(&tasklist);
-
-    MHMcCollectionArea *collArea = new MHMcCollectionArea();
-    parlist.AddToList(collArea);
-
-    //
-    // Setup out tasks:
-    //  - First we have to read the events
-    //  - Then we can fill the efficiency histograms
-    //
-    MReadTree reader("Events", filename);
-    reader.UseLeaf("fImpact");
-    reader.UseLeaf("fEnergy");
-    reader.UseLeaf("fNumFirstLevel");
-    tasklist.AddToList(&reader);
-
-    MMcCollectionAreaCalc effi;
-    tasklist.AddToList(&effi);
-
-    MTask task;
-    tasklist.AddToList(&task);
-
-
-    //
-    // set up the loop for the processing
-    //
-    MEvtLoop magic;
-    magic.SetParList(&parlist);
-
-    //
-    // Start to loop over all events
-    //
-    if (!magic.Eventloop())
-        return;
-
-    //
-    // Now the histogram we wanted to get out of the data is
-    // filled and can be displayd
-    //
-    collArea->Draw();
-}
Index: unk/MagicSoft/Mars/macros/getRate.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/getRate.C	(revision 970)
+++ 	(revision )
@@ -1,109 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
-!
-!   Copyright: MAGIC Software Development, 2000-2001
-!
-!
-\* ======================================================================== */
-
-
-void getRate(int dim=0, char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" )
-{
-    // This macro has two input parameter:
-    // dim : = 0 -> root file with 1 trigger condition.
-    //       > 0 -> number of trigger condition to be analised 
-    //              in multi conditon file.
-    //       < 0 -> selects the -dim trigger condition.
-    //
-    // first we have to create our empty lists
-    //
-    MParList  parlist;
-    MTaskList tasklist;
-
-    //
-    // Setup the parameter list.
-    //  - we do not need to create any other container. All of them
-    //    are created automatically without loss - we don't have to
-    //    access them-
-    //
-    //  - we need to create MHMcRate only. The other containers
-    //    are created automatically without loss - we don't have to
-    //    access them-
-    //  - MHMcRate must be created by us because we need the pointer
-    //    to it and if it would get created automatically it would also be
-    //    deleted automatically
-    //  - Actually, depending on using a single trigger option MonteCarlo
-    //    file or a multyple trigger option, a MHMcRate or an array of 
-    //    MHMcRate are needed.
-    //
-    parlist.AddToList(&tasklist);
-
-    //
-    // You don't have to add the MHMcRate container here by hand.
-    // But if you want to print or display these containers later on
-    // it is necessary (Rem: No printing or displaying is done in this
-    // macro yet)
-    //
-    TObjArray hists(MParList::CreateObjList("MHMcRate", dim));
-    hists.SetOwner();
-
-    //
-    // Check if the list really contains the right number of histograms
-    //
-    if (hists.GetEntriesFast() != dim)
-        return;
-
-    //
-    // Add the histograms to the paramater list.
-    //
-    parlist.AddToList(&hists);
-
-    //
-    // Setup out tasks:
-    //  - First we have to read the events
-    //  - Then we can calculate rates, for what the number of
-    //    triggered showers from a empty reflector file for the
-    //    analised trigger conditions should be set (BgR[])
-    //
-    MReadTree reader("Events", filename);
-    tasklist.AddToList(&reader);
-
-    Float_t BgR[10]={660,4,0,0,0,0,0,0,0,0};
-    cout << "Number of Trigger conditions: " << dim << endl;
-
-    MMcTriggerRateCalc rate(dim, 14, BgR, 100000, 2.75, 10.91e-2);
-    tasklist.AddToList(&rate);
-
-    //
-    // set up the loop for the processing
-    //
-    MEvtLoop magic;
-    magic.SetParList(&parlist);
-
-    //
-    // Start to loop over all events
-    //
-    if (!magic.Eventloop())
-        return;
-
-    TIter Next(&hists);
-    MHMcRate *rate=NULL;
-    while ((rate=(MHMcRate*)Next()))
-        rate->Print();
-}
Index: unk/MagicSoft/Mars/macros/getThreshold.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/getThreshold.C	(revision 970)
+++ 	(revision )
@@ -1,94 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
-!
-!   Copyright: MAGIC Software Development, 2000-2001
-!
-!
-\* ======================================================================== */
-
-
-void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root")
-{
-    //
-    // This macro fill the container MHMcEnergies using the task
-    // MMcThresholdCalc and shows the results.
-    //
-    MParList  parlist;
-
-    MTaskList tasklist;
-    parlist.AddToList(&tasklist);
-
-    //
-    // Setup the parameter list
-    // - You need create the container MHMcEnergies.
-    //    + You need to put the number of trigger conditions when
-    //      you declarete the MHMcEnergies
-    //    + If you don't put any dimension to MHMcEnergies it works
-    //      taking only the trigger information from MMcTrig
-    //
-    const UInt_t numtriggerconditions = 4;
-
-    //
-    // Create numtriggerconditions histograms of type MHMcEnergy
-    // and store the histograms in an TObjArray
-    //
-    TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions));
-
-    //
-    // Check if the list really contains the right number of histograms
-    //
-    if (hists->GetEntriesFast() != numtriggerconditions)
-        return;
-
-    //
-    // Add the histograms to the paramater list.
-    //
-    parlist.AddToList(hists);
-
-    //
-    // Setup the task list
-    // - You need the read and the MMcThresholdCalc tasks
-    // - You have to fill the histograms for the Energy threshold
-    //    + You need to put the number of trigger conditions when
-    //      you declarete the MMcThresholdCalc
-    //    + If you don't put any dimension to MMcThresholdCalc it works
-    //      like one dimension MMcThresholdCalc
-    //
-    MReadTree        read("Events;7", filename);
-    MMcThresholdCalc calc(numtriggerconditions);
-
-    tasklist.AddToList(&read);
-    tasklist.AddToList(&calc);
-
-    MEvtLoop evtloop;
-    evtloop.SetParList(&parlist);
-
-    //
-    // Begin the loop (if the loop wasn't succesfull
-    // don't try to draw the results
-    //
-    if (!evtloop.Eventloop())
-        return;
-
-    //
-    // Now you can display the results
-    //
-    for (UInt_t i=0; i<numtriggerconditions; i++)
-        ((*hists)[i])->Draw();
-}
Index: /trunk/MagicSoft/Mars/macros/threshold.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/threshold.C	(revision 971)
+++ /trunk/MagicSoft/Mars/macros/threshold.C	(revision 971)
@@ -0,0 +1,94 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+
+void threshold(char* filename="data/CrabNebula_dnsb_09_loop.root")
+{
+    //
+    // This macro fill the container MHMcEnergies using the task
+    // MMcThresholdCalc and shows the results.
+    //
+    MParList  parlist;
+
+    MTaskList tasklist;
+    parlist.AddToList(&tasklist);
+
+    //
+    // Setup the parameter list
+    // - You need create the container MHMcEnergies.
+    //    + You need to put the number of trigger conditions when
+    //      you declarete the MHMcEnergies
+    //    + If you don't put any dimension to MHMcEnergies it works
+    //      taking only the trigger information from MMcTrig
+    //
+    const UInt_t numtriggerconditions = 4;
+
+    //
+    // Create numtriggerconditions histograms of type MHMcEnergy
+    // and store the histograms in an TObjArray
+    //
+    TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions));
+
+    //
+    // Check if the list really contains the right number of histograms
+    //
+    if (hists->GetEntriesFast() != numtriggerconditions)
+        return;
+
+    //
+    // Add the histograms to the paramater list.
+    //
+    parlist.AddToList(hists);
+
+    //
+    // Setup the task list
+    // - You need the read and the MMcThresholdCalc tasks
+    // - You have to fill the histograms for the Energy threshold
+    //    + You need to put the number of trigger conditions when
+    //      you declarete the MMcThresholdCalc
+    //    + If you don't put any dimension to MMcThresholdCalc it works
+    //      like one dimension MMcThresholdCalc
+    //
+    MReadTree        read("Events;7", filename);
+    MMcThresholdCalc calc(numtriggerconditions);
+
+    tasklist.AddToList(&read);
+    tasklist.AddToList(&calc);
+
+    MEvtLoop evtloop;
+    evtloop.SetParList(&parlist);
+
+    //
+    // Begin the loop (if the loop wasn't succesfull
+    // don't try to draw the results
+    //
+    if (!evtloop.Eventloop())
+        return;
+
+    //
+    // Now you can display the results
+    //
+    for (UInt_t i=0; i<numtriggerconditions; i++)
+        ((*hists)[i])->Draw();
+}
Index: /trunk/MagicSoft/Mars/macros/trigrate.C
===================================================================
--- /trunk/MagicSoft/Mars/macros/trigrate.C	(revision 971)
+++ /trunk/MagicSoft/Mars/macros/trigrate.C	(revision 971)
@@ -0,0 +1,109 @@
+/* ======================================================================== *\
+!
+! *
+! * 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  12/2000 (tbretz@uni-sw.gwdg.de)
+!
+!   Copyright: MAGIC Software Development, 2000-2001
+!
+!
+\* ======================================================================== */
+
+
+void trigrate(int dim=0, char *filename = "/big0/Maggi/CamData/Gamma/gamma_15_on.root" )
+{
+    // This macro has two input parameter:
+    // dim : = 0 -> root file with 1 trigger condition.
+    //       > 0 -> number of trigger condition to be analised 
+    //              in multi conditon file.
+    //       < 0 -> selects the -dim trigger condition.
+    //
+    // first we have to create our empty lists
+    //
+    MParList  parlist;
+    MTaskList tasklist;
+
+    //
+    // Setup the parameter list.
+    //  - we do not need to create any other container. All of them
+    //    are created automatically without loss - we don't have to
+    //    access them-
+    //
+    //  - we need to create MHMcRate only. The other containers
+    //    are created automatically without loss - we don't have to
+    //    access them-
+    //  - MHMcRate must be created by us because we need the pointer
+    //    to it and if it would get created automatically it would also be
+    //    deleted automatically
+    //  - Actually, depending on using a single trigger option MonteCarlo
+    //    file or a multyple trigger option, a MHMcRate or an array of 
+    //    MHMcRate are needed.
+    //
+    parlist.AddToList(&tasklist);
+
+    //
+    // You don't have to add the MHMcRate container here by hand.
+    // But if you want to print or display these containers later on
+    // it is necessary (Rem: No printing or displaying is done in this
+    // macro yet)
+    //
+    TObjArray hists(MParList::CreateObjList("MHMcRate", dim));
+    hists.SetOwner();
+
+    //
+    // Check if the list really contains the right number of histograms
+    //
+    if (hists.GetEntriesFast() != dim)
+        return;
+
+    //
+    // Add the histograms to the paramater list.
+    //
+    parlist.AddToList(&hists);
+
+    //
+    // Setup out tasks:
+    //  - First we have to read the events
+    //  - Then we can calculate rates, for what the number of
+    //    triggered showers from a empty reflector file for the
+    //    analised trigger conditions should be set (BgR[])
+    //
+    MReadTree reader("Events", filename);
+    tasklist.AddToList(&reader);
+
+    Float_t BgR[10]={660, 4, 0, 0, 0, 0, 0, 0, 0, 0};
+    cout << "Number of Trigger conditions: " << dim << endl;
+
+    MMcTriggerRateCalc rate(dim, 14, BgR, 100000, 2.75, 10.91e-2);
+    tasklist.AddToList(&rate);
+
+    //
+    // set up the loop for the processing
+    //
+    MEvtLoop magic;
+    magic.SetParList(&parlist);
+
+    //
+    // Start to loop over all events
+    //
+    if (!magic.Eventloop())
+        return;
+
+    TIter Next(&hists);
+    MHMcRate *rate=NULL;
+    while ((rate=(MHMcRate*)Next()))
+        rate->Print();
+}
