Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 5947)
+++ trunk/MagicSoft/Mars/Changelog	(revision 5948)
@@ -31,4 +31,7 @@
   * mhcalib/MCalibrationIntensityHiLoCam.[h,cc]
     - updated accordingly
+
+  * mbadpixels/MBadPixelsCam.cc
+    - removed some bugs in the Print() function
 
  2005/01/22 Markus Gaug
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 5947)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 5948)
@@ -339,5 +339,6 @@
     
   Int_t count = 0;
-  
+  Int_t full  = 0;
+
   for (Int_t i=0; i<GetSize(); i++)
     {
@@ -345,13 +346,18 @@
         {
           *fLog << i << " ";
+	  full++;
           count ++;
         }
       
       if (count == 0)
-        continue;
-      
-      if (!(count % 25))
-        *fLog << endl;
-    }
+	continue;
+      
+      if (!(full % 25))
+	{
+	  full = 0;
+	  *fLog << endl;
+	}
+    }
+  *fLog << endl;
   *fLog << count << " normal pixels" << endl;
   *fLog << endl;
@@ -359,4 +365,6 @@
   *fLog << "Pixels unsuited for the whole run:" << endl;
   
+  full  = 0;
+  count = 0;
   for (Int_t i=0; i<GetSize(); i++)
     {
@@ -364,4 +372,5 @@
         {
           *fLog << i << " ";
+	  full++;
           count ++;
         }
@@ -370,11 +379,43 @@
         continue;
       
-      if (!(count % 25))
-        *fLog << endl;
-    }
-
-  *fLog << count << " unsuited pixels :-(" << endl;
-  *fLog << endl;
-  
+      if (!(full % 25))
+	{
+	  full = 0;
+	  *fLog << endl;
+	}
+    }
+
+  *fLog << endl;
+  *fLog << count << " unsuited pixels per run :-(" << endl;
+  *fLog << endl;
+  
+  *fLog << "Pixels unsuited for this event:" << endl;
+
+  full  = 0;
+  count = 0;
+  for (Int_t i=0; i<GetSize(); i++)
+    {
+      if ((*this)[i].IsUnsuitable(MBadPixelsPix::kUnsuitableEvt))
+        {
+          *fLog << i << " ";
+	  full++;
+          count ++;
+        }
+      
+      if (count == 0)
+        continue;
+      
+      if (!(full % 25))
+	{
+	  full  = 0;
+	  *fLog << endl;
+	}
+    }
+
+  *fLog << endl;
+  *fLog << count << " unsuited pixels per event :-(" << endl;
+  *fLog << endl;
+  
+  full  = 0;
   count = 0;
   
@@ -386,4 +427,5 @@
         {
           *fLog << i << " ";
+	  full++;
           count ++;
         }
@@ -392,8 +434,12 @@
         continue;
       
-      if (!(count % 25))
-        *fLog << endl;
-    }
-  
+      if (!(full % 25))
+	{
+	  full  = 0;
+	  *fLog << endl;
+	}
+    }
+  
+  *fLog << endl;
   *fLog << count << " unreliable pixels :-(" << endl;
   *fLog << endl;
@@ -433,4 +479,5 @@
   *fLog << "Pixels with " << text << ": " << endl;
   UInt_t count = 0;
+  UInt_t full  = 0;
 
   for (Int_t i=0; i<GetSize(); i++)
@@ -439,4 +486,5 @@
         {
           *fLog << i << " ";
+	  full++;
           count++;
         }
@@ -445,10 +493,13 @@
         continue;
       
-      if (!(count % 25))
-        *fLog << endl;
-    }
-  
+      if (!(full % 25))
+	{
+	  full  = 0;
+	  *fLog << endl;
+	}
+    }
+  
+  *fLog << endl;
   *fLog << Form("%3i",count) << " pixels in total " << endl;
-  *fLog << endl;
 }
 
