Index: trunk/ippTasks/summit.copy.pro
===================================================================
--- trunk/ippTasks/summit.copy.pro	(revision 16298)
+++ trunk/ippTasks/summit.copy.pro	(revision 16307)
@@ -1,4 +1,6 @@
 ## summit.copy.pro : tasks for the summit to IPP download : -*- sh -*-
 ## PanTasks scripts for Summit Copy
+
+## XXX note that this currently works with a single database as defined in .ipprc
 
 # pztool -adddatastore -inst isp -telescope ps1 -uri http://otis1.ifa.hawaii.edu/ds/skyprobe/index.txt
@@ -18,15 +20,4 @@
 check.globals
 
-# the templates are used if we have a class_id/host relationship; if none is found, the default values are used
-# XXX not sure how to handle the .N value if we need to use more than one
-# XXX this stuff should all be placed in a 'site' config file
-if ($NEBULOUS)
- $default_host     = ipp004
- $workdir_template = neb:///@HOST@.0
-else
- $default_host     = ipp004
- $workdir_template = /data/@HOST@.0/
-end
-
 # list of DataStores to pull data from
 book init pzDataStore
@@ -35,4 +26,46 @@
 # list of summit imfiles that need to be downloaded
 book init pzPendingImfile
+
+macro copy.on
+  task pztool.datastore
+    active true
+  end
+  task pzgetexp
+    active true
+  end
+  task pztool.pendingexp
+    active true
+  end
+  task pzgetimfile 
+    active true
+  end
+  task pztool.pendingimfile
+    active true
+  end
+  task dsget
+    active true
+  end
+end
+
+macro copy.off
+  task pztool.datastore
+    active false
+  end
+  task pzgetexp
+    active false
+  end
+  task pztool.pendingexp
+    active false
+  end
+  task pzgetimfile 
+    active false
+  end
+  task pztool.pendingimfile
+    active false
+  end
+  task dsget
+    active false
+  end
+end
 
 # build a book of datastores to poll for data
@@ -116,5 +149,5 @@
 # build a book of exps/filesetids that need to be queried
 task pztool.pendingexp
-    command      pztool -pendingexp -limit 25
+    command      pztool -pendingexp -limit 5
     host         local
 
@@ -127,7 +160,6 @@
     task.exit 0
         # convert 'stdout' to book format
+# XXX we probably want the database to be user-defined...
 #       ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
-
-# XXX we probably want the database to be user-defined...
         ipptool2book stdout pzPendingExp -key exp_name:camera:telescope -uniq -setword pantaskState INIT
 
@@ -210,5 +242,5 @@
 # build a book of imfiles/files that need to be downloaded
 task pztool.pendingimfile
-    command      pztool -pendingimfile -limit 120
+    command      pztool -pendingimfile -limit 5
     host         local
 
@@ -222,5 +254,4 @@
         # convert 'stdout' to book format
 #       ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-
         ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope:class:class_id -uniq -setword pantaskState INIT
 
@@ -271,5 +302,4 @@
 
         set.host.for.camera $CAMERA $CLASS_ID
-        host        anyhost
 
         # 2007-08-30T05:09:59Z
@@ -282,26 +312,29 @@
         # it sets workdir and volume
        	set.workdir.by.camera $CAMERA $CLASS_ID $workdir_template $default_host workdir_base
-       	set.volume.by.camera $CAMERA $CLASS_ID $volume_template $default_volume volume
 
         # figure out filename
 	# XXX may need to use sprintf here
-        $FILENAME = $workdir_base/$CAMERA/$YEAR$MONTH$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
-        $workdir = $workdir_template/$CAMERA/$YEAR$MONTH$DAY
+        $FILENAME = $workdir_base/$CAMERA/$YEAR\$MONTH\$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
+        $workdir = $workdir_template/$CAMERA/$YEAR\$MONTH\$DAY
+
 	# workdir examples:
 	# file://data/@HOST@.0/gpc1/20080130
-	# neb://gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
+	# neb://@HOST@.0/gpc1/20080130
+
+	# filename examples:
+	# file://data/ipp005.0/gpc1/20080130/o4437g0025d/o4437g0025d.XY05.fits
+	# neb://@HOST@.0/gpc1/20080130/o4437g0025d/o4437g0025d.XY05.fits
 
         book setword pzPendingImfile $pageName filename $FILENAME
 
         # store the pageName with this job
-        options $pageName
-        options $workdir
+        options $pageName $workdir
 
         $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 
-        if ($MD5SUM) 
+        if (("$MD5SUM" != "NULL") && ("$MD5SUM" != "0"))
             $run = $run --md5 $MD5SUM
         end
-        if ($NEBULOUS && ("$volname" != "NULL")) 
-            $run = $run --volume $volume
+	if ($NEBULOUS) 
+            $run = $run --nebulous
         end
 
@@ -310,4 +343,5 @@
           echo command $run
         end
+
         command $run
     end
