Index: trunk/MagicSoft/Mars/mimage/MHillasCalc.cc
===================================================================
--- trunk/MagicSoft/Mars/mimage/MHillasCalc.cc	(revision 2445)
+++ trunk/MagicSoft/Mars/mimage/MHillasCalc.cc	(revision 2454)
@@ -173,4 +173,16 @@
 // --------------------------------------------------------------------------
 //
+//  This is used to print the output in the PostProcess. Later (having
+//  millions of events) we may want to improve the output.
+//
+void MHillasCalc::PrintSkipped(int i, const char *str) const
+{
+    *fLog << " " << setw(7) << fErrors[i] << " (";
+    *fLog << setw(3) << (int)(100.*fErrors[i]/GetNumExecutions());
+    *fLog << "%) Evts skipped due to: " << str << endl;
+}
+
+// --------------------------------------------------------------------------
+//
 //  Prints some statistics about the hillas calculation. The percentage
 //  is calculated with respect to the number of executions of this task.
@@ -184,9 +196,9 @@
     *fLog << GetDescriptor() << " execution statistics:" << endl;
     *fLog << dec << setfill(' ');
-    *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Event has less than 3 pixels" << endl;
-    *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3) << (int)(fErrors[2]*100/GetNumExecutions()) << "%) Evts skipped due to: Calculated Size == 0" << endl;
-    *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3) << (int)(fErrors[3]*100/GetNumExecutions()) << "%) Evts skipped due to: Number of used pixels < 3" << endl;
-    *fLog << " " << setw(7) << fErrors[4] << " (" << setw(3) << (int)(fErrors[4]*100/GetNumExecutions()) << "%) Evts skipped due to: CorrXY==0" << endl;
-    *fLog << " " << fErrors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions()) << "%) Evts survived Hillas calculation!" << endl;
+    PrintSkipped(1, "Event has less than 3 pixels");
+    PrintSkipped(2, "Calculated Size == 0");
+    PrintSkipped(3, "Number of used pixels < 3");
+    PrintSkipped(4, "CorrXY==0");
+    *fLog << " " << (int)fErrors[0] << " (" << (int)(100.*fErrors[0]/GetNumExecutions()) << "%) Evts survived Hillas calculation!" << endl;
     *fLog << endl;
 
