public class GeppettoRecordingCreator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
_fileName |
private static Log |
_logger |
private static int |
i |
private java.util.HashMap<java.lang.String,RecordingObject> |
map |
private H5File |
recordingsH5File |
private java.util.List<java.lang.String> |
reloaded |
Constructor and Description |
---|
GeppettoRecordingCreator(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addValues(java.lang.String variable,
java.lang.Double[][] values,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Stores information in a Recording Object, which is then placed inside a map.
|
void |
addValues(java.lang.String variable,
java.lang.Double[] values,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Stores information in a Recording Object, which is then placed inside a map.
|
void |
addValues(java.lang.String variable,
double value,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Calls overloaded method to add values to file.
|
void |
addValues(java.lang.String variable,
float[] values,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Stores information in a Recording Object, which is then placed inside a map.
|
void |
addValues(java.lang.String variable,
float value,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Calls overloaded method to add values to file.
|
void |
addValues(java.lang.String variable,
int[] values,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Stores information in a Recording Object, which is then placed inside a map.
|
void |
addValues(java.lang.String variable,
int value,
java.lang.String unit,
java.lang.String metaType,
boolean update)
Calls overloaded method to add values to file.
|
private HObject |
checkParent(java.lang.String groupName,
Group parentGroup)
Checks if the parent has already the group we intend to create inside itself
|
void |
create()
Create new HDF5File for recordings, or retrieve existing one with same name.
|
private void |
createAttributes(java.lang.String type,
java.lang.String unit,
Dataset dataset)
Adds attributes to dataset.
|
private Dataset |
createDataSet(RecordingObject recordingObject,
Group parentObject,
java.lang.String name)
Stores data in a dataset object.
|
private Group |
createGroup(Group parent,
java.lang.String tag,
java.lang.String path,
Group root)
Creates a part of the variable, a Group member object.
|
java.lang.String |
getName()
Returns name of recordings file
|
H5File |
getRecordingsFile()
Returns H5File that was created for this recording
|
private Group |
getRoot()
Get root of recordings file
|
void |
superAddValues(RecordingObject recordingObject)
General method for adding datasets to an HDF5 File.
|
private static Log _logger
private java.lang.String _fileName
private H5File recordingsH5File
private java.util.HashMap<java.lang.String,RecordingObject> map
private java.util.List<java.lang.String> reloaded
private static int i
public H5File getRecordingsFile()
public java.lang.String getName()
public void create() throws java.lang.Exception
java.lang.Exception
public void addValues(java.lang.String variable, double value, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, int value, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, float value, java.lang.String unit, java.lang.String metaType, boolean update) throws java.lang.Exception
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, java.lang.Double[] values, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, java.lang.Double[][] values, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, int[] values, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
public void addValues(java.lang.String variable, float[] values, java.lang.String unit, java.lang.String metaType, boolean update)
variable
- - Name of Variable to createvalues
- - Values of data set to storeunit
- - Unit of measurement for datametaType
- - Type of node, either variable or parameter nodejava.lang.Exception
private Group getRoot() throws GeppettoExecutionException
GeppettoExecutionException
public void superAddValues(RecordingObject recordingObject) throws java.lang.Exception
recordingObject
- - Object containing the information of an object to be added to the HDF5 file.java.lang.Exception
private void createAttributes(java.lang.String type, java.lang.String unit, Dataset dataset) throws HDF5Exception
type
- - Metatype of dataset (VariableNode or ParameterNode)unit
- - Unit of measurement for datasetsdataset
- - Dataset that will be parent to attributesHDF5Exception
private Dataset createDataSet(RecordingObject recordingObject, Group parentObject, java.lang.String name) throws java.lang.Exception
recordingObject
- - Object holding parameters for creating the datasetparentObject
- - Object that will have this dataset as childname
- - Name of the datasetjava.lang.Exception
private Group createGroup(Group parent, java.lang.String tag, java.lang.String path, Group root) throws java.lang.Exception
parent
- - Will hold the new grouptag
- - Name of grouppath
- - Path of variablejava.lang.Exception
private HObject checkParent(java.lang.String groupName, Group parentGroup)
groupName
- parentGroup
-