|
8 | 8 | # The purpose of this script is to separate the topology generation (which is in O2DPG) from the setting of the EPN-related settings |
9 | 9 |
|
10 | 10 | # Settings for some EPN paths / names / etc. |
11 | | -[ -z "$FILEWORKDIR" ] && export FILEWORKDIR=/home/epn/odc/files # Path to common grp / geometry / etc files |
12 | | -[ -z "$INRAWCHANNAME" ] && export INRAWCHANNAME=tf-builder-pipe-0 # Pipe name to get data from TfBuilder |
13 | | -[ -z "$CTF_DIR" ] && export CTF_DIR=/data/tf/compressed # Output directory for CTFs |
14 | | -[ -z "$CTF_METAFILES_DIR" ] && [ "0$WORKFLOWMODE" != "0print" ] && export CTF_METAFILES_DIR=/data/epn2eos_tool/epn2eos #CTF Metafiles directory |
15 | | -[ -z "$GEN_TOPO_WORKDIR" ] && export GEN_TOPO_WORKDIR=$HOME/gen_topo/ # Working directory for checkout of O2DPG repository and for XML cache. If this directory is wiped, gen_topo will recreate all necessary content the next time it runs. The folder should be persistent to cache workflows. |
16 | | -[ -z "$GEN_TOPO_STDERR_LOGGING" ] && export GEN_TOPO_STDERR_LOGGING=1 # Enable logging of stderr messages |
17 | | -[ -z "$IS_SIMULATED_DATA" ] && export IS_SIMULATED_DATA=0 # by default we are processing raw data |
18 | | -[ -z "$GEN_TOPO_ODC_EPN_TOPO_ARGS" ] && export GEN_TOPO_ODC_EPN_TOPO_ARGS="--recown 'wn_(?"'!'"online-calib).*_.*' --calibwn 'wn_online-calib_.*'" # Arguments to pass to odc-epn-topo command |
19 | | -[ -z "$GEN_TOPO_EPN_CCDB_SERVER" ] && export GEN_TOPO_EPN_CCDB_SERVER="http://o2-ccdb.internal" # CCDB server to use |
| 11 | +[[ -z "$FILEWORKDIR" ]] && export FILEWORKDIR=/home/epn/odc/files # Path to common grp / geometry / etc files |
| 12 | +[[ -z "$INRAWCHANNAME" ]] && export INRAWCHANNAME=tf-builder-pipe-0 # Pipe name to get data from TfBuilder |
| 13 | +[[ -z "$CTF_DIR" ]] && export CTF_DIR=/data/tf/compressed # Output directory for CTFs |
| 14 | +[[ -z "$CTF_METAFILES_DIR" ]] && [[ "0$WORKFLOWMODE" != "0print" ]] && export CTF_METAFILES_DIR=/data/epn2eos_tool/epn2eos #CTF Metafiles directory |
| 15 | +[[ -z "$GEN_TOPO_WORKDIR" ]] && export GEN_TOPO_WORKDIR=$HOME/gen_topo/ # Working directory for checkout of O2DPG repository and for XML cache. If this directory is wiped, gen_topo will recreate all necessary content the next time it runs. The folder should be persistent to cache workflows. |
| 16 | +[[ -z "$GEN_TOPO_STDERR_LOGGING" ]] && export GEN_TOPO_STDERR_LOGGING=1 # Enable logging of stderr messages |
| 17 | +[[ -z "$IS_SIMULATED_DATA" ]] && export IS_SIMULATED_DATA=0 # by default we are processing raw data |
| 18 | +[[ -z "$GEN_TOPO_ODC_EPN_TOPO_ARGS" ]] && export GEN_TOPO_ODC_EPN_TOPO_ARGS="--recown 'wn_(?"'!'"online-calib).*_.*' --calibwn 'wn_online-calib_.*'" # Arguments to pass to odc-epn-topo command |
| 19 | +[[ -z "$GEN_TOPO_EPN_CCDB_SERVER" ]] && export GEN_TOPO_EPN_CCDB_SERVER="http://o2-ccdb.internal" # CCDB server to use |
20 | 20 |
|
21 | 21 | # GEN_TOPO_RUN_HOME is a debug setting used in some tests. This is not needed for online running. |
22 | 22 | if [[ "0$GEN_TOPO_RUN_HOME" == "01" ]]; then |
23 | 23 | [[ $WORKFLOWMODE != "print" ]] && { echo "ERROR: GEN_TOPO_RUN_HOME is only supported with WORKFLOWMODE=print!" 1>&2; exit 1; } |
24 | 24 | else |
25 | | - # Load required module and run gen_topo_o2dpg (PDP part of this script) |
26 | | - # This makes sure to load ODC only when it is not already in the environment. |
27 | | - # The background is that in the online system ODC is already loaded, but for tests it might not be loaded thus we just load the latest available versions for convenience. |
28 | | - if [[ `module info-loaded ODC 2> /dev/null | grep ODC | wc -l` == 0 ]]; then |
29 | | - module load ODC 1>&2 || { echo Error loading ODC / O2DPG 1>&2; exit 1; } |
| 25 | + if [ "0$GEN_TOPO_ONTHEFLY" == "01" ]; then |
| 26 | + # In case we run the on the fly generation on the EPN, we define which odc-epn-topo binary to use. |
| 27 | + # Then we purge the modules, since the topology generation will load the O2PDPSuite with the O2 version that shall run, and that includes ODC. |
| 28 | + # If there is already something of ODC or O2PDPSuite in the environment, we should remove it to avoid collisions. |
| 29 | + # We set the odc-epn-topo command to be used explicitly though. |
| 30 | + # Note this happens only in case of on the fly generation when we run online, in case of tests this is not needed. |
| 31 | + export GEN_TOPO_ODC_EPN_TOPO_CMD=`which odc-epn-topo` |
| 32 | + [[ -z $GEN_TOPO_ODC_EPN_TOPO_CMD ]] && { echo "ERROR: no odc-epn-topo in the path" 1>&2; exit 1; } |
| 33 | + module purge &> /dev/null |
30 | 34 | fi |
| 35 | + |
31 | 36 | # Set O2DPG_ROOT from the latest available O2DPG module, if not already set. |
32 | 37 | # Note that this does not load the module, but just needs an O2DPG path to find, which then does the bulk of the topology generation. |
33 | 38 | # gen_topo_o2dpg.sh is kept compatible between O2DPG versions, thus it doesn't really depend on which O2DPG version we use at this point. |
|
0 commit comments