Class ScanBean
java.lang.Object
org.eclipse.scanning.api.event.IdBean
org.eclipse.scanning.api.event.status.StatusBean
org.eclipse.scanning.api.event.scan.ScanBean
- All Implemented Interfaces:
Serializable
This bean is used to disseminate messages about what has happened
to the scan while it is being written.
Do not extend this class to allow arbitrary information to be sent. The event encapsulated by this bean should be sending just the information defined here, metadata that cannot circumvent the nexus file.
For instance adding a dynamic set of information, a map perhaps, would allow information which should be saved in the Nexus file to circumvent the file and be set in the event. It was decided in various meetings that doing this could mean that some data is not recorded as it should be in nexus. Therefore these events are simply designed to contain events not data. They are not the same as the old ScanDataPoint system in GDA
- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.scanning.api.event.status.StatusBean
EMPTY, estimatedTime, hostName, message, name, percentComplete, previousStatus, startTime, status, submissionTime, userName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongintgetPoint()intintgetSize()NOTE the size is the approximate size of the scan by using the iterators.inthashCode()<T extends IdBean>
voidmerge(T with) Subclasses must override this method calling super.merge(...)voidputPosition(String name, int index, Object val) booleanscanEnd()booleanvoidsetBeamline(String beamline) voidsetExperimentId(String experimentId) voidsetFilePath(String filePath) voidsetMappingBeanId(long id) voidsetPoint(int frame) voidsetPosition(IPosition value) voidsetScanNumber(int scanNumber) voidsetScanRequest(ScanRequest scanRequest) voidsetSize(int size) NOTE the size is the approximate size of the scan by using the iterators.toString()Methods inherited from class org.eclipse.scanning.api.event.status.StatusBean
createName, getEstimatedTime, getHostName, getMessage, getName, getPercentComplete, getPreviousStatus, getProperties, getProperty, getRunDirectory, getStartTime, getStatus, getSubmissionTime, getUserName, setEstimatedTime, setHostName, setMessage, setName, setPercentComplete, setPreviousStatus, setProperties, setProperty, setRunDirectory, setStartTime, setStatus, setSubmissionTime, setUserNameMethods inherited from class org.eclipse.scanning.api.event.IdBean
getUniqueId, setUniqueId
-
Field Details
-
INVALID_ID
public static final long INVALID_ID- See Also:
-
-
Constructor Details
-
ScanBean
public ScanBean() -
ScanBean
-
ScanBean
-
-
Method Details
-
merge
Description copied from class:StatusBeanSubclasses must override this method calling super.merge(...)- Overrides:
mergein classStatusBean- Parameters:
with-
-
getFilePath
-
setFilePath
-
getScanNumber
public int getScanNumber() -
setScanNumber
public void setScanNumber(int scanNumber) -
getBeamline
-
setBeamline
-
toString
- Overrides:
toStringin classStatusBean
-
getExperimentId
-
setExperimentId
-
getPoint
public int getPoint() -
setPoint
public void setPoint(int frame) -
getSize
public int getSize()NOTE the size is the approximate size of the scan by using the iterators. It is legal to do logic in an iterator - this means that the overall size is not constant for some custom scan types! However for the vast majority of linear scans size and shape are constant. -
setSize
public void setSize(int size) NOTE the size is the approximate size of the scan by using the iterators. It is legal to do logic in an iterator - this means that the overall size is not constant for some custom scan types! However for the vast majority of linear scans size and shape are constant.- Parameters:
size-
-
getPosition
-
setPosition
-
putPosition
-
scanStart
public boolean scanStart()- Returns:
- whether the scan has just started, i.e. transitioned from a
Status.PREPARINGstate to aStatus.RUNNINGstate.
-
scanEnd
public boolean scanEnd()- Returns:
- whether the scan has just ended, i.e. transitioned from a RUNNING/RESUMED state to a post-running state.
-
getScanRequest
-
setScanRequest
-
getMappingBeanId
public long getMappingBeanId() -
setMappingBeanId
public void setMappingBeanId(long id) -
toProgressString
-
hashCode
public int hashCode()- Overrides:
hashCodein classStatusBean
-
equals
- Overrides:
equalsin classStatusBean
-