|
|||||||||
| Home >> All >> org >> mrd >> [ analysis overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.mrd.analysis
Class TabDataFileHeader

java.lang.Objectorg.mrd.analysis.TabDataFileHeader
- public class TabDataFileHeader
- extends java.lang.Object
Given a model and this will create the appropriate header for any data file. For batch runs, constant parameters will be in one header (the true header), and dynamic parameters will be in a block header and reflect the parameter value at that time. Note: the actual parameter values in the file header are created via the call to getFileHeader(). For DataRecorder's this call is made in the DataRecorder's constructor. Consequently, any changes to model parameter's made after this call are not reflected in the file header.
| Field Summary | |
private java.lang.String |
headerComment
|
private boolean |
isBatch
|
private java.lang.String |
lineSep
|
private SimModel |
model
|
private java.lang.String |
modelHeader
|
private java.util.Hashtable |
propertyMethod
|
| Constructor Summary | |
TabDataFileHeader()
This should only be used for testing various Recorders that use DataFileHeader but don't need to create a model. |
|
TabDataFileHeader(SimModel model)
|
|
| Method Summary | |
void |
addHeaderComment(java.lang.String comment)
Prepends a comment to the usual file header. |
private java.util.Hashtable |
createBatchHeader()
|
private void |
createBlockHeader()
|
private void |
createHeader()
|
boolean |
doWriteHeader(java.lang.String fileName)
Should the header be written to the specified file during this run? Recorder objects can query their DataFileHeaders to see if the header should be written. |
private java.lang.String |
getBHeader(boolean asComments)
|
java.lang.String |
getBlockHeader()
Gets the block header. |
java.lang.String |
getBlockHeaderAsComments()
Gets the block header. |
java.util.Hashtable |
getDynParamMethod()
|
java.lang.String |
getFileHeader()
Gets the true file header. |
java.lang.Object |
getPersistentObj(java.lang.Object key)
Gets a persistent object. |
boolean |
isBatch()
Is this DataFileHeader part of a batch run. |
void |
putPersistentObj(java.lang.Object key,
java.lang.Object val)
Puts an object in the persistent store. |
void |
setWriteHeader(java.lang.String fileName,
boolean val)
Sets whether the header should be written to the file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
modelHeader
private java.lang.String modelHeader
isBatch
private boolean isBatch
model
private SimModel model
lineSep
private java.lang.String lineSep
headerComment
private java.lang.String headerComment
propertyMethod
private java.util.Hashtable propertyMethod
| Constructor Detail |
TabDataFileHeader
public TabDataFileHeader()
- This should only be used for testing various Recorders that
use DataFileHeader but don't need to create a model.
TabDataFileHeader
public TabDataFileHeader(SimModel model)
| Method Detail |
createHeader
private void createHeader()
createBatchHeader
private java.util.Hashtable createBatchHeader()
createBlockHeader
private void createBlockHeader()
addHeaderComment
public void addHeaderComment(java.lang.String comment)
- Prepends a comment to the usual file header.
getFileHeader
public java.lang.String getFileHeader()
- Gets the true file header. This includes all the constant model parameters.
For a non-batch run, this is just all the model parameters at the time
the file is first written.
getBHeader
private java.lang.String getBHeader(boolean asComments)
getBlockHeader
public java.lang.String getBlockHeader()
- Gets the block header. This is all the dynamic parameters and their
values. For a non batch run, this is an empty string. For a batch run,
this is the current run number, followed by the dynamic parameters and
their values. One parameter per line.
getBlockHeaderAsComments
public java.lang.String getBlockHeaderAsComments()
- Gets the block header. This is all the dynamic parameters and their
values. For a non batch run, this is an empty string. For a batch run,
this is the current run number, followed by the dynamic parameters and
their values. One parameter per line, prepended by a "#"
isBatch
public boolean isBatch()
- Is this DataFileHeader part of a batch run.
doWriteHeader
public boolean doWriteHeader(java.lang.String fileName)
- Should the header be written to the specified file during this run?
Recorder objects can
query their DataFileHeaders to see if the header should be written. The
header will always be written during a non-batch run where one run
is recorded per file. For a batch run where all the runs are written
to a single file the header is only written once.
setWriteHeader
public void setWriteHeader(java.lang.String fileName, boolean val)
- Sets whether the header should be written to the file.
putPersistentObj
public void putPersistentObj(java.lang.Object key, java.lang.Object val)
- Puts an object in the persistent store. The object will then
persist over the course of several runs (i.e. beyond the life of this
DataFileHeader).
getPersistentObj
public java.lang.Object getPersistentObj(java.lang.Object key)
- Gets a persistent object.
getDynParamMethod
public java.util.Hashtable getDynParamMethod()
|
|||||||||
| Home >> All >> org >> mrd >> [ analysis overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.mrd.analysis.TabDataFileHeader