Skip to content

General installation instructions

Cloning the repository

CDMSBats is available on GitLab and requires a GitLab user account with access to the SuperCDMS project in order to clone the package. It is highly recommended to add ssh keys to your account following the instructions posted here. After that, the project can be cloned from an ssh session on a computing site via the following command:

$ git clone git@gitlab.com:supercdms/Reconstruction/cdmsbats.git

Dependencies

CDMSBats requires common UNIX base packages to be build upon, but also depends on some packages, which need to be set up by the cluster maintainers or the users themselves. This concerns in particular:

  1. ROOT (CERN analysis package)
  2. BatCommon and its dependencies
  3. IOLibrary (CDMS I/O library, required by BatCommon)

Details regarding BatCommon and its dependencies on other packages can be found in the build instructions for the package.

Building procedure

CDMSBats supports both in- and out-of source builds. Out-of-source builds are generally recommended for all cmake builds. This allows for a clean git repository state while it is possible to maintain multiple parallel builds for e.g. different feature branches. The following guide assumes a directory structure as follows:

../soft/<PackageName>/
    git_source
    build_dir
    install_dir

with three relevant directories: source (i.e. cdmsbats.git), build and install.

  1. Create build and install directories in parallel to the git repository.

    $ cd /path/to/<PackageName>
    $ mkdir build install

  2. Enter build directory and configure the build step.

    $ cd build
    $ cmake ../cdmsbats.git -DCMAKE_INSTALL_PREFIX=../install

  3. Compile and install the package.

    $ cmake --build .
    $ cmake --build . --target install

  4. Add executables to PATH variable.

    $ export PATH=<path/to/cdmsbats/install>/bin:$PATH

  5. Define required run time environment variables.

    $ export CDMSBATSDIR=<path/to/cdmsbats/git/repository>
    $ export BATNOISE_TEMPLATES=$CDMSBATSDIR/PulseTemplates
    $ export BATROOT_PROC=$CDMSBATSDIR/UserSettings/BatRootSettings/processing
    $ export BATROOT_CONST=$CDMSBATSDIR/UserSettings/BatRootSettings/analysis

Optionally, the build process can be executed with multiple cores. For that the cmake build command above can be replaced with

$ cmake --build . -- -jN

where N indicates the number of cores (e.g. -j4 for 4 cores). However, errors in the build process might not be recognized immediately by the user as parallel running processes will not be interrupted and may run to completion. Identifying the root cause for an incomplete build could be more complicated that way.

Note about cmake versions

Note that on some systems (e.g. SLAC Centos7), cmake may point to an old cmake version 2.X, while this build requires version 3.X. Usually there is an additional cmake3 version on those systems. In that case you should either define an alias alias cmake=cmake3 or replace cmake with cmake3 in all the commands above.

Additional environment variables

There are more environmental variables that need to be set in order to run CDMSBats on raw data. Starting August 2022, the user settings configuration files and the templates are removed from the cdmsbats repository. They can be found/downloaded/cloned in another repository: cdmsbats_config These are covered under the section "Settings and Usage".