BNMR: Run numbering

From DaqWiki
Revision as of 12:07, 28 April 2022 by Bsmith (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

bnmr and bnqr experiments use the MUSR run number scheme, whereby runs are designated as "Real" or "Test" according to their run number. Data is always logged (saved to disk). Real runs are assigned a run number in a certain range depending on the beamline. All "Test" runs have a run number selected from the test run number range (independent of beamline). #Automatic selection of the run number (the default) must be enabled for the bnmr and bnqr experiments.

Run number ranges

The following run number ranges have been assigned:

  • BNMR: 40000 - 44499 inclusive
  • BNQR: 45000 - 49999 inclusive
  • Test: 30000 - 30499 inclusive

The minimum run numbers for a given experiment is defined in the ODB at /RealOrTest/Base real and /RealOrTest/Base test.

User selects test or real run

Prior to starting a run, the user can switch the run type on the status page or settings page to choosing either Test data or Real data from a select element. The select box is connected to the mode changer via JRPC, which handles changing the run number appropriately.

User prevented from editing run number

By default, the MIDAS system allows the user to edit the run number at the begin-of-run. MIDAS provides a way of preventing editing of the run number. This is implemented in the ODB of both the bnmr and bnqr experiments, e.g.

[local:bnqr:Stopped]/>ls "/experiment/Edit on start/Edit run number" 
Edit run number                 n

Choosing the next run number

The mode changer determines the next valid run number by examining the files in the saved file directory. It finds the file with the highest run number, limiting itself to only real/test run numbers as appropriate. It then sets the run number to one more than that.

This system is simple and robust, avoids gaps in the run numbering, and allows for an easily implementation of changing between real/test runs while a run is already in progress. All these features are highly desired by users.

The mode changer runs these checks at the start of each run and whenever the user changes between real/test modes.