/Experiment ODB tree: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
No edit summary
(The midas documentation has moved to https://midas.triumf.ca/docs/)
Tag: Replaced
 
(24 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div style="column-count:4;-moz-column-count:4;-webkit-column-count:4">
The midas documentation has moved. See [https://midas.triumf.ca/docs/develop/reference/reference/odb_keys/#experiment /Experiment] on the ODB keys page for the new documentation about the /Experiment ODB keys.
* [[Midas_documentation|Midas Documentation]]
* [[Feature_listing|Feature Listing]]
* [[Application_listing|Application Listing]]
* [[Online_Database|Online Database]]
</div>
 
 
 
== Creating the <span style="color: purple;">''/Experiment''</span>  tree ==
The <span style="color: purple;">''/Experiment''</span> ODB tree is created automatically when the '''[[odbedit #Creating the ODB|ODB is first created]]'''.
 
== Purpose ==
The <span style="color: purple;">''/Experiment''</span> ODB tree contains information relevent to the experiment. Other optional keys are added by '''[[mhttpd]]''' or by
the user to customize their experiment.
 
 
== Examples ==
When initially created, the <span style="color: purple;">''/Experiment''</span> tree contains the following keys:
[local:midas:S]/>ls -lrt /experiment
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Experiment                      DIR
    Name                        STRING  1    32    14s  0  RWD  midas
    Buffer sizes                DIR
        SYSMSG                  DWORD  1    4    11h  0  RWD  100000
 
 
The following example shows the <span style="color: purple;">''/Experiment''</span> tree for a typical experiment :
 
[local:deap:R]/>ls -lrt /experiment
Key name                        Type    #Val  Size  Last Opn Mode Value
---------------------------------------------------------------------------
Experiment                      DIR
    Name                        STRING  1    32    7s  0  RWD  midas
    Buffer sizes                DIR
        SYSMSG                  DWORD  1    4    23h  0  RWD  100000
        SYSTEM                  DWORD  1    4    23h  0  RWD  640000000
        BUF0                    DWORD  1    4    23h  0  RWD  80000000
        BUF1                    DWORD  1    4    23h  0  RWD  80000000
        .......    <span style="color: green;">''other user-defined buffers not shown ''</span>
    MAX_EVENT_SIZE              DWORD  1    4    23h  0  RWD  4194304
    Menu Buttons                STRING  1    256  5h  0  RWD  Status, ODB, Messages, Elog, Alarms, Programs, History, MSCB, Sequencer, Config, Help
    Transition debug flag      INT    1    4    23h  0  RWD  0
    Transition connect timeout  INT    1    4    23h  0  RWD  10000
    Transition timeout          INT    1    4    23h  0  RWD  120000
    <span style="color: purple;">edit on start</span>              DIR
        experiment number              DWORD  1    4    2h  0  RWD  9499
        experimenter                    STRING  1    32    2h  0  RWD  gdm
        sample                          STRING  1    36    2h  0  RWD  NA
        temperature                    STRING  1    32    2h  0  RWD  300.000(0.000)K
        field                          STRING  1    32    2h  0  RWD  19000.2(0.0)G
        comment-> /Experiment/run parameters/comment
                                        STRING  1    80    2h  0  RWD  Testing with low beam
        Write Data -> /Logger/Write data
                                        BOOL    1    4    2h  0  RWD  n
        Number of cycles -> /Equipment/FIFO_acq/frontend/hardware/num cycles
                                        DWORD  1    4    2h  0  RWD  0
    <span style="color: purple;">Parameter Comments</span>          DIR                 
        field                          STRING  1    32    >99d 0  RWD  <i>Entered in Tesla unit</i>
        Num cycles                      STRING  1    80    >99d 0  RWD  <i>Stop run after num cycles is reached. Enter 0 to disable (free running)</i>
    <span style="color: purple;">Run Parameters</span>              DIR
        Comment                        STRING  1    80    2h  0  RWD  Testing with low beam
        Run Description                STRING  1    256  7h  0  RWD  Sequencer Tests
        Number of channels              DWORD  1    4    2h  0  RWD  20
    <span style="color: purple;">Lock when running</span>          DIR
        Num channels -> /Run Parameters/number of channels
                                        DWORD  1    4    2h  0  RWD  20
    <span style="color: purple;">edit on sequence</span>            DIR
        title                          STRING  1    128  2h  0  RWD  none
        experiment number              DWORD  1    4    2h  0  RWD  9438
        experimenter                    STRING  1    32    2h  0  RWD  gls
        sample                          STRING  1    36    2h  0  RWD  NA
        run description -> /Experiment/run parameters/run description
                                        STRING  1    256  7h  0  RWD  Sequencer Tests
        Write Data -> /Logger/Write data
                                        BOOL    1    4    2h  0  RWD  n
        Number of cycles -> /Equipment/FIFO_acq/frontend/hardware/num cycles
                                        DWORD  1    4    2h  0  RWD  0
    Prevent start on alarms    BOOL    1    4    22h  0  RWD  n
    Prevent start on required  BOOL    1    4    22h  0  RWD  n
    <span style="color: purple;">Status items</span>                DIR
        Experiment Name -> /Experiment/Name
                                STRING  1    32    7s  0  RWD  midas
    Start-Stop Buttons          BOOL    1    4    5h  0  RWD  y
    Pause-Resume Buttons        BOOL    1    4    5h  0  RWD  n
 
 
 
 
== Keys in <span style="color: purple;">''/Experiment''</span> tree==
 
The keys in the ODB <span style="color: purple;">''/Experiment tree''</span>
are described in the following sections.
 
=== <span style="color: purple;">''Name ''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
This key in the [[#top|/Experiment tree]]
contains the name of the experiment. Filled automatically when the ODB is created.
 
<br>
--------
<br>
 
=== <span style="color: purple;">''Buffer Sizes ''</span> subtree ===
* '''Type:''' DIR
 
This key in the [[#top|/Experiment tree]] is a subtree to contain the sizes of the
Midas Buffers for the experiment. Created with default values. The sizes can be changed to optimize the memory usage. See '''[[Event Buffer]]''' Size(s) for details.  Other user-defined
buffers may be present (e.g. for '''[[event filtering]]''').
<br>
--------
<br>
 
==== <span style="color: purple;">''SYSMSG ''</span>  ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DWORD
* '''Default:'''  100000 Bytes
</div>
This key in the [[#Buffer Sizes|/Experiment/Buffer Sizes subtree]]
contains the size of SYSMSG buffer. This buffer is used for MIDAS messages.
<br>
--------
<br>
 
==== <span style="color: purple;">''SYSTEM ''</span>  ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DWORD
* '''Default:'''  8MBytes
</div>
This key in the [[#Buffer Sizes|/Experiment/Buffer Sizes subtree]]
contains the size of SYSTEM buffer. See '''[[Event Buffer]]''' for details.
<br>
--------
<br>
 
 
=== <span style="color: purple;">''MAX_EVENT_SIZE ''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DWORD
* '''Default:'''  4MBytes
</div>
This key in the [[#top|/Experiment tree]]
specifies the maximum event size that can be acquired. The default value is half the
'''[[#SYSTEM |size of the SYSTEM buffer]]'''. It can be increased if required
(see '''[[Event Buffer]]''').
 
<br>
--------
<br>
 
=== <span style="color: purple;">''Menu Buttons''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:'''  "Start, Pause, ODB, Messages, ELog, Alarms, Programs, History, Sequencer, Config, Help"
</div>
This key in the [[#top|/Experiment tree]]
is added automatically by '''[[mhttpd]]''' to allow the Menu buttons that appear on the '''[[mhttpd|Main Status Page]]''' to be customized by
removing unnecessary buttons or by changing their order.
Without the "Pause" being present in the list of
menu buttons, the run cannot be paused/resumed, but only started/stopped. This is
required by some experiments.
 
If '''[[MSCB]]''' support is built into MIDAS, the MSCB Menu button will also be shown.
 
<br>
--------
<br>
 
=== <span style="color: purple;">''Transition debug flag ''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  0
</div>
This key in the [[#top|/Experiment tree]] contains a flag that, if set to 1, causes messages reporting transition progress to be output.
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Transition connect timeout''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  10000
</div>
This key in the [[#top|/Experiment tree]] contains the
value of timeout for remote rpc connect
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Transition timeout''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' INT
* '''Default:'''  120000
</div>
This key in the [[#top|/Experiment tree]] constains the
value of timeout for transition
<br>
--------
<br>
 
=== <span style="color: purple;">''Prevent start on alarms''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div> 
This key in the [[#top|/Experiment tree]] if set true
will prevent the run from starting if an [[Alarm System|alarm]] is true, i.e.
the run start procedure will fail if an alarm has been [[/Alarms ODB tree#Triggered|Triggered]] for a client, provided a valid [[/Alarms ODB tree#alarms class|alarms class]] has
been entered in the client's [[/Programs ODB tree#Alarm class|Alarm class]] key.
 
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Prevent start on required program''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
This key in the [[#top|/Experiment tree]] if set true ("y")
will prevent the run from starting if one of the '''required''' clients is not running. A client is flagged as "required" by setting the ODB key
[[/Programs ODB tree#Required|Required]] to "y".
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Start-Stop Buttons''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "y"
</div>
By default Start/Stop buttons are shown on the [[mhttpd]] main status page. These buttons can be suppressed by setting
this key in the [[#top|/Experiment tree]] FALSE. 
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Pause-Resume Buttons''</span>  ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' BOOL
* '''Default:'''  "n"
</div>
By default Pause/Resume buttons are shown on the [[mhttpd]] main status page. These buttons can be suppressed by setting
this key in the [[#top|/Experiment tree]] FALSE.
<br>
--------
<br>
 
=== <span style="color: purple;">''Edit on Start ''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
This  optional subdirectory  in the [[#top|/Experiment tree]] may
contain user-defined parameters which will be displayed for editing at the beginning of each run. See '''[[Edit-on-start Parameters]]''' for details.
 
<br>
--------
<br>
 
=== <span style="color: purple;">''Parameter Comments ''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This  optional subdirectory  in the [[#top|/Experiment tree]] may contain user-defined parameter comments that give more information about
the '''[[Edit-on-start Parameters]]'''.
 
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Status items''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This key in the [[#top|/Experiment tree]] is a subtree  which by default contains a link to the [[#Name|experiment name]]. Any links or keys
created by the user in this optional subdirectory will be displayed on the [[mhttpd]] main status page.
<br>
--------
<br>
 
 
=== <span style="color: purple;">''Lock when running ''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This  optional subdirectory  in the [[#top|/Experiment tree]] contains user-defined links to ODB parameters to prevent them being changed when the run is in progress. See '''[[Lock when running]]''' for details.
 
<br>
--------
<br>
 
=== <span style="color: purple;">''Security''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This optional subtree  in the [[#top|/Experiment tree]] is created when the '''[[odbedit]]''' commands  <span style="color:saddlebrown; font-style:bold; ">passwd</span> or  <span style="color:saddlebrown; font-style:bold; ">webpasswd</span> are issued. It enables a user to set up security features. See '''[[Security]]'''
<br>
--------
<br>
 
 
 
==== <span style="color: purple;">''Password ''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
This key in the [[#Security|/Experiment/Security subtree]]
contains the encrypted password. This Key is created when the {{Odbedit cmd|cmd=passwd}} is issued. See '''[[security]]''' for details.
 
;Note
Do not set this key except through the {{Odbedit cmd|cmd=passwd}}. Setting an unencrypted password will lock you out of the ODB unless {{Utility|name=odbedit}} is listed as an [[#Allowed programs|allowed program]].
 
<br>
--------
<br>
 
==== <span style="color: purple;">''Allowed hosts''</span> subtree ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This subtree in the  [[#Security|/Experiment/Security subtree]] is created when the {{Odbedit cmd|cmd=passwd}} is issued. When created, this subtree is empty.
Optionally, it may contain  user-defined names of remote hosts allowed to have free access (i.e. without password) to the current experiment. See '''[[Security #Allowed Hosts|allowed hosts]]'''.
 
<br>
--------
<br>
 
==== <span style="color: purple;">''Allowed programs ''</span> subtree ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
 
This subtree  in the  [[#Security|/Experiment/Security subtree]] is created when the {{Odbedit cmd|cmd=passwd}} is issued. When created, this subtree is empty.
Optionally, it may  contain user-defined names of clients allowed to have free access (i.e. without password) to the current experiment. See '''[[Security #Allowed clients|allowed clients]]'''.
 
<br>
--------
<br>
 
==== <span style="color: purple;">''Web Password''</span> ====
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' STRING
* '''Default:''' 
</div>
 
If '''[[Security #How to Setup Web Access Restrictions |web access restriction]]''' has been set up, this key in the  [[#Security|/Experiment/Security subtree]]
will contain an encrypted password for Web server access. This key is created by using the {{Odbedit cmd|cmd=webpasswd}}.
 
If this key is present, the user will be requested to provide the "Web Password" when accessing the requested experiment in "Write Access" mode. The "Read Only Access" mode is still available (without a password) to all users.
 
 
=== <span style="color: purple;">''Edit on Sequence ''</span> subtree ===
<div style="column-count:3;-moz-column-count:3;-webkit-column-count:3">
* '''Type:''' DIR
</div>
This  optional subdirectory  in the [[#top|/Experiment tree]] may
contain user-defined parameters which will be displayed for editing at the start of each [[Sequencer|Sequence]]). See
[[Edit-on-Sequence Parameters]] for details.
 
<br>
--------
<br>
 
[[Category:ODB Tree]]

Latest revision as of 22:00, 30 October 2026

The midas documentation has moved. See /Experiment on the ODB keys page for the new documentation about the /Experiment ODB keys.