How to build/run RunControl from e2 code

Instructions on how to setup and build RunControl with e2 code on uboonedaq-evb (test stand environment), by Donatella T., Gennadiy L. and Jeremy H.

How to build

Most likely your account will come with a default .bash_profile that sets-up the e6 environment.

To restore the e2 build environment, please delete the symbolic link ~/.bash_profile and recreate your .bash_profile with this content:

# .bash_profile
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
export PATH

#ups setup
source /uboone/setup

Then, IF you have not yet checked out the rc code from git, please follow the instructions in this Wiki page:

Follow the instructions up to "make -j32" included.
At this point there will be some errors, due to some mismatched dependencies in the various packages.

Please type "make -j32" again.
This should solve the dependencies and build all packages (ie. no more errors).
(At this point, if you type "make -j32" again, it will show you a nice list of all that has been biult so far).

Now go back to the instructions in the Wiki page and type "make install".

Point 6) in the Wiki page above, tells you to run

. ~development/install/setup

Please check you do have this file. IF NOT please untar /uboonenew/distribution-tarballs/ups-5.1.2-Linux64bit+2.6-2.12.tar.bz2 in your /install directory.
This will get you the setup file.
Then please "source ~development/install/setup"

How to run

Please follow these instructions to setup/launch RunControl.
(I'd recommend to collect these into a file)

cd development/build

source /uboone/
export UBOONEDAQ_HOME_DIR=${HOME}/development
source ../uboonedaq-rc/projectsrc/ups/setup_for_development -d;
source ../uboonedaq-rc/projectsrc/configs/
source ../install/setup
## v5_01_00 is available ONLY on ubdaq-prod-evb
#setup uboonedaq v5_01_00 -q e2:debug
## so ,use v5_02_00 on uboonedaq-evb
setup uboonedaq v5_02_00 -q e2:debug

cd ~;

Jeremy suggested to define some very useful aliases to semplify the commands, such as:

alias startdaq='bash ${UBOONEDAQ_HOME_DIR}/uboonedaq-rc/projectsrc/configs/'
alias stopdaq='bash ${UBOONEDAQ_HOME_DIR}/uboonedaq-rc/projectsrc/configs/'
alias startrc='bash ${UBOONEDAQ_HOME_DIR}/uboonedaq-rc/projectsrc/configs/DAQOperationsTools/bin/'
alias stoprc='bash ${UBOONEDAQ_HOME_DIR}/uboonedaq-rc/projectsrc/configs/DAQOperationsTools/bin/'

You can add then to your .bash_profile file or to the file.

Next time you login, you just do "source" and you'll be ready to launch RunControl, DAQApplicationMAnager and ResourceMAnager.