Instructions for setting up a development environment for uBooNE Data Types Development

IMPORTANT : before committing any changes to uboonedaq datatypes we should inform the run cos and make sure the pubs and offline groups in data management are informed and familiar with the changes.

Login into the uboonedaq-evb or ubdaq-prod-evb node and make sure you have a valid kerberos ticket (klist).

1. Set the UBOONEDAQ_HOME_DIR environment variable.

This environment variable points to your private development area, which contains the project source code (${HOME}/development_daq/uboonedaq-datatypes), out of source build files (${HOME}/development/build-datatypes), and ups repository (${HOME}/development_daq/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_daq in the ~/.bash_profile. Use the following example to override the default value.

export UBOONEDAQ_HOME_DIR=${HOME}/development_daq

2. Setup your UPS environment and git.

source /uboonenew/

The command above sets up your primary UPS repository (/uboonenew) with all development software and libraries. It also creates a couple of aliases and a helper function, which is described in the next step.
alias git-clone-uboone-datatypes-online-source="git clone ssh://"
alias cd-build-datatypes-directory="cd ${UBOONEDAQ_HOME_DIR}/build-datatypes"

3. Download source code into the UBOONEDAQ_HOME_DIR directory and create a private ups repository for your development.


The setup-uboone-datatypes-source 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_daq/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_daq/uboonedaq-datatypes directory. All git and cmake rules and procedures are applicable to it and its subdirectories.

If you want to merely git pull the latest changes, you may replace a pull for the clone in the relevant spot. Do a '[echurch@uboonedaq-seb-01 build]$ type -a setup-uboone-datatypes-source' to see the relevant spot.

4. Setup your development environment.

cd ${UBOONEDAQ_HOME_DIR}/build-datatypes (optional)

source ../uboonedaq-datatypes/projects/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_daq/build-datatypes directory.

The release number is maintained inside the ${UBOONEDAQ_HOME_DIR}/uboonedaq-datatypes/projects/ups/product_deps file.
Look for the line containing the parent uboonedaq-datatypes vXX_XX_00 string.

About Qualifiers

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

make -j32

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.

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

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.

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

. ~/development_daq/install/setup
ups list -aK+ uboonedaq_datatypes # To see what libs/bins might be appropriate
setup uboonedaq_datatypes [your version] -q debug:e6

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.


Other Stuff

cetbuildtools guide

git tips and tricks