Index: trunk/MagicSoft/Mars/macros/getRate.C
===================================================================
--- trunk/MagicSoft/Mars/macros/getRate.C	(revision 949)
+++ trunk/MagicSoft/Mars/macros/getRate.C	(revision 954)
@@ -61,10 +61,11 @@
     // macro yet)
     //
-    TObjArray *hists = new TObjArray(MParList::CreateObjList("MHMcRate", dim));
+    TObjArray hists(MParList::CreateObjList("MHMcRate", dim));
+    hists.SetOwner();
 
     //
     // Check if the list really contains the right number of histograms
     //
-    if (hists->GetEntriesFast() != dim)
+    if (hists.GetEntriesFast() != dim)
         return;
 
@@ -72,5 +73,5 @@
     // Add the histograms to the paramater list.
     //
-    parlist.AddToList(hists);
+    parlist.AddToList(&hists);
 
     //
@@ -99,5 +100,10 @@
     // Start to loop over all events
     //
-    magic.Eventloop();
+    if (!magic.Eventloop())
+        return;
 
+    TIter Next(&hists);
+    MHMcRate *rate=NULL;
+    while ((rate=(MHMcRate*)Next()))
+        rate->Print();
 }
