Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7902)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7903)
@@ -48,4 +48,8 @@
      - let condor wait until all jobs are finished and then
        link everything
+
+   * mbadpixels/MBadPixelsCam.[h,cc]:
+     - added a simple function GetNumUnsuitable which can be used
+       as a rule eg. in a filter.
 
 
Index: trunk/MagicSoft/Mars/Makefile
===================================================================
--- trunk/MagicSoft/Mars/Makefile	(revision 7902)
+++ trunk/MagicSoft/Mars/Makefile	(revision 7903)
@@ -125,5 +125,14 @@
 endif
 
-condor:	$(CONDOR)
+rmcondor:
+	rm -f .makcondor.log
+
+condor:	rmcondor $(CONDOR)
+	echo Waiting for jobs to finish...
+	condor_wait .makecondor.log
+	rm .makecondor.log
+	make -j2 $(PROGRAMS)
+#	find -name "*/.makecondor.*"
+#	find -maxdepth 2 -name ".makecondor.*" -exec echo {}\\\; cat {}\\\; echo {}\\\; \;
 
 dox: $(SOLIB)
Index: trunk/MagicSoft/Mars/Makefile.rules
===================================================================
--- trunk/MagicSoft/Mars/Makefile.rules	(revision 7902)
+++ trunk/MagicSoft/Mars/Makefile.rules	(revision 7903)
@@ -7,5 +7,15 @@
 $(CONDOR):
 	@echo " Starting make in $(@:.condor=) via condor"
-	(cd $(@:.condor=); (condor_run $(MAKE) &); cd ..;)
+	(echo universe=vanilla; \
+         echo executable=/bin/bash; \
+         echo arguments=-c make; \
+         echo log=../.makecondor.log;    \
+         echo initialdir=$(@:.condor=); \
+         echo getenv=true;     \
+         echo notification=never; \
+         echo queue) | condor_submit > /dev/null
+#	(cd $(@:.condor=); (condor_run $(MAKE) &); cd ..;)
+#         echo output=.makecondor.out; \
+#         echo error=.makecondor.err;  \
 
 $(CLEANERS):
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 7902)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc	(revision 7903)
@@ -237,4 +237,20 @@
             rc++;
     }
+    return rc;
+}
+
+// --------------------------------------------------------------------------
+//
+// Count the number of unsuitable pixels.
+//
+Short_t MBadPixelsCam::GetNumUnsuitable() const
+{
+    const UInt_t n = GetSize();
+
+    Short_t rc = 0;
+    for (UInt_t i=0; i<n; i++)
+        if ((*this)[i].IsUnsuitable())
+            rc++;
+
     return rc;
 }
Index: trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h
===================================================================
--- trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h	(revision 7902)
+++ trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.h	(revision 7903)
@@ -42,4 +42,5 @@
     Short_t GetNumUnsuitable(MBadPixelsPix::UnsuitableType_t type, const MGeomCam *geom, Int_t aidx=-1) const;
     Short_t GetNumUnsuitable(MBadPixelsPix::UnsuitableType_t type) const { return GetNumUnsuitable(type, 0); }
+    Short_t GetNumUnsuitable() const;
     Short_t GetNumSuitable(MBadPixelsPix::UnsuitableType_t type, const MGeomCam *geom, Int_t aidx=-1) const;
     Short_t GetNumSuitable(MBadPixelsPix::UnsuitableType_t type) const { return GetNumSuitable(type, 0); }
