Exptab: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
m (Suz moved page Exptab (Experiment Table) to Exptab: cosmetic)
m (username)
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Pagelinks}}
== Purpose ==
== Purpose ==
The exptab file is only required when multiple MIDAS experiments are defined for a particular MIDAS installation.
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.
It contains a table of each experiment name, directory and username.


== Creating the exptab file for multiple MIDAS experiments ==
== Creating the exptab file ==


The MIDAS system supports multiple experiments running at the same time on a single computer.  
The MIDAS system supports multiple experiments running at the same time on a single computer.  
Line 11: Line 13:
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.
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.
Where more than one experiment is defined, the default name of the experiment to connect to can be provided using the [[Environment Variables#MIDAS_EXPT_NAME|MIDAS_EXPT_NAME]] environment variable.
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]]).


Line 17: Line 19:


=== Common exptab  /etc/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, experiment directory name and user name, e.g.
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 [[Environment Variables#MIDAS_EXPT_NAME|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
   # /etc/exptab
   # Midas experiment list for single MIDAS installation
   # Midas experiment list for single MIDAS installation
   test   /home/johnfoo/online     johnfoo
  #Exptname  Expt Directory            Username
   e232   /home/johnfoo/online    johnfoo
   test       /home/johnfoo/online       johnfoo
   decay /home/jackfoo/decay_daq jackfoo
   e232       /home/johnfoo/e232        johnfoo
   zexp   /home/janefoo/zexp/online  janefoo
   decay       /home/jackfoo/decay_daq   jackfoo
   zexp       /home/janefoo/zexp/online  janefoo


=== Local exptab and MIDAS_EXPTAB ===
=== Local exptab and MIDAS_EXPTAB ===
Line 30: Line 39:
require their own exptab file containing only their experiment(s), and so will define 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/frefoo/online/exptab
e.g. setenv MIDAS_EXPTAB /home/fredfoo/online/exptab


and the exptab file e.g.
and the exptab file e.g.
Line 36: Line 45:
   # /home/fredfoo/online/exptab
   # /home/fredfoo/online/exptab
   # Midas experiment list for user fredfoo
   # Midas experiment list for user fredfoo
   test   /home/fredfoo/online    fredfoo
  #Exptname  Expt Directory          Username
   decay /home/fredfoo/decay_daq  fredfoo
   test       /home/fredfoo/online    fredfoo
   e512 /home/fredfoo/expt_512   fredfoo
   decay       /home/fredfoo/decay_daq  fredfoo
   e512       /home/fredfoo/expt_512   fredfoo


=== Experiments not defined in exptab ===
=== 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.
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.
[[Category:Experiment]]

Revision as of 01:41, 23 July 2020


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