Ticket #11518 (new)

Opened 5 years ago

Last modified 5 years ago

Alternative mechanism for sending end of runs messages to autoreduce

Reported by: Anders Markvardsen Owned by: Lottie Greenwood
Priority: critical Milestone: Backlog
Component: Tools Keywords: AUTOREDUCTION
Cc: marcus.noble@… Blocked By:
Blocking: Tester:


Code for this is used by a number of groups in the lab including Alex (and the powder diffraction scripts uses this).

In addition see below reply to Nick from Freddie about Knowing when runs ends:

as an alternative to using the “end of run” bat file (which we are happy for you to add something to), there is currently a file updated on the archive each time a run is ended. It is called “lastrun.txt” and is located in the “logs” area e.g.

The file contains:

file_prefix run_number sav_file_count

If sav_file_count is 0 the the run has ended and you will have “file prefix””run_number”.nxs etc present on the archive

If sav_file_count is > 0 then this indicates that the run hasn’t ended yet, but an update/store has been used to create .n001 and .s001 etc files, the number given being the highest index of file currently used. So you could auto-reduce sav files too prior to run end if you wished.

I have a linux file watcher program using this mechanism that Pascal runs on some of his linux machines to automatically copy files across to them at run end, it just monitors the file modification date of lastrun.txt via a cifs mount of the archive and then reads its contents when the file date changes; it knows the last run it has, and then knowing the last run in the archive it can copy across any missing runs.


ICATQueried.txt (1.7 KB) - added by Lottie Greenwood 5 years ago.

Change History

comment:1 Changed 5 years ago by Lottie Greenwood

Information that will be required from any ICAT replacement:

  • Run number
  • Instrument name
  • RB Number
  • Cycle Number
  • Location of data file
  • When a run ends

Replacing ICAT for the backend is feasible, by using a cron job to watch a certain text file that updates when a run is completed. We can then gain the RunNumber/RB Number by reading the raw file. The cycle number will be assumed to be the current cycle.

Changed 5 years ago by Lottie Greenwood

Note: See TracTickets for help on using tickets.