Instructions for Developers » History » Version 131

« Previous - Version 131/134 (diff) - Next » - Current version
Lorenzo Uplegger, 04/22/2020 04:18 PM

Instructions for Developers of OTSDAQ

Note: we use MRB.

MRB is very useful as it allows users to update the entire dependency tree and only rebuild as needed (instead of having to rebuild the changes and then all dependent products). However, MRB does not support installing to a UPS product area, so it is most useful for development and testing, not for creating release packages and tarballs.

The quick start install script is here: (

MRB: mrb

Troubleshooting your otsdaq Installation
Making an otsdaq Release
Updating web source code documentation

Install system dependencies (need to be root or have sudo powers):

sudo yum install -y libuuid-devel openssl-devel

Set up your products area:

You should use the products saved in the fermilab cvmfs (need to be root or have sudo powers):

yum install -y
yum clean all
yum install -y cvmfs cvmfs-config-default

create the file /etc/cvmfs/default.d/70-artdaq.conf and add the lines

Then you can refresh the cvmfs configuration:

cvmfs_config setup
#Check if CernVM-FS mounts the specified repositories by: 
cvmfs_config probe

If the probe fails, try to restart autofs with sudo service autofs restart.

If cvmfs is installed correctly, now you can export the PRODUCTS directory:

export PRODUCTS=/cvmfs/

If you can't install the CernVM-FS, you may try to install manually the products:

mkdir /path/to/products/area # Should be DIFFERENT than where you intend to install otsdaq (for example: otsdaqPrj/otsdaq-mrb-base for otsdaq and otsdaqPrj/products for the products)
cd /path/to/products/area # e.g. /data/ups

Otherwise... (here is the link to artdaq bundles and to ups packages )

mkdir /path/to/products/area # Should be DIFFERENT than where you intend to install otsdaq (for example: otsdaqPrj/otsdaq-mrb-base for otsdaq and otsdaqPrj/products for the products)
cd /path/to/products/area # e.g. /data/ups
# Match the UPS version to your machine's architecture, SLF6 or SLF7 should work. See for latest versions and architectures in the manifest subfolder.
chmod +x pullProducts

#go here to determine latest artdaq_demo version v#_##_##:
#check your local products folder name for the qualifiers (e.g. ots/localProducts_otsdaq_demo_v2_01_00_e15_s64_prof ==> implies s64-e15)
./pullProducts . slf6 artdaq_demo-v#_##_## s41-e10 prof 
#for example, ./pullProducts . slf7 artdaq_demo-v3_03_00 s64-e15 prof
curl|tar -jx
#curl|tar -jx
curl|tar -jx
#curl|tar -jx
rm -f *.bz2 *.txt

Fetch code from the repository

cd my/mrb/working/directory  (or mkdir my/mrb/working/directory if it doesn't exist)# change to the path to your specific mrb project dir
source $PRODUCTS/setup # e.g. /data/ups/setup, Products set in previous step
setup git
setup gitflow
setup mrb
# NOTE: You must have a UPS area that you have run ./pullProducts . slf6 artdaq-v1_13_00 s35-e10 prof (slf6 artdaq-v1_13_00 s35-e10 prof) in!
#       You must also have extracted the XDAQ UPS product found in the otsdaq-demo repo to this UPS area!
#       This has already been done if you are developing on rulinux03!
export MRB_PROJECT=otsdaq
mrb newDev -f -q s96:e19:prof #gets latest version (still have to know qualifiers)
# mrb newDev -v v2_02_00 -q e15:s65:prof  #target a version

. $Base/local*/setup

If you have write access to the repositories:

mrb gitCheckout ssh://
mrb gitCheckout -d otsdaq_utilities ssh://
mrb gitCheckout -d otsdaq_components ssh://
mrb gitCheckout -d otsdaq_demo ssh://

Otherwise for read-only access to the repositories:

mrb gitCheckout -b develop
mrb gitCheckout -b develop -d otsdaq_utilities
mrb gitCheckout -b develop -d otsdaq_components
mrb gitCheckout -b develop -d otsdaq_demo

Finally, build the products

# For building TRACE alongside...
#mrb svnCheckout svn+ssh://
#mv trunk TRACE
#sed -i 's/trunk/TRACE/g' CMakeLists.txt
#echo 'include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/TRACE/include )' >>CMakeLists.txt

If you're setting up your own products area:

# Extract the XDAQ product shipped with OTSDAQ, as well as the special version of ARTDAQ
for file in $MRB_SOURCE/otsdaq_demo/tarballs/*.bz2;do tar -xf $file;done


# A template setup script can be copied from the repo;
#  it should work, untouched, if you installed to ~/ots/
# cp srcs/otsdaq/tools/ . 
# .
# If you installed somewhere different from ~/ots/ you can edit the file
# or proceed with commands manually...
source mrbSetEnv
setup nodejs v4_5_0
export CETPKG_J=8
mrb build    # VERBOSE=1 <hit enter>

To rebuild after making changes to the source:

(Note: you can cd to any source directory)

. $Base/local*/setup
source mrbSetEnv
setup nodejs v4_5_0
mrb b

To do a clean build:

. $Base/local*/setup
source mrbSetEnv
setup nodejs v4_5_0
mrb z;source mrbSetEnv;mrb b

To update/pull the source:

. $Base/local*/setup
mrb updateSource
setup nodejs v4_5_0
mrb z;source mrbSetEnv;mrb b

Before Running:

If you are using your own Data directory, and not the one provided through MRB to avoid git conflicts, you must set the USER_DATA environment variable before running.
For example, first copy the configuration provided through MRB:

cp -r /my/mrb/working/directory/srcs/otsdaq_demo/Data /my/new/config/directory/NoGitData
export USER_DATA=/full/path/to/new/config/directory/NoGitData

To run:

cd my/mrb/working/directory  # change to the path to your specific mrb project dir
setup mrb                                    # $MRB_DIR used in next setup script
. $Base/local*/setup                         # "base" variable used by this script and is unset; MRB_BUILDDIR, etc set.
source mrbSetEnv                             # add (most) BUILDDIR dirs to PATHs
                                             # Repeat the above steps after opening a new terminal to resume development
setup nodejs v4_5_0

Setting up MRB for each new terminal session:

source /path/to/products/area/setup # e.g. /data/ups/setup
cd my/mrb/working/directory # this is where localProducts_otsdaq_* and srcs resides
setup mrb
setup git
setup nodejs v4_5_0
source local*/setup
mrb updateSource
source mrbSetEnv
export USER_DATA=/full/path/to/new/config/directory/NoGitData

To check-in/push your changes (into all ots respositories at once):

#from any path
. my/mrb/working/directory/srcs/otsdaq_utilities/otsdaq-utilities/ "<your comment for check-in>" 

#verify push
more checkinAll.log

For making builds (i.e. new localProducts* folder) of other qualifier sets:

 # Supported qualifiers: e10:s44:prof, e10:s44:debug, e10:s43:prof, e10:s43:debug, e10:s41:prof, e10:s41:debug

 #setup your current/previous local products
 mrb newDev -v v1_00_05 -q e10:s41:prof -f
 setup mrb
 source localProducts_<New qualifier set>/setup
 mrb z;mrbsetenv;mrb b

OTSDAQ Repositories

Repository Descriptions

Respository Tag Description
otsdaq Main repository containing the code OTSDAQ uses to manage the flow of data
otsdaq-demo Contains the "user-servicable" parts, specifically the classes used to communicate with hardware. Also contains useful scripts for controlling the software.
otsdaq-web The web interface used for generating project files
otsdaq-firmware Pre-built firmware blocks for use on FPGA-based experiment hardware
otsdaq-utilities Software components not directly related to data-taking, such as the Logbook, Chat, and Configuration GUI

Read-Only Mode Checkout Instructions

git clone,-firmware,-utilities,-web,-demo)

Read-Write Mode Checkout Instructions

git clone ssh://,-firmware,-utilities,-web,-demo)

To check out an individual repository (for example "firmware"):

git clone ssh://

Instructions for otsdaq-web (firmware and software project navigator)

Using and developing otsdaq-web