Project

General

Profile

Admin guide » History » Version 4

Herbert Greenlee, 01/05/2015 02:43 PM

1 1 Herbert Greenlee
h1. The experiment environment setup script
2 1 Herbert Greenlee
3 2 Herbert Greenlee
Every experiment has a script for initializing its standard software environment.  This script may do any or all of the following things.
4 2 Herbert Greenlee
5 2 Herbert Greenlee
* Initialize ups products system and products areas.
6 2 Herbert Greenlee
* Set up some basic ups products.
7 2 Herbert Greenlee
* Set environment variables.
8 2 Herbert Greenlee
9 2 Herbert Greenlee
This section the recommended way of writing this script.
10 2 Herbert Greenlee
11 2 Herbert Greenlee
h2.  Initializing ups
12 2 Herbert Greenlee
13 2 Herbert Greenlee
After initializing ups, the following should be the case:
14 2 Herbert Greenlee
15 2 Herbert Greenlee
* The executable @ups@ should be on the execution path.
16 2 Herbert Greenlee
* Command or alias @setup@ should be defined.
17 3 Herbert Greenlee
* The products path (environment variable @PRODUCTS@) should be defined as a colon-separated list of ups products areas.
18 2 Herbert Greenlee
19 4 Herbert Greenlee
With respect to the last point, the products path may include the following ups products areas (in order).
20 2 Herbert Greenlee
21 2 Herbert Greenlee
* Experiment-specific products (e.g. @/grid/fermiapp/products/uboone@).
22 2 Herbert Greenlee
* Larsoft products (for larsoft experiments, e.g. @/grid/fermiapp/products/larsoft@).
23 2 Herbert Greenlee
* Fermilab common products (e.g. @/grid/fermiapp/products/common/db@).
24 2 Herbert Greenlee
25 2 Herbert Greenlee
Generally, ups is initialized by sourcing a script called "@setups@" (or "@setups.sh@" or "@setups.csh@", etc.) from some standard place.  It is acceptable to source multiple "@setups@" scripts from multiple products areas, as well as extending the products path to include additional products areas manually.
26 2 Herbert Greenlee
27 2 Herbert Greenlee
28 2 Herbert Greenlee
 
29 2 Herbert Greenlee
30 2 Herbert Greenlee
31 2 Herbert Greenlee
32 2 Herbert Greenlee
33 1 Herbert Greenlee
h1. Experiment-specific hooks