Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 1889)
+++ trunk/MagicSoft/Mars/Changelog	(revision 1890)
@@ -2,4 +2,22 @@
 
  2003/04/02: Abelardo Moralejo
+
+   * mmc/MMcTrigHeader.hxx
+     - added threshold>0 check in the calculation of 
+       GetMeanThreshold
+
+   * mmontecarlo/MMcTriggerRateCalc.cc
+     - The check of the MC spectral index value is now done by 
+       comparing integers instead of real numbers.
+     - Found out with GREAT surprise that the graphical output
+       has been completely commented out by someone(?) because it 
+       produced a memory leak. Also the function comment did not 
+       match the rules (my fault; is it correct now?) This commenting 
+       out has not been logged to this file, as far as I can see. This
+       is rather unkind, I thought that when somebody finds some bug or
+       messy code, he should either correct and commit it (and log the 
+       change here) and/or inform the author of the mistake to correct 
+       it. Please try to do so in the future instead of simply 
+       commenting out useful code!
 
    * mdata/MDataValue.h
Index: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 1889)
+++ trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.cc	(revision 1890)
@@ -323,5 +323,5 @@
         {
         case kPROTON:
-	  if (fMcCorRunHeader->GetSlopeSpec() != -2.75)
+	  if (floor(-100*fMcCorRunHeader->GetSlopeSpec()+0.5) != 275)
 	    {
                 *fLog << err << dbginf << "Spectrum slope as read from input file (";
@@ -333,9 +333,9 @@
 	  break;
         case kHELIUM:
-	  if (fMcCorRunHeader->GetSlopeSpec() != -2.62)
+	  if (floor(-100*fMcCorRunHeader->GetSlopeSpec()+0.5) != 262)
 	    {
                 *fLog << err << dbginf << "Spectrum slope as read from input file (";
                 *fLog << fMcCorRunHeader->GetSlopeSpec() << ") does not match the expected ";
-                *fLog << "one (-2.75) for Helium" << endl << "... aborting." << endl;
+                *fLog << "one (-2.62) for Helium" << endl << "... aborting." << endl;
                 return kFALSE;
 	    }
@@ -358,7 +358,8 @@
 }
 
-
+// --------------------------------------------------------------------------
+//
 // Draw rate as a funtion of discriminator threshold.
-
+//
 void MMcTriggerRateCalc::Draw()
 {
Index: trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.hxx
===================================================================
--- trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.hxx	(revision 1889)
+++ trunk/MagicSoft/include-Classes/MMcFormat/MMcTrigHeader.hxx	(revision 1890)
@@ -100,5 +100,5 @@
     for(i=0;i<CAMERA_PIXELS;i++)
     {
-      if (fThreshold[i] < 1.e6)
+      if (fThreshold[i] < 1.e6 && fThreshold[i] > 0.)
       {
         sum += fThreshold[i];
