Run-time Environment F.A.Q. OBSOLETE
This page should collect answers to common questions about the run-time environment.
How to prepare the environment to run an LHCb project
To be able to run an LHCb application (like
Brunel
or
DaVinci
) you need to prepare the environment for it.
First you need to have a basic LHCb environment. On lxplus.cern.ch it is automatically done, while you can follow simple instructions
for windows or for
local linux installation
.
Assuming you what to run DaVinci v19r10 (the latest one at the time this instructions were edited), you simply have to type on the command line prompt
# SetupProject DaVinci v19r10
# DaVinci.exe path/to/my/file.opts
Note: in some cases, on linux, you have to replace
SetupProject
with
source $LHCBSCRIPTS/SetupProject.csh
or
. $LHCBSCRIPTS/SetupProject.sh
depending on the shell you are using.
If you copied locally and modified some packages in the directory created with
setenvDaVinci
,
SetupProject
will configure the environment to use them instead of the released ones (as long as the application+version you want to use matches the one you have in your local directory).
If you do not specify the version of the application,
SetupProject
will pick up the most recent one.
The script
SetupProject
allows the user to adapt the runtime environment for many special cases without the need of having a local copy of the application main package. Few examples follow:
- Give to the application access to external libraries not included by default
- for example you may need to use "gfal" to access your data files
# SetupProject DaVinci v19r10 gfal
- Use a version of ROOT different from the one associated with the version of the application you are using
- for example ROOT 5.18.00a fixes a bug, but DaVinci v19r10 uses ROOT 5.18.00, so
# SetupProject DaVinci v19r10 ROOT -v 5.18.00a
Some more information can be obtained with the option --help:
# SetupProject --help
Extensive documentation on SetupProject is available at
https://twiki.cern.ch/twiki/bin/view/LHCb/SetupProject
How to prepare the environment to use an external library/application
The most common use case for this how-to is to be able to use ROOT or Python with a version compatible with the one used by LHCb software.
One way to do it is to use
SetupProject
(see previous section) with something like
# SetupProject Gaudi ROOT
which will configure the environment for the latest version of Gaudi, ensuring that you have access to the version of ROOT that is used by it.
If you do not want to have the environment ready for Gaudi (or you do not want to override it), but only for ROOT, you can use the old script
setup_external
(available only on linux). To use it, you have to know from which
version of LCG you want to get you external library. For example I want to get ROOT and Python as for LCG version 54:
# source $LHCBSCRIPTS/setup_external.csh --lcg 54 ROOT Python
(or
. $LHCBSCRIPTS/setup_external.sh
if you do not use (t)csh).
--
MarcoClemencic - 03 Jul 2007