[Avida-cvs] [Avida2-svn] r275 - trunk/source/main

kaben@myxo.css.msu.edu kaben at myxo.css.msu.edu
Thu Aug 4 16:03:06 PDT 2005


Author: kaben
Date: 2005-08-04 19:03:06 -0400 (Thu, 04 Aug 2005)
New Revision: 275

Modified:
   trunk/source/main/analyze.cc
Log:

Restored hardware status printing.



Modified: trunk/source/main/analyze.cc
===================================================================
--- trunk/source/main/analyze.cc	2005-08-04 23:02:52 UTC (rev 274)
+++ trunk/source/main/analyze.cc	2005-08-04 23:03:06 UTC (rev 275)
@@ -1480,14 +1480,21 @@
       break;
     }
     
+    // Build the hardware status printer for tracing.
+    ofstream trace_fp;
+    trace_fp.open(filename);
+    assert (trace_fp.good() == true); // Unable to open trace file.
+    cHardwareStatusPrinter trace_printer(trace_fp);
+
     // Build the test info for printing.
     cCPUTestInfo test_info;
     test_info.TestThreads();
-    test_info.SetTraceExecution(filename);
+    test_info.SetTraceExecution(&trace_printer);
     
     cTestCPU::TestGenome(test_info, genotype->GetGenome());
     
     if (verbose) cout << "  Tracing: " << filename << endl;
+    trace_fp.close();
   }
   
   if(useResources) {




More information about the Avida-cvs mailing list