Index: /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.getchip.pt
===================================================================
--- /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.getchip.pt	(revision 42932)
+++ /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.getchip.pt	(revision 42933)
@@ -1,7 +1,17 @@
 
-# the master book btChipNights lists all of CHIPNIGHT books
+# btChipNights : bookw with list of all CHIPNIGHT books
 # CHIPNIGHT books are named after the nights and chips, e.g. 20250704.XY01
 
-if (not($BT_CHIPNIGHT_NSEQ)) set BT_CHIPNIGHT_NSEQ = 0
+# Design Concept:  We have a collection of nights to process.  Each night has a collection of
+# exposures, each with a number of chips.  The books in this pantasks file
+# list the complete set of chip/exposures for a given night.
+
+# a given chip/exposure goes throught the following set of steps:
+# INIT : the ChipNight book is populated with the list of chip/exposures based on queries to the db
+# PREP : a job is active to determine the chip/exposure basic info (paths, etc)
+# DONEPREP : after the chip/exposure has been prepped, it waits to be run
+# 
+
+if (not($BT_CHIPNIGHT_ITER)) set BT_CHIPNIGHT_ITER = 0
 
 # get the next available chip (one chip from an exposure for a single night)
@@ -24,6 +34,6 @@
 
     # if we have reached the end, restart the loop over chip hosts
-    if ($BT_CHIPNIGHT_NSEQ >= $Nnights)
-      $BT_CHIPNIGHT_NSEQ = 0
+    if ($BT_CHIPNIGHT_ITER >= $Nnights)
+      $BT_CHIPNIGHT_ITER = 0
       echo "restart loop"
       break
@@ -31,5 +41,5 @@
     
     # grab info for this CHIPNIGHT
-    book getpage btChipNights $BT_CHIPNIGHT_NSEQ           -var BT_CHIPNIGHT_PAGE
+    book getpage btChipNights $BT_CHIPNIGHT_ITER           -var BT_CHIPNIGHT_PAGE
     book getword btChipNights $BT_CHIPNIGHT_PAGE CHIPNIGHT -var BT_CHIPNIGHT_BOOK
     book getword btChipNights $BT_CHIPNIGHT_PAGE STATE     -var BT_CHIPNIGHT_STATE
@@ -43,5 +53,5 @@
     # is this chip/night ready to go?
     if (("$BT_CHIPNIGHT_STATE" == "RUN") || ("$BT_CHIPNIGHT_STATE" == "FAIL"))
-      $BT_CHIPNIGHT_NSEQ ++
+      $BT_CHIPNIGHT_ITER ++
       periods -exec 0.05
       break
@@ -56,5 +66,5 @@
     if ($BT_CHIPNIGHT_ENTRY >= $BT_CHIPNIGHT_NCHIP) 
       echo "done with chip/night $BT_CHIPNIGHT_BOOK"
-      $BT_CHIPNIGHT_NSEQ ++
+      $BT_CHIPNIGHT_ITER ++
       periods -exec 0.05
       break
Index: /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.onechip.pt
===================================================================
--- /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.onechip.pt	(revision 42932)
+++ /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/bt.onechip.pt	(revision 42933)
@@ -1,4 +1,6 @@
 
 # QQQ relevant variables:
+
+#### NEW CONCEPT, USE THIS NOT burntool.pt ####
 
 # btChipHost : book with list of chiphost books.  each of those books
@@ -10,5 +12,14 @@
 # jobs wanting data from a host.
 
-# $BT_CHIPHOST_NSEQ : current (or last) chiphost examined.  this task
+# each page of btChipHost has the name of the host (HOSTNAME), current
+# number of running jobs (NRUN).  HOSTNAME is also the name of the
+# associate book containing jobs for that host.
+
+# HOSTNAME books: each hostname is the name of a book containing the list
+# of chips to be run.  In these books, each page contains info about the
+# chip: filenames, exposure, class_id, etc, and pantasksState which may be
+# INIT, RUN, DONE
+
+# $BT_CHIPHOST_ITER : current (or last) chiphost examined.  this task
 # loops over the full list of chiphost books
 
@@ -17,5 +28,5 @@
 if (not($?BT_SETUP))
   $BT_SETUP = 1
-  $BT_CHIPHOST_NSEQ = 0
+  $BT_CHIPHOST_ITER = 0
   $BT_CHIPHOST_NMAX = 2
   book create btChipHost
@@ -42,11 +53,11 @@
 
     # if we have reached the end, restart the loop over chip hosts
-    if ($BT_CHIPHOST_NSEQ >= $Nhosts)
-      $BT_CHIPHOST_NSEQ = 0
+    if ($BT_CHIPHOST_ITER >= $Nhosts)
+      $BT_CHIPHOST_ITER = 0
       echo "restart loop"
       break
     end
     
-    book getpage btChipHost $BT_CHIPHOST_NSEQ          -var BT_CHIPHOST_PAGE
+    book getpage btChipHost $BT_CHIPHOST_ITER          -var BT_CHIPHOST_PAGE
     book getword btChipHost $BT_CHIPHOST_PAGE HOSTNAME -var BT_CHIPHOST_BOOK
     book getword btChipHost $BT_CHIPHOST_PAGE NRUN     -var BT_CHIPHOST_NRUN
@@ -54,6 +65,6 @@
     # only run NMAX jobs per chiphost
     if ($BT_CHIPHOST_NRUN >= $BT_CHIPHOST_NMAX) 
-      $BT_CHIPHOST_NSEQ ++
-      echo "try next ($BT_CHIPHOST_NSEQ) -- done loop"
+      $BT_CHIPHOST_ITER ++
+      echo "try next ($BT_CHIPHOST_ITER) -- done loop"
       periods -exec 0.05
       break
@@ -63,6 +74,6 @@
     book npages $BT_CHIPHOST_BOOK -var BT_CHIPHOST_NCHP
     if ($BT_CHIPHOST_NCHP == 0) 
-      $BT_CHIPHOST_NSEQ ++
-      echo "try next ($BT_CHIPHOST_NSEQ) -- no chips"
+      $BT_CHIPHOST_ITER ++
+      echo "try next ($BT_CHIPHOST_ITER) -- no chips"
       periods -exec 0.05
       break
@@ -72,6 +83,6 @@
     book getpage $BT_CHIPHOST_BOOK 0 -var pageName -key pantaskState INIT
     if ("$pageName" == "NULL")
-      $BT_CHIPHOST_NSEQ ++
-      echo "try next ($BT_CHIPHOST_NSEQ) -- nothing ready"
+      $BT_CHIPHOST_ITER ++
+      echo "try next ($BT_CHIPHOST_ITER) -- nothing ready"
       periods -exec 0.05
       break
@@ -149,4 +160,5 @@
 
   # what else needs to happen after the job is done?
+  # XXX how do we use "quality" ??
 
   # decrement NRUN for this host
Index: /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/burntool.pt
===================================================================
--- /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/burntool.pt	(revision 42932)
+++ /branches/eam_branches/ipp-20250626/tools/eam/burntool.20250520/src/burntool.pt	(revision 42933)
@@ -1,3 +1,5 @@
 ## pantasks script to manage the burntool processing
+
+####### DO NOT USE, DEPRECATED ########
 
 if (not($?BURNTOOL_INIT))
