Class DataCollectionController
java.lang.Object
gda.factory.FindableBase
uk.ac.gda.vmxi.datacollection.process.DataCollectionController
- All Implemented Interfaces:
Findable,IDataCollectionController
@ServiceInterface(IDataCollectionController.class)
public class DataCollectionController
extends FindableBase
implements IDataCollectionController
Wrap a dynamically set
DataCollectionProcess and expose control to the GDA client.
The information exposed through this class is stripped down somewhat to allow serialisation to the client.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRequest the data collection process stops after the current collection completes.voidRequest the data collection process stops after all currently running tasks complete."Get a list of all closed shutters and valve for the purpose of beam check.getError()Get a string representation for any error that stopped data collectionGet the current status of the data collection process.Get a map representing the dependencies between the current tasks.booleanCheck if the data collection process was started with beam checks enabled.booleanGet a list of all the tasks for the current data collection.voidopenShutters(List<String> shutterIds) Attempt to open the specified shutters.voidSet the wrappedDataCollectionProcess.voidstart(boolean enableBeamMonitor) Asynchronously start the data collection process.voidstop()Request the data collection process stops immediately, interrupting currently running jobs.Methods inherited from class gda.factory.FindableBase
equals, getName, hashCode, setNameMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface uk.ac.gda.vmxi.datacollection.process.IDataCollectionController
start
-
Constructor Details
-
DataCollectionController
public DataCollectionController()
-
-
Method Details
-
isEnableBeamMonitor
public boolean isEnableBeamMonitor()Description copied from interface:IDataCollectionControllerCheck if the data collection process was started with beam checks enabled.- Specified by:
isEnableBeamMonitorin interfaceIDataCollectionController
-
start
public void start(boolean enableBeamMonitor) Description copied from interface:IDataCollectionControllerAsynchronously start the data collection process.- Specified by:
startin interfaceIDataCollectionController- Parameters:
enableBeamMonitor- Enable checks for beam delivery.
-
stop
public void stop()Description copied from interface:IDataCollectionControllerRequest the data collection process stops immediately, interrupting currently running jobs. The processor will only report "stopped" when all tasks have stopped.- Specified by:
stopin interfaceIDataCollectionController
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceIDataCollectionController- Returns:
- true if the data collection processor is running
-
getStatus
Description copied from interface:IDataCollectionControllerGet the current status of the data collection process.- Specified by:
getStatusin interfaceIDataCollectionController- Returns:
- ProcessStatus for current run/stopped state.
-
finishCurrentDataCollection
public void finishCurrentDataCollection()Description copied from interface:IDataCollectionControllerRequest the data collection process stops after the current collection completes.- Specified by:
finishCurrentDataCollectionin interfaceIDataCollectionController
-
finishCurrentTasks
public void finishCurrentTasks()Description copied from interface:IDataCollectionControllerRequest the data collection process stops after all currently running tasks complete."- Specified by:
finishCurrentTasksin interfaceIDataCollectionController
-
getDataCollectionProcess
-
setDataCollectionProcess
Set the wrappedDataCollectionProcess. Should not be called if a process is already being executed.- Parameters:
process- The process to wrap
-
listCurrentTasks
Description copied from interface:IDataCollectionControllerGet a list of all the tasks for the current data collection.- Specified by:
listCurrentTasksin interfaceIDataCollectionController- Returns:
- List of TaskInfo for current tasks.
-
getTaskDependencies
Description copied from interface:IDataCollectionControllerGet a map representing the dependencies between the current tasks.- Specified by:
getTaskDependenciesin interfaceIDataCollectionController- Returns:
- Map for Task names to the names of its dependencies.
-
getError
Description copied from interface:IDataCollectionControllerGet a string representation for any error that stopped data collection- Specified by:
getErrorin interfaceIDataCollectionController- Returns:
- Error string
-
getClosedShutters
Description copied from interface:IDataCollectionControllerGet a list of all closed shutters and valve for the purpose of beam check.- Specified by:
getClosedShuttersin interfaceIDataCollectionController- Returns:
- list of Scannable bean names, or empty
-
openShutters
Description copied from interface:IDataCollectionControllerAttempt to open the specified shutters. Results in ShutterClosedEvent being raised with the outcome of opening the shutters.- Specified by:
openShuttersin interfaceIDataCollectionController- Parameters:
shutterIds- List of the shutter device bean ids
-