Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 18129)
+++ trunk/ippTasks/chip.pro	(revision 18142)
@@ -263,30 +263,14 @@
     book setword chipPendingCleanup $pageName pantaskState RUN
     book getword chipPendingCleanup $pageName camera -var CAMERA
-    book getword chipPendingCleanup $pageName exp_id -var EXP_ID
-    book getword chipPendingCleanup $pageName exp_tag -var EXP_TAG
-    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
-    book getword chipPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE
     book getword chipPendingCleanup $pageName class_id -var CLASS_ID
-    book getword chipPendingCleanup $pageName uri -var URI
+    book getword chipPendingCleanup $pageName cleanup_mode -var CLEANUP_MODE
+    book getword chipPendingCleanup $pageName path_base -var PATH_BASE
     book getword chipPendingCleanup $pageName dbname -var DBNAME
-    book getword chipPendingCleanup $pageName reduction -var REDUCTION
 
     # specify choice of local or remote host based on camera and chip (class_id)
     set.host.for.camera $CAMERA $CLASS_ID
 
-    # raw workdir examples:
-    # file://data/@HOST@.0/gpc1/20080130
-    # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
-    set.workdir.by.camera $CAMERA $CLASS_ID $WORKDIR_TEMPLATE $default_host WORKDIR
-    # out workdir examples:
-    # file://data/ipp004.0/gpc1/20080130
-    # neb:///ipp004-vol0/gpc1/20080130
-
-    ## generate outroot specific to this exposure (& chip)
-    # XXX probably do not need to build the outroot
-    sprintf outroot "%s/%s/%s.ch.%s" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID
-
     ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
+    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $PATH_BASE`
     if ("$logfile" == "") 
       echo "WARNING: logfile not defined in chip.pro:152"
@@ -300,8 +284,5 @@
 
     # XXX is everything listed here needed?
-    $run = chip_cleanup.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --uri $URI --camera $CAMERA --outroot $outroot
-    if ("$REDUCTION" != "NULL")
-      $run = $run --reduction $REDUCTION
-    end
+    $run = ipp_cleanup.pl --stage chip --camera $CAMERA --class_id $CLASS_ID --mode $CLEANUP_MODE --path_base $PATH_BASE
     add_standard_args run
 
