Instructions for setting up a development environment for uBooNE Run Control Development

Login into the uboonedaq-evb node and make sure you have a valid kerberos ticket using klist. If do not have a valid ticket, create one with kinit. Login to to uboonedaq-evb using ssh <username>@uboonedaq-evb.

1. Create a development directory for the project and set the UBOONEDAQ_HOME_DIR environment variable:

mkdir $HOME/development

export UBOONEDAQ_HOME_DIR=${HOME}/development

This environment variable points to your private development area, which contains the project source code (${HOME}/development/uboonedaq), out of source build files (${HOME}/development/build), and ups repository (${HOME}/development/install) where the build binaries and header files are installed by the build process (make install). It needs to be set for each ssh session. For the convenience, it is set to ${HOME}/development in the ~/.bash_profile. Use the following example to override the default value.

This variable should already by set when you login, so you can skip this step. You can check if the variable is set correctly using echo $UBOONEDAQ_HOME_DIR

2. Setup your git source:

cd $HOME/development

git clone -v ssh:///cvs/projects/uboonedaq-rc

The clone function needs to be executed only once when you create a new development area or need to recreate it from the git repository. In the later case, you will need to delete to existing (old) development area manually. The private UPS repository, which is located in the ${HOME}/development/install directory is the location where the project libraries and header files will be installed by the build process (make install). The project source code is downloaded into the ${HOME}/development/uboonedaq-rc directory. All git and cmake rules and procedures are applicable to it and its subdirectories.

3. Setup your development environment

cd $HOME/development

mkdir build
cd build

source ../uboonedaq-rc/projectsrc/ups/setup_for_development -d

note: where setup for development can be -d (debug) or -p (profile)

The setup_for_development command initializes the cetbuildtools package and should be executed in the ${HOME}/development/build directory.

The release number is maintained inside the ${UBOONEDAQ_HOME_DIR}/uboonedaq/projects/CMakeLists.txt file. Look for the line containing the cet_cmake_env string.

Example:   cet_cmake_env( uboonedaq v1_00_00 e1:nompi ) ,  
uboonedaq -- project name,
v1_00_00 -- release number,
e1:nompi -- build qualifier.

About Qualifiers

4. Run cmake as suggested by the setup_for_development script output.

This output should be:


This step uses the cmake build tool to initialize your build area and needs to be repeated if any of the CMakeLists.txt files were modified. Follow the cetbuildtools user guide and cmake guidelines while making changes to the CMakeLists.txt files.

5. Finally, run make or make install, which compile and install uboone code in your private UPS repository.


make -j32

The option "-j32" fastens the process by using the available 32 in parallel.

make install

The only important thing to mention here is that you do need to install your binaries into the private UPS repository and set them up as shown in the next step before they can be run from the command line.

6. Run the precursors and "setup" command to make the newly built release available for use.

--- The following step may not be necessary at the moment. It may be replaced by source ${UBOONEDAQ_HOME_DIR}/uboonedaq-rc/projectsrc/configs/DAQOperationsTools/ [011314 DK] ---

. ~/development/install/setup
ups list -a uboonedaq # To see what libs/bins might be appropriate
setup uboonedaq v1_00_00 -q debug:e2:nompi

This command prepends the location where the project binaries were installed to the PATH and LD_LIBRARY_PATH variables. In a similar way, it will also setup all required dependencies specified in the UPS table file for your project.