Index: trunk/dettools/src/dettools.h
===================================================================
--- trunk/dettools/src/dettools.h	(revision 5881)
+++ trunk/dettools/src/dettools.h	(revision 6022)
@@ -1,10 +1,7 @@
 # include <stdio.h>
-# include <strings.h>  // for strcasecmp
-# include <unistd.h>   // for unlink
+# include <strings.h>
+# include <unistd.h>
 # include <pslib.h>
-# include <pmObjects.h>
-# include <pmPSF.h>
-# include <pmPSFtry.h>
-# include <pmModelGroup.h>
+# include "metadata.h"
 
 typedef enum {
@@ -52,84 +49,10 @@
 } detConfig;
 
-// these structures should be defined using the mddb api tools
-// check definition in p2search.h
-typedef struct ppRawExposure;
-typedef struct ppRawImfile;
-
-// this structure should be defined using the mddb api tools
-typedef struct {
-    char expID[32];			// free-form exposure ID string
-    char class;				// class of file: fpa (0), chip (1), cell (2), readout (3)?
-    int Nclass;				// number of files of this class
-    int Ndone;				// number of files of this class
-    char P1version;
-    char P2version;
-    char state;
-} detInputExposure;
-
-// this structure should be defined using the mddb api tools
-typedef struct {
-    char expID[32];			// free-form exposure ID string
-    char P2version;
-    char class;				// class of file: fpa (0), chip (1), cell (2), readout (3)?
-    char classID[32];			// identifier for class (chip00, cell00, etc)
-    char urlroot[128];			// locator for file (neb / file)
-    char input[16];			// extension for input image
-    char output[16];			// extension for output image
-    char log[16];			// extension for log file
-    char smf[16];			// extension for object table
-    char state;				// current P2 state
-} detInputImfile;
-
-// this structure should be defined using the mddb api tools
-typedef struct {
-    a detID;
-    a version;
-    a iteration;
-    a type;
-    a camera;
-    a filter;
-    a class;
-    int nInput;
-    int nImfiles;
-    detState state;
-    float stats;
-} detMasterExposure;
-
-typedef struct {
-    a detID;
-    a version;
-    a iteration;
-    a classID;
-    a stats;
-    detState state;
-} detMasterImfile;
-
-typedef struct {
-    a detID;
-    a version;
-    a state;
-
-    int nIterations;			// number of iterations STARTED
-
-    detType type;
-    char *camera;
-    char *filter;
-
-    bool groupSelect;
-    char *groupID;
-
-    bool timeSelect;
-    psTime start;
-    psTime stop;
-
-    bool exptimeSelect;
-    float exptimeMin;
-    float exptimeMax;
-
-    bool airmassSelect;
-    float airmassMin;
-    float airmassMax;
-} detMasterRun;
+// these structures are defined in metadata.h using glueforge
+// typedef struct DetrendInputExposure;
+// typedef struct DetrendInputImfile;
+// typedef struct DetrendMasterRun;
+// typedef struct DetrendMasterExposure;
+// typedef struct DetrendMasterImfile;
 
 typedef struct {
