Package gda.device.scannable
Class BeamlineConditionMonitorBase
java.lang.Object
gda.factory.ConfigurableBase
gda.factory.FindableConfigurableBase
gda.device.DeviceBase
gda.device.scannable.ScannableBase
gda.device.scannable.BeamlineConditionMonitorBase
- All Implemented Interfaces:
Device,Scannable,Configurable,Findable,gda.observable.IObservable
- Direct Known Subclasses:
BeamMonitor,CheckingScannable,DetectorFillingMonitorScannable,PVConditionMonitorBase,TopupChecker
A base class for zero-input, zero-output scannables whose job is to automatically pause a scan if some condition is
met (say port shutter closed due to a beam dump) and resume when that condition has passed.
This provides such scannables with a way to ignore that condition when the machine is not running e.g. on machine development days (Tuesdays) or shutdowns. So these scannables may be always added to the list of default scannables and used in every scan.
-
Field Summary
Fields 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, VALUE_UNAVAILABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled on every Scannable at every data point, for scans which are broken down into individual points (i.e.voidCalled for every Scannable at the start of every scanvoidCalled for every Scannable at the start of a group of nested scans (or a single scan if that is the case)booleanisBusy()Check if the Scannable is moving/operating.booleanbooleanbooleanprotected booleanReturns false if not in a real running mode.voidrawAsynchronousMoveTo(Object position) [Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.[Consider abstract] Read the position in its internal (user) representation.protected voidsendAndPrintMessage(String message) voidsetMachineModeMonitor(Scannable machineModeMonitor) voidsetPauseBeforeLine(boolean pauseBeforeLine) voidsetPauseBeforePoint(boolean pauseBeforePoint) voidsetPauseBeforeScan(boolean pauseBeforeScan) protected abstract voidThe test is performed inside this method.Methods inherited from class gda.device.scannable.ScannableBase
__call__, __call__, __doc__, __getitem__, __len__, __repr__, __str__, asynchronousMoveTo, atCommandFailure, atLevelEnd, atLevelMoveStart, atLevelStart, atPointEnd, atScanEnd, atScanLineEnd, checkPositionValid, externalToInternal, getExtraNames, getInputNames, getLevel, getOutputFormat, getPosition, getScanMetadataAttribute, getScanMetadataAttributeNames, getScanMetadataAttributes, internalToExternal, isAt, moveTo, setExtraNames, setInputNames, setLevel, setOutputFormat, setScanMetadataAttribute, setScanMetadataAttributes, stop, throwExceptionIfInvalidTarget, toFormattedString, toString, validateScannable, valueUnavailableString, waitWhileBusy, waitWhileBusyMethods inherited from class gda.device.DeviceBase
addIObserver, close, deleteIObserver, deleteIObservers, getAttribute, getName, getProtectionLevel, isBeingObserved, isConfigureAtStartup, notifyIObservers, setAttribute, setConfigureAtStartup, setName, setProtectionLevelMethods inherited from class gda.factory.ConfigurableBase
configure, 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
configure, isConfigureAtStartup, isConfigured, reconfigureMethods inherited from interface gda.device.Device
close, getAttribute, getProtectionLevel, setAttribute, setProtectionLevelMethods inherited from interface gda.observable.IObservable
addIObserver, deleteIObserver, deleteIObservers
-
Constructor Details
-
BeamlineConditionMonitorBase
public BeamlineConditionMonitorBase()
-
-
Method Details
-
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:
-
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:
-
atScanLineStart
Description copied from class:ScannableBaseCalled for every Scannable at the start of every scan Default behaviour is to do nothing. Inheriting classes have the option to implement this if their specific behaviour requires it.- Specified by:
atScanLineStartin interfaceScannable- Overrides:
atScanLineStartin classScannableBase- Throws:
DeviceException- See Also:
-
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:
-
rawAsynchronousMoveTo
Description copied from class:ScannableBase[Consider abstract] Trigger a move/operation to an internal/hardware position and return immediately.- Overrides:
rawAsynchronousMoveToin classScannableBase- Parameters:
position- Position in its internal/hardware representation. e.g. with units and offsets removed- Throws:
DeviceException- See Also:
-
testShouldPause
The test is performed inside this method. An inheriting class could either wait inside this method until the condition has passed, or throw an Exception to end the scan, or throw a RedoScanLineThrowable to repeat the current scan.- Throws:
DeviceException- See Also:
-
machineIsRunning
Returns false if not in a real running mode.- Returns:
- true if user mode, so this object should operate.
- Throws:
DeviceException
-
sendAndPrintMessage
-
getMachineModeMonitor
-
setMachineModeMonitor
-
isBusy
Description copied from interface:ScannableCheck if the Scannable is moving/operating.- Returns:
- true - if operation carried out by moveTo has not completed yet
- Throws:
DeviceException
-
isPauseBeforeLine
public boolean isPauseBeforeLine() -
isPauseBeforeScan
public boolean isPauseBeforeScan() -
setPauseBeforeScan
public void setPauseBeforeScan(boolean pauseBeforeScan) -
setPauseBeforeLine
public void setPauseBeforeLine(boolean pauseBeforeLine) -
isPauseBeforePoint
public boolean isPauseBeforePoint() -
setPauseBeforePoint
public void setPauseBeforePoint(boolean pauseBeforePoint)
-