Index: trunk/ippTools/share/camtool_queue_chip_id.sql
===================================================================
--- trunk/ippTools/share/camtool_queue_chip_id.sql	(revision 24677)
+++ trunk/ippTools/share/camtool_queue_chip_id.sql	(revision 24681)
@@ -13,5 +13,6 @@
         '%s',           -- dvodb 
         '%s',           -- tess_id
-        '%s'            -- end_stage
+        '%s',           -- end_stage
+        0               -- magicked
     FROM chipRun
     WHERE
Index: trunk/ippTools/share/pxadmin_create_tables.sql
===================================================================
--- trunk/ippTools/share/pxadmin_create_tables.sql	(revision 24677)
+++ trunk/ippTools/share/pxadmin_create_tables.sql	(revision 24681)
@@ -365,4 +365,5 @@
     tess_id VARCHAR(64),
     end_stage VARCHAR(64),
+    magicked BIGINT,
     PRIMARY KEY(cam_id),
     KEY(cam_id),
Index: trunk/ippTools/src/camtool.c
===================================================================
--- trunk/ippTools/src/camtool.c	(revision 24677)
+++ trunk/ippTools/src/camtool.c	(revision 24681)
@@ -491,4 +491,6 @@
     PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
     PXOPT_LOOKUP_S16(quality, config->args, "-quality", false, false);
+    
+    PXOPT_LOOKUP_S64(magicked, config->args, "-magicked", false, false);
 
     // generate restrictions
@@ -614,5 +616,5 @@
 
     // since there is only one exp per 'new' set camRun.state = 'full'
-    if (!pxcamRunSetState(config, row->cam_id, "full")) {
+    if (!pxcamRunSetState(config, row->cam_id, "full", magicked)) {
         psError(PS_ERR_UNKNOWN, false, "failed to change camRun.state for cam_id: %" PRId64, row->cam_id);
         psFree(row);
Index: trunk/ippTools/src/camtoolConfig.c
===================================================================
--- trunk/ippTools/src/camtoolConfig.c	(revision 24677)
+++ trunk/ippTools/src/camtoolConfig.c	(revision 24681)
@@ -167,4 +167,5 @@
     psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-quality",  0,            "set quality", 0);
     psMetadataAddBool(addprocessedexpArgs, PS_LIST_TAIL, "-faulted",  0,            "only return imfiles with a fault status set", false);
+    psMetadataAddS64(addprocessedexpArgs, PS_LIST_TAIL, "-magicked",   0,         "set magicked", 0);
 
     // -processedexp
Index: trunk/ippTools/src/pxcam.c
===================================================================
--- trunk/ippTools/src/pxcam.c	(revision 24677)
+++ trunk/ippTools/src/pxcam.c	(revision 24681)
@@ -119,5 +119,5 @@
 }
 
-bool pxcamRunSetState(pxConfig *config, psS64 cam_id, const char *state)
+bool pxcamRunSetState(pxConfig *config, psS64 cam_id, const char *state, psS64 magicked)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -131,6 +131,6 @@
     }
 
-    char *query = "UPDATE camRun SET state = '%s' WHERE cam_id = %" PRId64;
-    if (!p_psDBRunQueryF(config->dbh, query, state, cam_id)) {
+    char *query = "UPDATE camRun SET state = '%s', SET magicked = %" PRId64 " WHERE cam_id = %" PRId64;
+    if (!p_psDBRunQueryF(config->dbh, query, state, magicked, cam_id)) {
         psError(PS_ERR_UNKNOWN, false,
                 "failed to change state for cam_id %" PRId64, cam_id);
Index: trunk/ippTools/src/pxcam.h
===================================================================
--- trunk/ippTools/src/pxcam.h	(revision 24677)
+++ trunk/ippTools/src/pxcam.h	(revision 24681)
@@ -25,5 +25,5 @@
 #include "pxtools.h"
 
-bool pxcamRunSetState(pxConfig *config, psS64 cam_id, const char *state);
+bool pxcamRunSetState(pxConfig *config, psS64 cam_id, const char *state, psS64 magicked);
 bool pxcamRunSetStateByQuery(pxConfig *config, psMetadata *where, const char *state);
 bool pxcamRunSetLabel(pxConfig *config, psS64 cam_id, const char *label);
