Edit-on-start Parameters: Difference between revisions
(Created page with "== Introduction == When a run is started, by default only the run number of the upcoming run will be displayed for editing. The following e...") |
No edit summary |
||
Line 27: | Line 27: | ||
== Creating ''edit-on-start'' parameters == | == Creating ''edit-on-start'' parameters == | ||
The first step to setting up the ''edit on | The first step to setting up the ''edit-on-start'' parameters is to create the subtree <span style="color: purple;">''Edit on start''</span> under <span style="color: purple;">''/Experiment''</span> as follows: | ||
$odbedit | $odbedit |
Revision as of 12:45, 21 August 2013
Introduction
When a run is started, by default only the run number of the upcoming run will be displayed for editing.
The following example shows a run started using odbedit.
- Note: Examples are shown using odbedit for ease of documentation; mhttpd could be used instead.
In the example below, the default run number of the next run is 30499. The user has changed this to 500.
[local:bnmr:S]/Experiment>start Run number [30499]: 500 Are the above parameters correct? ([y]/n/q):
edit-on-start parameters
It is often convenient to display and edit additional parameters prior to the run start. Not surprisingly, these parameters are known as edit-on-start parameters, since they automatically appear every time a run starts, and they are editable by the user.
Edit-on-start parameters are defined by creating ODB keys (or links to existing ODB keys) in a special subtree named Edit on start that the user creates in the /Experiment ODB tree.
Many users link to the Write data key which enables/disables writing of data. A quick test run can then be made without data logging, for example:
[local:bnmr:S]/Experiment>start Write data : n Run number [30499]: Are the above parameters correct? ([y]/n/q):
Creating edit-on-start parameters
The first step to setting up the edit-on-start parameters is to create the subtree Edit on start under /Experiment as follows:
$odbedit [local:Default:S]/>cd /experiment [local:Default:S]/Experiment>mkdir "Edit on start" [local:Default:S]/Experiment>cd "Edit on start" [local:Default:S]/Edit on start>
Then the user either creates the required parameters, or, if the parameters already exist elsewhere in the ODB, creates links to the parameters in the Edit on start subtree.
Many users find it convenient to create a subtree of /Experiment named Run Parameters to contain their run parameters. Links are then created in the Edit on start subtree.
The example below shows the creation of three parameters in the Edit on start subtree.:
- a parameter to contain the title of the run (called run_title )
- a link to the ODB parameter /Logger/Write data
- a link to the ODB parameter /Equipment/FIFO_acq/hardware/num scans(previously created by the user)
- a link to the ODB parameter /Equipment/Run Parameters/Sample (previously created by the user)
[local:Default:S]/Edit on start> [local:Default:S]/Edit on start>create string run_title String length [32]:128 [local:Default:S]/Edit on start>ln "/Equipment/FIFO_acq/hardware/num scans" "number of scans" [local:Default:S]/Edit on start>ln "/Experiment/Run Parameters/Sample" "sample" [local:Default:S]/Edit on start>ln "/Logger/Write data" "write data" [local:Default:S]Edit on start>ls -lt Key name Type #Val Size Last Opn Mode Value --------------------------------------------------------------------------- run_title STRING 1 128 3h 0 RWD 2e test number of scans INT 1 4 11h 0 RWD /Equipment/FIFO_acq/hardware/num scans -> 0 sample STRING 1 23 3h 0 RWD /Experiment/Run Parameters/Sample -> NA write data BOOL 1 4 7s 0 RWD /Logger/Write data -> y