Index: /branches/eam_branches/ipp-20211108/ippTests/ippCheck/ippCheck
===================================================================
--- /branches/eam_branches/ipp-20211108/ippTests/ippCheck/ippCheck	(revision 42031)
+++ /branches/eam_branches/ipp-20211108/ippTests/ippCheck/ippCheck	(revision 42032)
@@ -229,5 +229,6 @@
   echo "   EG: ippCheck dvo  (expname) (dgroup)"
   echo "   EG: ippCheck smf  (outroot) (smf1) (smf2) [+plot]"
-  echo "   EG: ippCheck smf.dgrp (outroot) (smf1) (smf2) [+plot]"
+  echo "   EG: ippCheck smf.dgrp.exp (outroot) (expname) (dgroup1) (dgroup2) [+plot]"
+  echo "   EG: ippCheck smf.dgrp.all (outroot) (dgroup1) (dgroup2) [+plot]"
   echo "   EG: ippCheck plot (expname)"
   echo "   EG: ippCheck plot.glob (expglob) (outroot)"
@@ -263,6 +264,11 @@
   end
 
-  if ("$argv:0" == "smf.dgrp")
-    smf.compare.by.datagroups $arglist
+  if ("$argv:0" == "smf.dgrp.exp")
+    smf.compare.exp.by.datagroups $arglist
+    exit 0
+  end
+
+  if ("$argv:0" == "smf.dgrp.all")
+    smf.compare.allexp.by.datagroups $arglist
     exit 0
   end
Index: /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro
===================================================================
--- /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro	(revision 42031)
+++ /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro	(revision 42032)
@@ -6,5 +6,57 @@
 module tap.pro
 
-macro smf.compare.by.datagroups
+macro smf.compare.allexp.by.datagroups
+  $CAMERA = gpc1  
+
+  getargs +plot     BOOL  -var SAVEPLOT
+  getargs -camera   VALUE -var CAMERA
+
+  if ($0 != 4)
+    echo "USAGE: smf.compare.allexp.by.datagroups (outdir) (DG1) (DG2) [+plot] [-camera gpc2]"
+    break
+  end
+
+  local outdir dgrp1 dgrp2 command i npages expname
+  $outdir = $1
+  $dgrp1 = $2
+  $dgrp2 = $3
+
+  # identify the list of exposures in the data groups
+  $command = camtool -dbname $CAMERA -processedexp -data_group $dgrp2
+  
+  queueload  myqueue -x "$command"
+  queue2book myqueue mybook
+  
+  $camPath = NONE
+  book npages mybook -var npages
+  
+  if ($npages < 1) 
+   echo "ERROR: missing exposures for $dgrp2 : $command"
+   book delete mybook
+   next
+  end
+  
+  for i 0 $npages  
+    sprint pagename page.%03d $i
+    book getword mybook $pagename exp_name -var expname
+    $expnames:$i = $expname
+  end
+  $expnames:n = $npages
+
+  book delete mybook
+
+  $options =
+  setargs +plot   BOOL  $SAVEPLOT
+  setargs -camera VALUE $CAMERA
+
+  mkdir $outdir
+
+  for i 0 $expnames:n
+    echo smf.compare.exp.by.datagroups $outdir/$expnames:$i $expnames:$i $dgrp1 $dgrp2 $options
+    exec ippCheck smf.dgrp.exp $outdir/$expnames:$i $expnames:$i $dgrp1 $dgrp2 $options >& $outdir/$expnames:$i.log
+  end
+end
+
+macro smf.compare.exp.by.datagroups
   $CAMERA = gpc1  
 
@@ -31,9 +83,7 @@
   $smf2    = `neb-locate -p $smffile`
 
-  $saveplot =
-  if ($SAVEPLOT) 
-    $saveplot = +plot
-  end
-  smf.compare.all.extensions $output $smf1 $smf2
+  $options =
+  setargs +plot   BOOL  $SAVEPLOT
+  smf.compare.all.extensions $output $smf1 $smf2 $options
 end
 
@@ -697,4 +747,18 @@
 end
 
+## XXX this macro is sort of the opposite of getargs: it
+## appends values to the variable options
+macro setargs
+  if ("$2" == "BOOL")
+    if ($3)
+      $options = $options $1
+    end
+  end
+
+  if ("$2" == "VALUE")
+    $options = $options $1 $3
+  end
+end
+
 ########## EXAMPLES:
 
