Search in sources :

Example 1 with PrepareScan

use of org.eclipse.scanning.api.annotation.scan.PrepareScan in project gda-core by openGDA.

the class FrameCollectingScannable method configureAndCollect.

/**
 * This is invoked shortly before the main scan is configured
 */
@PrepareScan
public void configureAndCollect(ScanModel scanModel) throws ScanningException {
    configureCollection(scanModel);
    try {
        configureBeamline();
        frameFilePath = collectFrame();
        nexusNodePath = generateNodePath();
        restoreBeamline();
    } catch (EventException e) {
        throw new ScanningException("Problem taking snapshot", e);
    }
}
Also used : EventException(org.eclipse.scanning.api.event.EventException) ScanningException(org.eclipse.scanning.api.scan.ScanningException) PrepareScan(org.eclipse.scanning.api.annotation.scan.PrepareScan)

Aggregations

PrepareScan (org.eclipse.scanning.api.annotation.scan.PrepareScan)1 EventException (org.eclipse.scanning.api.event.EventException)1 ScanningException (org.eclipse.scanning.api.scan.ScanningException)1