diff --git a/.gitignore b/.gitignore
index 42661621bae74ef9ed49c5d579dcf090310c8e6b..c669174e7dea6ff0725a452e8ccbad07c1ec8588 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,8 @@ hcana
 # Examples directory
 examples/*.root
 examples/*.log.*
+# This is auto generated by hodtest.C
+examples/db_cratemap.dat
 
 # Working directory
 work
diff --git a/examples/db_cratemap.dat b/examples/db_cratemap.dat
deleted file mode 100644
index 18cf0b7e6d0921c88b280084f4ba33a9adb81972..0000000000000000000000000000000000000000
--- a/examples/db_cratemap.dat
+++ /dev/null
@@ -1,48 +0,0 @@
-# Hall C Crate map
-==== Crate 1 type fastbus
-# slot  model   clear   header  mask    nchan   ndata
-  1     1881    1       0x0     0x0     64      64
-  3     1881    1       0x0     0x0     64      64
-  5     1881    1       0x0     0x0     64      64
-  7     1881    1       0x0     0x0     64      64
-  9     1881    1       0x0     0x0     64      64
- 11     1881    1       0x0     0x0     64      64
- 13     1881    1       0x0     0x0     64      64
- 18     1875    1       0x0     0x0     64      64
- 19     1875    1       0x0     0x0     64      64
- 21     1875    1       0x0     0x0     64      64
- 23     1875    1       0x0     0x0     64      64
-==== Crate 2 type fastbus
-# slot  model   clear   header  mask    nchan   ndata
-  2     1877    1       0x0     0x0     64      256
-  3     1877    1       0x0     0x0     64      256
-  5     1877    1       0x0     0x0     64      256
-  6     1877    1       0x0     0x0     64      256
-  8     1877    1       0x0     0x0     64      256
-  9     1877    1       0x0     0x0     64      256
- 15     1877    1       0x0     0x0     64      256
- 16     1877    1       0x0     0x0     64      256
- 18     1877    1       0x0     0x0     64      256
- 19     1877    1       0x0     0x0     64      256
- 21     1877    1       0x0     0x0     64      256
- 22     1877    1       0x0     0x0     64      256
-==== Crate 3 type fastbus
-# slot  model   clear   header  mask    nchan   ndata
-  1     1881    1       0x0     0x0     64      64
-  3     1881    1       0x0     0x0     64      64
-  5     1881    1       0x0     0x0     64      64
-  7     1881    1       0x0     0x0     64      64
-  9     1881    1       0x0     0x0     64      64
- 18     1875    1       0x0     0x0     64      64
- 20     1875    1       0x0     0x0     64      64
- 22     1875    1       0x0     0x0     64      64
-==== Crate 4 type fastbus
-# slot  model   clear   header  mask    nchan   ndata
-  1     1877    1       0x0     0x0     64      256
-  2     1877    1       0x0     0x0     64      256
-  4     1877    1       0x0     0x0     64      256
-  5     1877    1       0x0     0x0     64      256
-  8     1877    1       0x0     0x0     64      256
-  9     1877    1       0x0     0x0     64      256
- 11     1877    1       0x0     0x0     64      256
- 12     1877    1       0x0     0x0     64      256
diff --git a/examples/hodtest.C b/examples/hodtest.C
index 6a2ce5ff1d8c87de6a3edbc7bee1be37f8558302..fea91315b75363ea425faf46e6c6e960206aea23 100644
--- a/examples/hodtest.C
+++ b/examples/hodtest.C
@@ -17,13 +17,17 @@
 
   gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
 
-  // Load the Hall C style detector map
+  // Generate db_cratemap to correspond to map file contents
+  char command[100];
+  sprintf(command,"./make_cratemap.pl < %s > db_cratemap.dat",gHcParms->GetString("g_decode_map_filename"));
+  system(command);
 
+  // Load the Hall C style detector map
   gHcDetectorMap=new THcDetectorMap();
   gHcDetectorMap->Load(gHcParms->GetString("g_decode_map_filename"));
 
   // Set up the equipment to be analyzed.
-  
+
   THaApparatus* HMS = new THcHallCSpectrometer("H","HMS");
   gHaApps->Add( HMS );