Chants which allow you to run artdaq-demo installed under another user account

The following wiki is under construction

This wiki is motivated by the current (Apr-3-2017) protoDUNE teststand configuration at CERN, which uses AFS to provide a space common to all three machines (pddaq-gen03, pddaq-gen04, and pddaq-gen05). The issue there is that the pduser account, which is the account meant to be used when running the DAQ, doesn't have an area in AFS, and apparently it's nontrivial to get one set up. For this reason, dune-artdaq (as well as artdaq-demo) need to be installed on AFS under another account (in this case, mine, "jofreema"), but this installation will be used under the pduser account. However, without any alterations, if one tries something like the following:

cd <artdaq demo base directory installed under someone else's account>

...the environment won't set up correctly. An error message like the following will appear:
----------- check this block for errors -----------------------
Couldn't open /afs/ at /afs/ line 38.
-bash: .: filename argument required
.: usage: . filename [arguments]
Couldn't open /afs/ at /afs/ line 46.
-bash: .: filename argument required
.: usage: . filename [arguments]

and what's going on here is that the /afs/ script doesn't have write permission to /afs/ (in the example above, I'm running under the "pduser" account, which can't write to the "jofreema" account's area).

To remedy this, we need to set up our own base directory in which to perform a build, and copy the setup script into it:

mkdir <your_base_directory>
cd <your_base_directory>
cp -p <artdaq demo base directory installed under someone else's account>/setupARTDAQDEMO .

And next, we need to edit setupARTDAQDEMO so mrb uses your area. To do this, in setupARTDAQDEMO, change
source mrbSetEnv

export MRB_BUILDDIR=<your base directory>/build_slf6.x86_64
export MRB_INSTALL=<your base directory>/localProducts_artdaq_demo_v2_09_02_e10_s41_prof

mkdir -p $MRB_BUILDDIR
mkdir -p $MRB_INSTALL

source mrbSetEnv

where in the above example, you'll of course want to change the specifics in the subdirectory names (concerning the OS, the package version, etc.) to the relevant ones for your situation. Then, perform a soft link to the original source code directory:
cd <your_base_directory>
ln -s <artdaq demo base directory installed under someone else's account>/srcs

and you can now set up the environment and build:
mrb b -j<number of processors you want to build with>