Release setup and compiling your package

Last update: 16 Aug 2024 [History] [Edit]

Now that your work area is set up and you have checked out the analysis package, let’s set up the Analysis Release and compile it. We will use AnalysisBase for this part of the tutorial. The following commands should be used from your AnalysisTutorial directory:

setupATLAS
cd build/
asetup AnalysisBase,25.2.12
cmake ../source/
make

Since you have compiled a new package for the first time in your shell, you need to use the following command within the build directory:

source x86_64*/setup.sh

tip You will also need to call source x86_64*/setup.sh from your build directory on every login.

tip Note that the setup is virtually the same for AnalysisBase and AthAnalysis (i.e. the standalone vs. the Athena based releases), all you have to do is replace AnalysisBase with AthAnalysis. Indeed a lot of this tutorial can be equally applied to either AnalysisBase or AthAnalysis. If you follow the Athena path within the tutorial the above line should be:

asetup AthAnalysis,25.2.12

This tutorial works equally well for both AnalysisBase and AthAnalysis, but to keep things simple you should pick one of them to work through the tutorial. Experience shows that it is very easy to confuse yourself otherwise. You are more than welcome to come back later on and try the tutorial with the other release series, but if you do, do so in a fresh shell (i.e. log in again) and with a new build directory (either remove the old one or create a new one under a different name).

If you are doing this for the first time and as part of the tutorial week you are strongly encouraged to do this tutorial with the AnalysisBase release. Alternative methods will be given for AthAnalysis where the two releases differ.

Recompiling

Note that the above instructions are also what you need to do to recompile. We will repeat those instructions a lot:

cd ../build/
make

Or alternatively you can also use the --build option of cmake:

cmake --build ../build/

This will internally go to the build directory and call make there.

warning Sometimes we tell you to run cmake explicitly (typically because we added files or packages). In that case you really have to go to the build directory and call cmake. Calling cmake --build will sometimes not be sufficient.