Installing and building the demo¶
The software packages that are part of the demo system have been built for several Scientific Linux Fermi variants, and these packages can be used on other modern Linux variants. The installation script(s) will download the best match to your Linux OS. If you don't have a Linux installation, take a look at the Creating an SL Virtual Machine.The "curl" application is used by the installation script(s) to download tarballs, so that is expected to be installed on your test system. Also, the "ruby" scripting language is used to run several scripts that are part of artdaq, so ruby needs to be installed on your system. And, the Linux Standard Base (lsb) package needs to be installed on your system. Also, "git" should be installed on your system.
- These instructions have been tested with ruby 1.8.7, curl 7.19.7, lsb_release 6.3, and git 1.7.1. To find out which versions of these packages you have, you can use the commands
git --version, and
lsb_release -a. The ruby version is the one the installation will be most sensitive to; on the other hand, it's unlikely the installation will fail because you have a different version of curl than the one shown above.
The software packages that are part of the demo require ~6 GB of disk space in a user area on your Linux host (or virtual machine). artdaq is quite resource-intensive, please make sure that at least 4 GB of RAM and 2x2 GHz cores are available for building and running the demo.
The installation script(s), and the setup script that is generated as part of the installation, all use the bash shell.
A Java-based tool is used to generate the boilerplate state machine code, so an installation of Java is needed.
Please note that we recommend that you do install the demo software packages in an AFS area. We have seen instances where that didn't work smoothly, so it is recommended to install the software on a local or NFS mounted disk.
Installation and building¶Here are suggested installation steps:
- log into your desired Linux test system
- switch to the bash shell, if needed
- create (if needed) a base directory to hold the artdaq-demo, and cd to it
- for example:
cd $HOME ; mkdir artdaq-demo-base ; cd artdaq-demo-base
- for example:
- Get the artdaq-demo quick-start script off the web. To do this, run:
wget https://cdcvs.fnal.gov/redmine/projects/artdaq-demo/repository/revisions/develop/raw/tools/quick-mrb-start.sh(if wget failed, try to enable
and make it executable:
chmod +x quick-mrb-start.sh
- If you want to install the latest tagged version, run the quick-start script in the following manner:
If you'd like to choose a specific tag that's not the latest, instead of the command above you'll want to execute the following:
./quick-mrb-start.sh --run-demo --tag=<tagname>
where <tagname> is to be understood as a placeholder for the tag, e.g., v2_10_00 (dated from June-3-2017). If you're a developer who has access rights to the central artdaq-demo repository, rather than a tag, you can use a git branch (it's unlikely you'd want to do this if you're not a developer).
- This script will install and build artdaq-demo from the directory in which you're running it.
- The downloads of the necessary tar files may take a while, and the unwinding of the tar files may also take a while. The scripts will print out information on the progress of these operations. Total time to install and build varies by system but is on the order of 10 minutes on Fermilab hosts; when the script is complete you should see a line near the bottom which reads
INFO: Stage build successful.. A record of the output from the install, as well as a record of just the stderr output from the install, will have been saved in the log/ subdirectory, at the same directory level as artdaq-demo/, etc. Additionally, at the end of installation a couple of terminals will open up from which a DAQ simulation will briefly run; please note that depending on whether you have a .bashrc file in your home area as well as what its contents are, you may need to go to each terminal and hit "q" to be able to enter the shell and have the simulation run.
- The script will do the following:
- download the necessary tar files from scisoft.fnal.gov using curl (these will go into a "download" subdirectory)
- unwind the tar files into a "products" subdirectory
- check out local copies of the artdaq-demo repository and these two repositiories it depends on: artdaq and artdaq-core-demo. The tagged version of artdaq-demo the user requested will be used, as well as the tagged versions of artdaq and artdaq-core-demo on which the particular version of artdaq-demo depends. The source code will be stored in subdirectories of the form
- create subdirectories for building artdaq-demo's source code as well as the code for those repositories on which artdaq-demo depends, of the form
<platform>can be, e.g., slf6 . Then build the code and put the result in those repositories.
- create a script called setupARTDAQDEMO that can be later source-ed to set up an environment that is ready to build and run the artdaq-demo
- A quick simulation will run with two BoardReader processes, two EventBuilder processes, a DataLogger, a Dispatcher, and two art processes monitoring events from the Dispatcher. Events in the simulation consist of two fragments, one of type "TOY1", the other of type "TOY2". While the system is running, the two art processes will run separate art modules, one which creates plots, and the other which prints out ADC values.
- If the build was a success, you should see something like the following:
------------------------------------ INFO: Stage build successful. ------------------------------------ doing the demo Build start time: Thu Dec 29 15:56:17 CST 2016 Build end time: Thu Dec 29 16:02:14 CST 2016
Assuming there were no problems with the build, go to Running a sample artdaq-demo system to learn about how to run artdaq-demo; if there was a problem, please contact John Freeman, email@example.com, and send him the copies of the build output stored in the ./log subdirectory.