uchicago.src.sim.analysis
Class DistributedDataRecorder

java.lang.Object
  extended by uchicago.src.sim.analysis.AbstractDataSourceRecorder
      extended by uchicago.src.sim.analysis.DistributedDataRecorder
All Implemented Interfaces:
DataSourceRecorder, Recorder, SimEventListener

public class DistributedDataRecorder
extends AbstractDataSourceRecorder

Created by IntelliJ IDEA. User: thowe Date: Jan 2, 2003 Time: 1:07:53 PM To change this template use Options | File Templates.


Field Summary
protected  IController control
           
protected  java.util.Hashtable dynParams
           
protected  java.lang.String fileName
           
protected  java.lang.String name
           
static java.lang.String WRITE_END_KEY
           
protected  boolean writeHeader
           
protected  java.lang.String writeKey
           
protected  DataWriter writer
           
 
Fields inherited from class uchicago.src.sim.analysis.AbstractDataSourceRecorder
data, dfHeader, model, sources
 
Constructor Summary
DistributedDataRecorder(java.lang.String fileName, DataWriter writer, SimModel model)
           
DistributedDataRecorder(java.lang.String fileName, DataWriter writer, SimModel model, java.lang.String headerComment)
           
 
Method Summary
 void record()
          Records the data for the current tick in tabular format.
 void simEventPerformed(SimEvent event)
           
 void write()
          Writes the recorded data out to a file in tabular format.
 void writeEnd()
          Writes any ending matter to the file.
 void writeToFile()
           
 
Methods inherited from class uchicago.src.sim.analysis.AbstractDataSourceRecorder
addNumericDataSource, addNumericDataSource, addObjectDataSource, createAverageDataSource, createAverageDataSource, createNumericDataSource, createNumericDataSource, createObjectDataSource, initData, setDelimeter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

writer

protected DataWriter writer

name

protected java.lang.String name

fileName

protected java.lang.String fileName

control

protected IController control

dynParams

protected java.util.Hashtable dynParams

writeHeader

protected boolean writeHeader

writeKey

protected java.lang.String writeKey

WRITE_END_KEY

public static final java.lang.String WRITE_END_KEY
See Also:
Constant Field Values
Constructor Detail

DistributedDataRecorder

public DistributedDataRecorder(java.lang.String fileName,
                               DataWriter writer,
                               SimModel model,
                               java.lang.String headerComment)

DistributedDataRecorder

public DistributedDataRecorder(java.lang.String fileName,
                               DataWriter writer,
                               SimModel model)
Method Detail

record

public void record()
Description copied from interface: Recorder
Records the data for the current tick in tabular format. Each tick is a row, and each column is the name of the data source.

Specified by:
record in interface Recorder
Specified by:
record in class AbstractDataSourceRecorder

writeToFile

public void writeToFile()
Specified by:
writeToFile in interface Recorder
Specified by:
writeToFile in class AbstractDataSourceRecorder

write

public void write()
Description copied from interface: Recorder
Writes the recorded data out to a file in tabular format. This also does a flush on the data itself (i.e. the data is no longer stored by repast and exists only in the file). Identical to writeToFile().

Specified by:
write in interface Recorder
Specified by:
write in class AbstractDataSourceRecorder

simEventPerformed

public void simEventPerformed(SimEvent event)
Specified by:
simEventPerformed in interface Recorder
Specified by:
simEventPerformed in interface SimEventListener
Overrides:
simEventPerformed in class AbstractDataSourceRecorder

writeEnd

public void writeEnd()
Description copied from interface: Recorder
Writes any ending matter to the file. Used internally during a batch run to write the ending time of the entire batch. A model would not typically call this method.

Specified by:
writeEnd in interface Recorder
Specified by:
writeEnd in class AbstractDataSourceRecorder