Index: trunk/MagicSoft/Mars/macros/collarea.C
===================================================================
--- trunk/MagicSoft/Mars/macros/collarea.C	(revision 984)
+++ trunk/MagicSoft/Mars/macros/collarea.C	(revision 988)
@@ -34,17 +34,5 @@
     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);
 
     //
@@ -64,5 +52,4 @@
     MTask task;
     tasklist.AddToList(&task);
-
 
     //
@@ -84,4 +71,4 @@
     // filled and can be displayd
     //
-    collArea->Draw();
+    parlist.FindObject("MHMcCollectionArea")->DrawClone();
 }
Index: trunk/MagicSoft/Mars/macros/threshold.C
===================================================================
--- trunk/MagicSoft/Mars/macros/threshold.C	(revision 984)
+++ trunk/MagicSoft/Mars/macros/threshold.C	(revision 988)
@@ -24,5 +24,5 @@
 
 
-void threshold(char* filename="data/CrabNebula_dnsb_09_loop.root")
+void threshold(char* filename="data/camera.root")
 {
     //
@@ -30,5 +30,5 @@
     // MMcThresholdCalc and shows the results.
     //
-    MParList  parlist;
+    MParList parlist;
 
     MTaskList tasklist;
@@ -43,5 +43,10 @@
     //      taking only the trigger information from MMcTrig
     //
-    const UInt_t numtriggerconditions = 4;
+    const UInt_t numtrigcond = 0;
+
+    UInt_t from = numtrigcond>0 ?           1 : -numtrigcond;
+    UInt_t to   = numtrigcond>0 ? numtrigcond : -numtrigcond;
+
+    Int_t dim = to-from+1;
 
     //
@@ -49,10 +54,11 @@
     // and store the histograms in an TObjArray
     //
-    TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcEnergy", numtriggerconditions));
+    TObjArray hists(MParList::CreateObjList("MHMcEnergy", from, to));
+    hists.SetOwner();
 
     //
     // Check if the list really contains the right number of histograms
     //
-    if (hists->GetEntriesFast() != numtriggerconditions)
+    if (hists.GetEntriesFast() != dim)
         return;
 
@@ -60,5 +66,5 @@
     // Add the histograms to the paramater list.
     //
-    parlist.AddToList(hists);
+    parlist.AddToList(&hists);
 
     //
@@ -71,6 +77,9 @@
     //      like one dimension MMcThresholdCalc
     //
-    MReadTree        read("Events;7", filename);
-    MMcThresholdCalc calc(numtriggerconditions);
+    MReadTree read("Events", filename);
+    read.UseLeaf("fEnergy");
+    read.UseLeaf("fNumFirstLevel");
+
+    MMcThresholdCalc calc(numtrigcond);
 
     tasklist.AddToList(&read);
@@ -90,5 +99,7 @@
     // Now you can display the results
     //
-    for (UInt_t i=0; i<numtriggerconditions; i++)
-        ((*hists)[i])->Draw();
+    TIter Next(&hists);
+    TObject *obj;
+    while ((obj=Next()))
+        obj->DrawClone();
 }
Index: trunk/MagicSoft/Mars/macros/trigrate.C
===================================================================
--- trunk/MagicSoft/Mars/macros/trigrate.C	(revision 984)
+++ trunk/MagicSoft/Mars/macros/trigrate.C	(revision 988)
@@ -109,7 +109,4 @@
         return;
 
-    TIter Next(&hists);
-    MHMcRate *r=NULL;
-    while ((r=(MHMcRate*)Next()))
-        r->Print();
+    hists.Print();
 }
