Project

General

Profile

Download and build mu2e_artdaq

The recommended method for installing mu2e_artdaq is to use MRB. External dependencies are installed by using pullProducts.

Setting up a products area

While these instructions are specific to mu2edaq01 and its /mu2e/ups products area, you can create your own products area by following these steps:
You do NOT have to follow this section if you're on mu2edaq01: go to build!

prods=/path/to/your/products/area
mkdir -p $prods
cd $prods
wget http://scisoft.fnal.gov/scisoft/bundles/tools/pullProducts
chmod +x pullProducts
# For SLF6:
./pullProducts . slf6 artdaq-v2_03_00 s47-e10 prof # Change OS, artdaq version, qualifiers to match your situation.
# For SL7:
./pullProducts . slf7 artdaq-v2_03_00 s47-e10 prof # Change OS, artdaq version, qualifiers to match your situation.
wget http://scisoft.fnal.gov/scisoft/packages/mrb/v1_09_02/mrb-1.09.02-noarch.tar.bz2 # Check http://scisoft.fnal.gov/scisoft/packages/mrb/ for latest version
tar -xf mrb-*.tar.bz2 && rm -f mrb-*.tar.bz2
source ./setup

The initial MRB build

cd my/mrb/working/directory  # change to the path to your specific mrb project dir
prods=/mu2e/ups # Change to your products directory
. $prods/setup
Base=$PWD
setup git
setup gitflow
setup mrb
export MRB_PROJECT=mu2e_artdaq
mrb newDev -v v1_00_04 -q e9:s21:eth:debug    # check for version/qual in
                        # mu2e_artdaq/ups/product_deps. Add build type! (prof or debug)

. $Base/local*/setup
cd $MRB_SOURCE

For Read/Write access to the repositories:

mrb gitCheckout ssh://p-mu2e_artdaq@cdcvs.fnal.gov/cvs/projects/mu2e_artdaq
mrb gitCheckout -d mu2e_artdaq_core ssh://p-mu2e_artdaq@cdcvs.fnal.gov/cvs/projects/mu2e_artdaq-core
mrb gitCheckout ssh://p-pcie_linux_kernel_module@cdcvs.fnal.gov/cvs/projects/pcie_linux_kernel_module

For Read-Only access:

mrb gitCheckout http://cdcvs.fnal.gov/projects/mu2e_artdaq
mrb gitCheckout -d mu2e_artdaq_core http://cdcvs.fnal.gov/projects/mu2e_artdaq-core
mrb gitCheckout http://cdcvs.fnal.gov/projects/pcie_linux_kernel_module

After check-out:

# For building TRACE alongside...Use this is your kernel version is different than what is provided in TRACE product
#mrb svnCheckout svn+ssh://p-trace@cdcvs.fnal.gov/cvs/projects/trace-svn/trunk
#mv trunk TRACE
#sed -i 's/trunk/TRACE/g' CMakeLists.txt
#echo 'include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/TRACE/include )' >>CMakeLists.txt

cd $MRB_BUILDDIR
mrbsetenv
export CETPKG_J=24
mrb build    # VERBOSE=1

You may need to build the TRACE module for your kernel if you want to use the PCI-e card.

cd $TRACE_DIR
insmod $TRACE_DIR/module/`uname -r`/TRACE.ko || make OUT=$PWD modules

To rebuild after making changes to the source:

(Note: you can cd to any source directory)

mrb z; mrbsetenv; mrb b

Testing your build

On the target node (node with hardware DTC card). This node should have "same path" access to the
development area.

cd my/mrb/working/directory  # change to the path to your specific mrb project dir
. /mu2e/ups/setup
Base=$PWD
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.
mrbsetenv                                    # add (most) BUILDDIR dirs to PATHs
source Setup_DTC.sh

Test basic "GetData" operation with verbose tracing:

TRACE_NAME=MU2EDEV tonM -nMU2EDEV 0-31; tonM 0-31
mu2eUtil DTC -n 100 -e

Test artdaq using the driver execuatable

For making builds of other qualifier sets:

 mrb newDev -v v1_00_04 -q e7:s15:eth:prof -f
 unsetup_all
 setup mrb
 source localProducts_mu2e_artdaq_v1_00_04_e7_eth_prof/setup
 mrb z;mrbsetenv;mrb b

...and so on for other qualifier combinations.

Building mu2e_artdaq Tarballs

Follow the instructions for obtaining the products above, then:

# Note that the script assumes that a UPS directory called "products" is present in the current directory
export MASTER_PRODUCTS=/path/to/your/top-level/products/area

wget https://cdcvs.fnal.gov/redmine/attachments/download/43913/buildProducts.sh
chmod +x buildProducts.sh

./buildProducts.sh

The script will build all currently-supported variations of mu2e_artdaq. If there are build issues, the build_*.log files will have more information.