Ticket #8342 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Consider adding a method to the ILiveListener interface get the run number

Reported by: Russell Taylor Owned by: Russell Taylor
Priority: major Milestone: Release 3.2
Component: Framework Keywords: LiveData
Cc: Blocked By:
Blocking: Tester: Vickie Lynch

Description

#8326 added a 'quick fix' to get the run number out of the 'fresh' live workspace rather than the final processed one (from which it could be missing). Probably, a better way to do this is to add it to the ILiveListener interface - I just didn't want to go there this close to a release.

Change History

comment:1 Changed 7 years ago by Russell Taylor

  • Milestone changed from Release 3.1 to Backlog

comment:2 Changed 7 years ago by Russell Taylor

  • Milestone changed from Backlog to Release 3.2

comment:3 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:4 Changed 6 years ago by Russell Taylor

  • Status changed from assigned to inprogress

Re #8342. Add a run number getter to the live listener interface.

This allows a concrete live listener to return the current run number. Previously, there was a hack in place that tried to fetch it out of the extracted workspace, but this only worked for MatrixWorkspace (it used the getRunNumber method). This way will work for any kind of returned workspace.

Currently, listeners that do not have the capability of obtaining a run number will always return zero. This also happens to the value returned by the SNS listener when an instrument is not in a run (though there's also the runStatus method that will indicate this).

Concrete listeners remain responsible for adding the run number to the workspace logs, if appropriate.

Changeset: 4be60fd28a50b50bdac02cf8cba28f295fb668f5

comment:5 Changed 6 years ago by Russell Taylor

Re #8342. Add a run number getter to the live listener interface.

This allows a concrete live listener to return the current run number. Previously, there was a hack in place that tried to fetch it out of the extracted workspace, but this only worked for MatrixWorkspace (it used the getRunNumber method). This way will work for any kind of returned workspace.

Currently, listeners that do not have the capability of obtaining a run number will always return zero. This also happens to the value returned by the SNS listener when an instrument is not in a run (though there's also the runStatus method that will indicate this).

Concrete listeners remain responsible for adding the run number to the workspace logs, if appropriate.

Changeset: 5615232b306494ed5016aa0de3b2a2ccbe3694a7

comment:6 Changed 6 years ago by Russell Taylor

Re #8342. Forgot to fill in a method.

Changeset: a85072af537f781e77df52d450a3ab2726bf6415

comment:7 Changed 6 years ago by Russell Taylor

  • Status changed from inprogress to verify
  • Resolution set to fixed

(Apparent duplicate commit above is due to a rebase of my branch.)

To test:

Start up a live data session, choosing the 'Rename at end of run'. Ideally, use a real data stream at the SNS or ISIS (note that I've no real idea if getting the run number on the ISIS side works, though I shouldn't have affected that). Failing that, use the FakeEventDataListener or FileEventDataListener test listeners (must compile in debug to see them), filling in the required config variables that are specified in the source code for each listener.

At the end of a run, the renamed workspace should contain the run number. It also comes through in a debug-level log.

comment:8 Changed 6 years ago by Vickie Lynch

  • Status changed from verify to verifying
  • Tester set to Vickie Lynch

comment:9 Changed 6 years ago by Vickie Lynch

  • Status changed from verifying to closed

Merge remote branch 'origin/feature/8342_run_number_in_livelistener_interface'

Full changeset: 29828711ddd04bc98f1dfb06e492cf2f28e74253

comment:10 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9186

Note: See TracTickets for help on using tickets.