uchicago.src.sim.analysis
Class ObjectData

java.lang.Object
  extended by uchicago.src.sim.analysis.ObjectData

public class ObjectData
extends java.lang.Object

Stores simulation data as objects. These objects can be written out to a file as Strings via the Objects toString() method. It is assumed that such data is already approriately formatted. These objects are from DataSources stored by an ObjectDataRecorder.

Version:
$Revision: 1.4 $ $Date: 2004/11/03 19:51:00 $
Author:
Nick Collier

Constructor Summary
ObjectData(java.lang.String filename, java.lang.String modelHeader, java.lang.String header, boolean isBatch)
          Creates an ObjectData with the specified fileName, model header, and whether this is a batch run or not.
 
Method Summary
 void addData(java.lang.Object newData)
          Adds newData to this ObjectData
 void writeToFile()
          Writes the data (and a file header) out to a file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectData

public ObjectData(java.lang.String filename,
                  java.lang.String modelHeader,
                  java.lang.String header,
                  boolean isBatch)
Creates an ObjectData with the specified fileName, model header, and whether this is a batch run or not.

Parameters:
filename - the name of the file to write the data out to.
modelHeader - the model header (parameters etc.)
header - the header for this data.
isBatch - whether this is a batch run or not.
Method Detail

addData

public void addData(java.lang.Object newData)
Adds newData to this ObjectData

Parameters:
newData - the new data to add

writeToFile

public void writeToFile()
Writes the data (and a file header) out to a file. This flushes all data from the data vector out to a file.