Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 891)
+++ trunk/MagicSoft/Mars/Changelog	(revision 892)
@@ -15,4 +15,14 @@
      - Added FindCreateObjList
      - Added CreateObjList
+
+   * mhist/MHMcEnergies.[h,cc]:
+     - deleted
+
+   * mhist/MHMcEnergy.[h,cc]:
+     - rewrote constructor in a way that MHMcEnergies isn't needed anymore
+     - added a SetName function which replaces the old constructor somehow
+
+   * macros/getThreshold.C:
+     - make use of some new features
 
 
Index: trunk/MagicSoft/Mars/macros/getThreshold.C
===================================================================
--- trunk/MagicSoft/Mars/macros/getThreshold.C	(revision 891)
+++ trunk/MagicSoft/Mars/macros/getThreshold.C	(revision 892)
@@ -1,3 +1,3 @@
-void getThreshold( char* filename = "/hdb1/users/jlopez/temp_loop.root")
+void getThreshold(char* filename="data/CrabNebula_dnsb_09_loop.root")
 {
     //
@@ -18,8 +18,22 @@
     //      taking only the trigger information from MMcTrig
     //
-    const UInt_t numtriggerconditions = 5;
+    const UInt_t numtriggerconditions = 4;
 
-    MHMcEnergies *hists = new MHMcEnergies(numtriggerconditions);
-    hists->AddEntriesToList(&parlist);
+    //
+    // 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);
 
     //
@@ -32,5 +46,5 @@
     //      like one dimension MMcThresholdCalc
     //
-    MReadTree        read("Events", filename);
+    MReadTree        read("Events;7", filename);
     MMcThresholdCalc calc(numtriggerconditions);
 
@@ -42,14 +56,14 @@
 
     //
-    // Begin the loop
+    // Begin the loop (if the loop wasn't succesfull
+    // don't try to draw the results
     //
-    evtloop.Eventloop();
+    if (!evtloop.Eventloop())
+        return;
 
     //
     // Now you can display the results
     //
-    for (UInt_t i=0; i<numtriggerconditions; i++) {
-        ((*hists)[i]).Draw();
-	if (getchar()=='q') break;
-    }
+    for (UInt_t i=0; i<numtriggerconditions; i++)
+        ((*hists)[i])->Draw();
 }
