Package clickDetector
Class ClickBinaryDataSource
java.lang.Object
binaryFileStorage.BinaryDataSource
clickDetector.ClickBinaryDataSource
Class for storing clicks to binary store.
- Author:
- Doug Gillespie
-
Field Summary
Fields inherited from class binaryFileStorage.BinaryDataSource
packSynchObject
-
Constructor Summary
ConstructorDescriptionClickBinaryDataSource
(ClickDetector clickDetector, PamDataBlock sisterDataBlock, String streamName) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
byte[]
int
Get a version number for the module.getPackedData
(PamDataUnit pamDataUnit) Save a click to the binary data storeREturn a class capable of overriding the normal drawing on the data mapint
void
newFileOpened
(File outputFile) Called from the BinaryOutputStream whenever a new output file is opened.sinkData
(BinaryObjectData binaryObjectData, BinaryHeader bh, int moduleVersion) Convert data read back in in viewer mode into the correct type of PamDataUnit.sinkModuleFooter
(BinaryObjectData binaryObjectData, BinaryHeader bh, ModuleHeader mh) Do something with module footer informationsinkModuleHeader
(BinaryObjectData binaryObjectData, BinaryHeader bh) Do something with module header informationMethods inherited from class binaryFileStorage.BinaryDataSource
createFilenamePrefix, getBackgroundBinaryWriter, getBinaryStorageStream, getModuleName, getModuleType, getSisterDataBlock, isDoBinaryStore, isSaveUpdates, isStoreData, reset, saveData, setBinaryStorageStream, setDoBinaryStore, setSaveUpdates, setStoreData
-
Field Details
-
CLICK_DETECTOR_CLICK
public static final int CLICK_DETECTOR_CLICK- See Also:
-
-
Constructor Details
-
ClickBinaryDataSource
public ClickBinaryDataSource(ClickDetector clickDetector, PamDataBlock sisterDataBlock, String streamName)
-
-
Method Details
-
newFileOpened
Description copied from class:BinaryDataSource
Called from the BinaryOutputStream whenever a new output file is opened.- Specified by:
newFileOpened
in classBinaryDataSource
- Parameters:
outputFile
- file information.
-
getModuleVersion
public int getModuleVersion()Description copied from class:BinaryDataSource
Get a version number for the module.This is different to the version number in the main file header and allows individual modules to update their format and maintain backwards compatibility with old data
- Specified by:
getModuleVersion
in classBinaryDataSource
- Returns:
- integer module version number
-
getModuleHeaderData
public byte[] getModuleHeaderData()- Specified by:
getModuleHeaderData
in classBinaryDataSource
- Returns:
- Additional information (e.g. a control structure for a detector) to be stored in the Module Specific Control structure
-
getStreamName
- Specified by:
getStreamName
in classBinaryDataSource
- Returns:
- Stream name to be stored in the file header
-
getStreamVersion
public int getStreamVersion()- Specified by:
getStreamVersion
in classBinaryDataSource
- Returns:
- Stream version name to be stored in the Module Specific Control structure
-
getPackedData
Save a click to the binary data store- Specified by:
getPackedData
in classBinaryDataSource
- Parameters:
pamDataUnit
- data unit to packcd
- click detection- Returns:
- packed binary data object
-
sinkModuleHeader
Description copied from class:BinaryDataSource
Do something with module header information- Specified by:
sinkModuleHeader
in classBinaryDataSource
- Parameters:
binaryObjectData
- data for the module header.bh
- Binary header information
-
sinkData
Description copied from class:BinaryDataSource
Convert data read back in in viewer mode into the correct type of PamDataUnit.DO NOT add this unit directly to the datablock, but pass it back to the calling process which will add it to the datablock if necessary.
- Specified by:
sinkData
in classBinaryDataSource
- Parameters:
binaryObjectData
- Binary data read back from a file.bh
- binary header from start of file.- Returns:
- the PamDataUnit created from these data
-
getSpecialDrawing
Description copied from class:BinaryDataSource
REturn a class capable of overriding the normal drawing on the data map- Overrides:
getSpecialDrawing
in classBinaryDataSource
- Returns:
- null if nothign exists.
-