Exptab: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
m (username)
No edit summary
 
Line 16: Line 16:
or can be specified as a command line argument see [[Common Parameters to MIDAS Utilities]]).
or can be specified as a command line argument see [[Common Parameters to MIDAS Utilities]]).


A list of all possible running experiments (unique to each MIDAS installation) on a given machine is kept in the file exptab, created by the user. This file exptab is expected by default to be located under /etc/exptab. This default location can be overwritten by the Environment Variable MIDAS_EXPTAB.  
A list of all possible running experiments (unique to each MIDAS installation) on a given machine is kept in the file exptab, created by the user. The location of the exptab file is specified by the Environment Variable MIDAS_EXPTAB. If that variable is not set, MIDAS expects the file to be at /etc/exptab.


=== Common exptab  /etc/exptab ===
=== exptab file format ===
Where there is one common installation of MIDAS, accessed by several users, each defining one or more experiments, it makes sense to keep the common exptab under /etc/exptab.  In this case, the exptab file defines each experiment on the machine, with one line per experiment. Each line contains three parameters, i.e:  
 
Each line in the exptab file should contain three parameters, separated by spaces:
; experiment name  
; experiment name  
: name of the DAQ system, i.e. MIDAS experiment name  (see also [[Environment Variables#MIDAS_EXPT_NAME|MIDAS_EXPT_NAME]])   
: name of the DAQ system, i.e. MIDAS experiment name  (see also [[Environment Variables#MIDAS_EXPT_NAME|MIDAS_EXPT_NAME]])   
Line 27: Line 28:
: $USERNAME This parameter is optional. If omitted, the currently logged in user is used
: $USERNAME This parameter is optional. If omitted, the currently logged in user is used


  # /etc/exptab
Lines beginning with a # are ignored. Example exptab files are presented below.
  # Midas experiment list for single MIDAS installation
  #Exptname  Expt Directory            Username
  test        /home/johnfoo/online      johnfoo
  e232        /home/johnfoo/e232        johnfoo
  decay      /home/jackfoo/decay_daq    jackfoo
  zexp        /home/janefoo/zexp/online  janefoo


=== Local exptab and MIDAS_EXPTAB ===
=== Local exptab and MIDAS_EXPTAB ===
However, it is more common for users each to download their own installation of MIDAS, so that they can update their MIDAS version independently. In this case, they will
Generally each user on a machine defines their own exptab file containing only their experiment(s). Specify the location of this file using the Environment Variable MIDAS_EXPTAB.
require their own exptab file containing only their experiment(s), and so will define the Environment Variable MIDAS_EXPTAB.


e.g. setenv MIDAS_EXPTAB /home/fredfoo/online/exptab
e.g. export MIDAS_EXPTAB=/home/fredfoo/online/exptab


and the exptab file e.g.
and the exptab file e.g.
Line 50: Line 44:
   e512        /home/fredfoo/expt_512  fredfoo
   e512        /home/fredfoo/expt_512  fredfoo


=== Experiments not defined in exptab ===
=== Common exptab /etc/exptab ===
Experiments not defined in exptab are not accessible remotely, but can still be accessed locally using the environment variable MIDAS_DIR if defined. This environment variable supersedes the exptab definition.
Where there is one common installation of MIDAS that is accessed by several users (each defining one or more experiments), it might make sense to keep a common exptab under /etc/exptab.
 
  # /etc/exptab
  # Midas experiment list for single MIDAS installation
  #Exptname  Expt Directory            Username
  test        /home/johnfoo/online      johnfoo
  e232        /home/johnfoo/e232        johnfoo
  decay      /home/jackfoo/decay_daq    jackfoo
  zexp        /home/janefoo/zexp/online  janefoo
 
== Experiments not defined in exptab ==
Experiments not defined in exptab are not accessible remotely, but can still be accessed locally by specifying the [[MIDAS_environment_variables#MIDAS_DIR|MIDAS_DIR environment variable]]. This environment variable supersedes the exptab definition.


[[Category:Experiment]]
[[Category:Experiment]]

Latest revision as of 10:57, 23 August 2023


Purpose

This page described the MIDAS exptab file. The exptab file is only required when multiple MIDAS experiments are defined for a particular MIDAS installation. It contains a table of each experiment name, directory and username.

Creating the exptab file

The MIDAS system supports multiple experiments running at the same time on a single computer.

Even though it may not be efficient, this capability makes sense when the experiments are simple detector lab setups which share hardware resources for data collection. In order to support this feature, MIDAS requires a uniquely identified set of parameters for each experiment that is used to define the location of the Online Database (ODB).

Every experiment under MIDAS has its own ODB. In order to differentiate them, an experiment name and directory are assigned to each experiment. This allows several experiments to run concurrently on the same host, using a common MIDAS installation.

Where more than one experiment is defined, the default name of the experiment to connect to can be provided using the MIDAS_EXPT_NAME environment variable. or can be specified as a command line argument see Common Parameters to MIDAS Utilities).

A list of all possible running experiments (unique to each MIDAS installation) on a given machine is kept in the file exptab, created by the user. The location of the exptab file is specified by the Environment Variable MIDAS_EXPTAB. If that variable is not set, MIDAS expects the file to be at /etc/exptab.

exptab file format

Each line in the exptab file should contain three parameters, separated by spaces:

experiment name
name of the DAQ system, i.e. MIDAS experiment name (see also MIDAS_EXPT_NAME)
experiment directory name
location of the MIDAS shared memory buffers (by convention, $HOME/online)
user name
$USERNAME This parameter is optional. If omitted, the currently logged in user is used

Lines beginning with a # are ignored. Example exptab files are presented below.

Local exptab and MIDAS_EXPTAB

Generally each user on a machine defines their own exptab file containing only their experiment(s). Specify the location of this file using the Environment Variable MIDAS_EXPTAB.

e.g. export MIDAS_EXPTAB=/home/fredfoo/online/exptab

and the exptab file e.g.

 # /home/fredfoo/online/exptab
 # Midas experiment list for user fredfoo
 #Exptname   Expt Directory           Username
 test        /home/fredfoo/online     fredfoo
 decay       /home/fredfoo/decay_daq  fredfoo
 e512        /home/fredfoo/expt_512   fredfoo

Common exptab /etc/exptab

Where there is one common installation of MIDAS that is accessed by several users (each defining one or more experiments), it might make sense to keep a common exptab under /etc/exptab.

 # /etc/exptab
 # Midas experiment list for single MIDAS installation
 #Exptname   Expt Directory             Username
 test        /home/johnfoo/online       johnfoo
 e232        /home/johnfoo/e232         johnfoo
 decay       /home/jackfoo/decay_daq    jackfoo
 zexp        /home/janefoo/zexp/online  janefoo

Experiments not defined in exptab

Experiments not defined in exptab are not accessible remotely, but can still be accessed locally by specifying the MIDAS_DIR environment variable. This environment variable supersedes the exptab definition.