Package uk.ac.gda.hrpd.cvscan
Class CVScan
- All Implemented Interfaces:
INeXusInfoWriteable,Device,Scannable,ScannableMotion,Configurable,Findable,gda.observable.IObservable,gda.observable.IObserver
@ServiceInterface(Scannable.class)
public class CVScan
extends ScannableMotionBase
implements gda.observable.IObserver
* Specify
Scriptcontroller instance to handle data file name changed event FileNumberEvent which
facilitate server to client communication-
Field Summary
FieldsFields inherited from class gda.device.scannable.ScannableMotionBase
numberTries, toleranceFields inherited from class gda.device.scannable.ScannableBase
__doc__, DEFAULT_INPUT_NAME, DEFAULT_OUTPUT_FORMAT, extraNames, inputNames, level, outputFormatFields inherited from class gda.device.DeviceBase
DEFAULT_PROTECTION_LEVEL_PROPERTYFields inherited from interface gda.device.Scannable
ATTR_NEXUS_CATEGORY, ATTR_NX_CLASS, DEFAULT_INPUT_NAME, VALUE_UNAVAILABLEFields inherited from interface gda.device.ScannableMotion
FIRSTINPUTLIMITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDetector(Detector mcsDetector) voidvoidaddScannables(ArrayList<Scannable> scannableList) used to add scannables to cvscan which are passed to the MAC data writer to capture their values as metadata in the header.voidCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e.voidCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e.voidCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).voidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)voidDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.doubleget the scan range of the 2nd motor in the current CVScan Profile.doubleget the start position of the 2nd motor in the current CVScan Profilelist CVScan profile availablegets current CVScan profileCallable<?> booleanisBusy()Check if the Scannable is moving/operating.booleanvoidrawAsynchronousMoveTo(Object time) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.[Consider abstract] Read the position in its internal (user) representation.voidvoidvoidreset()reset the controller busy status to false if and only if locked to true.voidrestart()voidset2ndMotorScanRange(double position) set the scan range of 2nd motor in the current CVScan Profile.voidset2ndMotorStartPosition(double position) set the start position of the 2nd motor in current CVScan Profile.voidsetBeamMonitor(IonChamberBeamMonitor beamMonitor) voidsetController(EpicsCVScan controller) voidsetCVScanProfile(String profile) set or change CVScan profilevoidsetDataWriter(EpicsCVscanDataWriter dataWriter) voidsetDetectors(ArrayList<Detector> mcsDetectors) voidsetPsdSafePosition(SafePosition psdSafePosition) voidsetPsdScannableMotor(Scannable psdScannableMotor) voidsetSafePositionSetup(Callable<?> safePositionSetup) voidsetScriptController(Scriptcontroller scriptController) voidsetSumming(boolean summing) voidstop()Stop the current move/operation.voidObserver of Current State ofEpicsCVScanobject.Methods inherited from class gda.device.scannable.ScannableMotionBase
a, addPositionValidator, ar, asynchronousMoveTo, checkPositionValid, checkPositionWithinGdaLimits, checkPositionWithinGdaLimits, completeInstantiation, externalToInternal, generateScannableLimitsReport, getAdditionalPositionValidators, getAttribute, getFirstInputLimits, getInputLimits, getInputLimits, getLimitsComponent, getLowerGdaLimits, getNumberTries, getOffset, getScalingFactor, getTolerances, getUpperGdaLimits, internalToExternal, isAt, moveTo, r, rawIsBusy, removePositionValidator, setAdditionalPositionValidators, setLimitsComponent, setLowerGdaLimits, setLowerGdaLimits, setNumberTries, setOffset, setOffsetAndScalingComponent, setScalingFactor, setTolerance, setTolerances, setUpperGdaLimits, setUpperGdaLimits, toFormattedString, writeNeXusInformation, writeNeXusInformationLimitsMethods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atScanLineEnd, atScanLineStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, throwExceptionIfInvalidTarget, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
isConfigured, reconfigure, setConfiguredMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gda.factory.Configurable
isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObserversMethods inherited from interface gda.device.Scannable
atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atScanLineEnd, atScanLineStart, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, waitWhileBusy
-
Field Details
-
paused
public volatile boolean paused
-
-
Constructor Details
-
CVScan
public CVScan()
-
-
Method Details
-
configure
Description copied from class:ConfigurableBaseDefault implementation for classes that do not have to do any specific configuration.
Classes that do their own configuration should *not* call this superclass function, as it may cause the object to appear configured before it really is.- Specified by:
configurein interfaceConfigurable- Overrides:
configurein classConfigurableBase- Throws:
FactoryException- if there is an error in configuration e.g. required variable not set or cannot connect to device
-
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classScannableBase- Parameters:
time- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
restart
- Throws:
DeviceException
-
rawGetPosition
Description copied from class:ScannableBase[Consider abstract] Read the position in its internal (user) representation.- Overrides:
rawGetPositionin classScannableBase- Returns:
- the value represented by this Scannable
- Throws:
DeviceException- See Also:
-
getRebinnedFilePath
-
getRawFilePath
-
isBusy
public boolean isBusy()Description copied from class:ScannableMotionBaseCheck if the Scannable is moving/operating.. Calls onto rawIsBusy for historical reasons, although there is currently no need for this.- Specified by:
isBusyin interfaceScannable- Overrides:
isBusyin classScannableMotionBase- Returns:
- true - if operation carried out by moveTo has not completed yet
- See Also:
-
atScanStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanStartin interfaceScannable- Overrides:
atScanStartin classScannableBase- Throws:
DeviceException- See Also:
-
atScanEnd
Description copied from class:ScannableBaseCalled for every Scannable at the end of a group of nested scans (or a single scan if that is the case).Note that this is only called if the Scan finishes normally, or has been requested to finish early. This will not be called if the scan finishes due to an exception of any kind. See
Scannable.atCommandFailure()Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanEndin interfaceScannable- Overrides:
atScanEndin classScannableBase- Throws:
DeviceException- See Also:
-
atPointStart
Description copied from class:ScannableBaseCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e. non-continuous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointStartin interfaceScannable- Overrides:
atPointStartin classScannableBase- Throws:
DeviceException- See Also:
-
atPointEnd
Description copied from class:ScannableBaseCalled on every Scannable at the end of every data point, for scans which are broken down into individual points (i.e. non-continous scans) Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atPointEndin interfaceScannable- Overrides:
atPointEndin classScannableBase- Throws:
DeviceException- See Also:
-
stop
Description copied from class:ScannableBaseStop the current move/operation. Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
stopin interfaceScannable- Overrides:
stopin classScannableBase- Throws:
DeviceException- See Also:
-
setCVScanProfile
set or change CVScan profile- Throws:
DeviceException
-
getCVScanProfile
gets current CVScan profile- Returns:
- CVScan profile name
- Throws:
DeviceException
-
getAvailableCVScanProfiles
list CVScan profile available- Returns:
- list of Profiles
- Throws:
InterruptedException
-
reset
reset the controller busy status to false if and only if locked to true.- Throws:
gov.aps.jca.CAExceptionInterruptedException
-
set2ndMotorStartPosition
set the start position of the 2nd motor in current CVScan Profile.- Parameters:
position-- Throws:
DeviceException
-
get2ndMotorStartPosition
get the start position of the 2nd motor in the current CVScan Profile- Returns:
- start position of 2nd motor
- Throws:
DeviceException
-
get2ndMotorScanRange
get the scan range of the 2nd motor in the current CVScan Profile.- Returns:
- scan range of 2nf motor
- Throws:
DeviceException
-
set2ndMotorScanRange
set the scan range of 2nd motor in the current CVScan Profile.- Parameters:
position-- Throws:
DeviceException
-
update
Observer of Current State ofEpicsCVScanobject. On state updates toReduction, kicks off a new threads to save raw data; on state updates to @{code Flyback}, kicks off a new thread to save rebinned data. Any other states just print message to the Jython terminal.- Specified by:
updatein interfacegda.observable.IObserver
-
addScannables
used to add scannables to cvscan which are passed to the MAC data writer to capture their values as metadata in the header.- Parameters:
scannableList-
-
addScannable
-
removeScannable
-
removeAllScannables
public void removeAllScannables() -
getDetectors
-
addDetector
-
setDetectors
-
getController
-
setController
-
getBeamMonitor
-
setBeamMonitor
-
getPsdScannableMotor
-
setPsdScannableMotor
-
getPsdSafePosition
-
setPsdSafePosition
-
getDataWriter
-
setDataWriter
-
getScriptController
-
setScriptController
-
getSafePositionSetup
-
setSafePositionSetup
-
isSumming
public boolean isSumming() -
setSumming
public void setSumming(boolean summing)
-