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