Exptab: Difference between revisions

From MidasWiki
Jump to navigation Jump to search
m (Suz moved page Exptab (Experiment Table) to Exptab: cosmetic)
No edit summary
 
(6 intermediate revisions by 2 users 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]]).


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: experiment name, experiment directory name and user name, e.g.


  # /etc/exptab
Each line in the exptab file should contain three parameters, separated by spaces:
  # Midas experiment list for single MIDAS installation
; experiment name
  test  /home/johnfoo/online     johnfoo
: name of the DAQ system, i.e. MIDAS experiment name  (see also [[Environment Variables#MIDAS_EXPT_NAME|MIDAS_EXPT_NAME]]) 
  e232  /home/johnfoo/online    johnfoo
; experiment directory name
  decay  /home/jackfoo/decay_daq  jackfoo
: location of the MIDAS shared memory buffers (by convention, $HOME/online)
  zexp  /home/janefoo/zexp/online  janefoo
; 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 ===
=== 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/frefoo/online/exptab
e.g. export MIDAS_EXPTAB=/home/fredfoo/online/exptab


and the exptab file e.g.
and the exptab file e.g.
Line 36: Line 39:
   # /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
 
=== 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_environment_variables#MIDAS_DIR|MIDAS_DIR environment variable]]. This environment variable supersedes the exptab definition.


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

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.