From MidasWiki
Revision as of 01:41, 23 July 2020 by Stefan Ritt (talk | contribs) (username)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


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. 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.

Common exptab /etc/exptab

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:

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
 # /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

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 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

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

Experiments not defined in 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.