Edit-on-start Parameters: Difference between revisions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
[[/Runinfo ODB tree #Run number|run number]] of the upcoming run will be displayed for editing. | [[/Runinfo ODB tree #Run number|run number]] of the upcoming run will be displayed for editing. | ||
{| style="text-align: left; width: 100%; background-color: azure;" border="0" cellpadding="2" cellspacing="2" | |||
|+ | |||
|- | |||
| Using [[mhttpd]]<br> | |||
[[File:Mhstart1.gif|thumb|left|Click to enlarge]] | |||
<br clear=all> | |||
| Using [[odbedit]]<br><br> | |||
<pre> | |||
[local:bnmr:S]/Experiment>start | |||
Run number [30499]: | |||
Are the above parameters correct? ([y]/n/q): | |||
</pre> | |||
<br><br> | |||
|} | |||
* Note: Examples are shown using <span style="color:darkcyan;">''odbedit''</span> for ease of documentation; many users will prefer to use the editing function of the <span style="color:darkcyan;">''mhttpd''</span> [[ODB Page]]. | |||
== ''edit-on-start'' parameters == | == ''edit-on-start'' parameters == | ||
Line 20: | Line 30: | ||
Many users link to the [[Keys in the ODB /Logger tree #/Logger/Write data |Write data key]] which enables/disables writing of data. A quick test run can then be made without data logging, for example: | Many users link to the [[Keys in the ODB /Logger tree #/Logger/Write data |Write data key]] which enables/disables writing of data. A quick test run can then be made without data logging, for example: | ||
[local: | [local:test:S]/Experiment>start | ||
Write data : n | Write data : n | ||
Run number [30499]: | Run number [30499]: | ||
Line 43: | Line 53: | ||
* a parameter to contain the title of the run (called <span style="color: purple;">''run_title''</span> ) | * a parameter to contain the title of the run (called <span style="color: purple;">''run_title''</span> ) | ||
* a link to the ODB parameter <span style="color: purple;">''/Logger/Write data''</span> | * a link to the ODB parameter <span style="color: purple;">''/Logger/Write data''</span> | ||
* a link to the ODB parameter <span style="color: purple;">''/Equipment/FIFO_acq/hardware/num | * a link to the ODB parameter <span style="color: purple;">''/Equipment/FIFO_acq/frontend/hardware/num cycles''</span>(previously created by the user) | ||
* a link to the ODB parameter <span style="color: purple;">''/Equipment/Run Parameters/ | * a link to the ODB parameter <span style="color: purple;">''/Equipment/Run Parameters/Run Description''</span> (previously created by the user) | ||
[local:Default:S]/Edit on start> | [local:Default:S]/Edit on start> | ||
[local:Default:S]/Edit on start>create string run_title | [local:Default:S]/Edit on start>create string run_title | ||
String length [32]:128 | String length [32]:128 | ||
[local:Default:S]/Edit on start>ln "/Equipment/FIFO_acq/hardware/num | [local:Default:S]/Edit on start>ln "/Equipment/FIFO_acq/frontend/hardware/num cycles" "Number of cycles" | ||
[local:Default:S]/Edit on start>ln "/Experiment/Run Parameters/ | [local:Default:S]/Edit on start>ln "/Experiment/Run Parameters/Run Description" "Description" | ||
[local:Default:S]/Edit on start>ln "/Logger/Write data" "write data" | [local:Default:S]/Edit on start>ln "/Logger/Write data" "write data" | ||
[local:Default:S]Edit on start>ls -lt | [local:Default:S]Edit on start>ls -lt | ||
Key name Type #Val Size Last Opn Mode Value | Key name Type #Val Size Last Opn Mode Value | ||
--------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ||
run_title STRING 1 128 13m 0 RWD | |||
Number of cycles -> /equipment/fifo_acq/frontend/hardware/num cycles | |||
DWORD 1 4 >99d 0 RWD 0 | |||
write data -> /logger/Write data | |||
BOOL 1 4 >99d 0 RWD y | |||
Description -> /Experiment/Run Parameters/Run Description | |||
== edit-on-start parameter comments == | == edit-on-start parameter comments == | ||
Line 71: | Line 83: | ||
;Note :If the edit-on-start parameter is a link which is named differently from the actual parameter, then the parameter name in the <span style="color: purple;">''Parameter Comments''</span> subtree must match the name of the actual parameter, rather than the link-name. | ;Note :If the edit-on-start parameter is a link which is named differently from the actual parameter, then the parameter name in the <span style="color: purple;">''Parameter Comments''</span> subtree must match the name of the actual parameter, rather than the link-name. | ||
This is illustrated below where the Edit-on-start parameter is a link named "number of | This is illustrated in the [[#Example|example]] below, where the Edit-on-start parameter is a link named "number of cycles", which links to the actual parameter named <span style="color: purple;">''/equipment/fifo_acq/frontend/hardware/num cycles''</span>. | ||
The parameter name in the <span style="color: purple;">''Parameter Comments''</span> subtree for this parameter must be " | The parameter name in the <span style="color: purple;">''Parameter Comments''</span> subtree for this parameter must be "num cycles" and NOT "number of cycles". | ||
=== Example === | === Example === | ||
The relevant parts of the /Experiment tree are shown below | |||
[local: | [local:test:S]/Experiment>ls -lr | ||
Key name Type | Key name Type #Val Size Last Opn Mode Value | ||
--------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ||
Experiment | Experiment DIR | ||
Name STRING 1 32 | Name STRING 1 32 5s 0 RWD test | ||
......... | |||
Write data | Run Parameters DIR | ||
Run Description STRING 1 256 2h 0 RWD Test run | |||
edit on start DIR | |||
run_title STRING 1 128 1m 0 RWD test without beam | |||
experiment number STRING 1 32 1m 0 RWD 12345 | |||
sample STRING 1 32 1m 0 RWD NA | |||
field STRING 1 32 52s 0 RWD 2500 | |||
Number of cycles -> /equipment/fifo_acq/frontend/hardware/num cycles | |||
DWORD 1 4 >99d 0 RWD 0 | |||
write data -> /logger/Write data | |||
BOOL 1 4 >99d 0 RWD y | |||
Description -> /Experiment/Run Parameters/Run Description | |||
STRING 1 256 2h 0 RWD Test run | |||
parameter comments DIR | |||
field STRING 1 64 35m 0 RWD <i>Entered in Tesla unit</i> | |||
active STRING 1 64 35m 0 RWD <i>Enter y to save data to disk</i> | |||
Num cycles STRING 1 80 34m 0 RWD <i>Stop run after num cycles is reached. Enter 0 to disable (free running)</i> | |||
....... | |||
Starting a run using results in a list of the edit-on-start parameters which the user can change, i.e. | |||
{| style="text-align: left; width: 100%; background-color: azure;" border="0" cellpadding="2" cellspacing="2" | |||
|+ | |||
|- | |||
| Using [[mhttpd]]<br> | |||
[[File:Mhstart2.gif|thumb|left|Click to enlarge]] | |||
<br clear=all> | |||
| Using [[odbedit]]<br> | |||
<pre> | |||
[local:test:S]/Experiment>start | |||
run_title : test without beam | |||
experiment number : 12345 | |||
sample : NA | |||
field : 2500 | |||
Number of cycles : 0 | |||
write data : y | |||
Description : Test run | |||
Run number [30499]: | |||
Are the above parameters correct? ([y]/n/q): | |||
Starting run #30499 | |||
</pre> | |||
|} |
Revision as of 17:34, 2 July 2015
Introduction
When a run is started, by default only the run number of the upcoming run will be displayed for editing.
Using mhttpd
|
Using odbedit[local:bnmr:S]/Experiment>start Run number [30499]: Are the above parameters correct? ([y]/n/q):
|
- Note: Examples are shown using odbedit for ease of documentation; many users will prefer to use the editing function of the mhttpd ODB Page.
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:test: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/frontend/hardware/num cycles(previously created by the user)
- a link to the ODB parameter /Equipment/Run Parameters/Run Description (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/frontend/hardware/num cycles" "Number of cycles" [local:Default:S]/Edit on start>ln "/Experiment/Run Parameters/Run Description" "Description" [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 13m 0 RWD Number of cycles -> /equipment/fifo_acq/frontend/hardware/num cycles DWORD 1 4 >99d 0 RWD 0 write data -> /logger/Write data BOOL 1 4 >99d 0 RWD y Description -> /Experiment/Run Parameters/Run Description
edit-on-start parameter comments
An optional subdirectory Parameter Comments can be created under the /Experiment ODB tree to display some extra text on the mhttpd Start page under an edit-on-start parameter where the parameter name may not contain enough information. In this case, a parameter comment can be created by the user.
This "parameter comment" option is visible ONLY when using the MIDAS web server mhttpd. The odbedit start command will not display this extra information.
The name of the parameter in the Parameter Comments subtree must match that of the corresponding edit-on-start parameter. Comments may contain html tags if desired.
- Note
- If the edit-on-start parameter is a link which is named differently from the actual parameter, then the parameter name in the Parameter Comments subtree must match the name of the actual parameter, rather than the link-name.
This is illustrated in the example below, where the Edit-on-start parameter is a link named "number of cycles", which links to the actual parameter named /equipment/fifo_acq/frontend/hardware/num cycles.
The parameter name in the Parameter Comments subtree for this parameter must be "num cycles" and NOT "number of cycles".
Example
The relevant parts of the /Experiment tree are shown below
[local:test:S]/Experiment>ls -lr Key name Type #Val Size Last Opn Mode Value --------------------------------------------------------------------------- Experiment DIR Name STRING 1 32 5s 0 RWD test ......... Run Parameters DIR Run Description STRING 1 256 2h 0 RWD Test run edit on start DIR run_title STRING 1 128 1m 0 RWD test without beam experiment number STRING 1 32 1m 0 RWD 12345 sample STRING 1 32 1m 0 RWD NA field STRING 1 32 52s 0 RWD 2500 Number of cycles -> /equipment/fifo_acq/frontend/hardware/num cycles DWORD 1 4 >99d 0 RWD 0 write data -> /logger/Write data BOOL 1 4 >99d 0 RWD y Description -> /Experiment/Run Parameters/Run Description STRING 1 256 2h 0 RWD Test run parameter comments DIR field STRING 1 64 35m 0 RWD Entered in Tesla unit active STRING 1 64 35m 0 RWD Enter y to save data to disk Num cycles STRING 1 80 34m 0 RWD Stop run after num cycles is reached. Enter 0 to disable (free running) .......
Starting a run using results in a list of the edit-on-start parameters which the user can change, i.e.
Using mhttpd
|
Using odbedit[local:test:S]/Experiment>start run_title : test without beam experiment number : 12345 sample : NA field : 2500 Number of cycles : 0 write data : y Description : Test run Run number [30499]: Are the above parameters correct? ([y]/n/q): Starting run #30499 |