Building LArIATOnline Code with CMake¶
The LArIATOnline code can now be compiled using CMake for all directories. Below are the steps for checking out the repository and building the code.
NB Please be sure to remove any automatic setups of code from your login scripts before attempting the following step
In order for LArIATOnline and LArIATSoft to both have access to the online data products, i.e. the "Fragments", those data products are placed in a separate repository. You will have to either build the LArIATFragments product yourself, or use the version installed in /grid/fermiapp/products/lariat. If you wish to alter the data products, you will have to build them yourself.
Whether you choose to build both products, or just LArIATOnline, you need to do the following steps.
First log into a lariatgpvm node and navigate to a directory with sufficient space for you to build the software.
source /grid/fermiapp/larsoft/products/setup export PRODUCTS=/grid/fermiapp/products/lariat/:${PRODUCTS} setup git
Building LArIATFragments¶
Create three directories; one contains the source code and is provided by checking out the software, one is where you perform the build, and the last is where you install the created ups product libraries and executables.
git clone ssh://p-lariat-online@cdcvs.fnal.gov/cvs/projects/lariat-online-lariatfragments mkdir build_lariatfragments mkdir local_product_installation
Now you are ready to perform the build. The "-d" in the second line says that you are setting up a build that will have debugging symbols turned on. To have a build without them, you can use "-p" instead and that option also sets the -O4 flag for compilation. The "on:e9" are the qualifiers you are giving to this build of the ups product; "e9" indicates the version of the compiler being used, in this case gcc 4.9.3, and "on" indicates that you are building the product for use with the online system as opposed to the offline lariatsoft system.
In the buildtool line, "-j 8" says to use 8 cores while doing the build, "-i" indicates that you want the product to be installed and "-I" indicates that the following directory is where you want it installed.
cd build_lariatfragments source ../lariat-online-lariatfragments/ups/setup_for_development -p e9 buildtool -j 8 -i -I ../local_product_installation
You are almost ready to setup your newly created ups product. Before doing so, you need to cd to the directory containing build_lariatfragments and do the following steps:
cd .. cp -R /grid/fermiapp/products/lariat/.upsfiles local_product_installation/ export PRODUCTS=`pwd`/local_product_installation:${PRODUCTS} cd -
You can now setup your ups product
ups list -aK+ lariatfragments setup lariatfragments vXX_YY_ZZ -q prof:e9
And you are ready to go. In the above example, XX_YY_ZZ is determined by the tag of the code and "e9" will change with compiler versions. The necessary libs are all installed in $LARIATFRAGMENTS_FQ_DIR/lib. In fact, several helpful variables are defined that all contain "LARIATFRAGMENTS".
Building LArIATOnline¶
Create three directories; one contains the source code and is provided by checking out the software, one is where you perform the build, and the last is where you install the created ups product libraries and executables.
NB If you already built lariatfragments you can use the local_product_installation directory you already made to install the lariatonline product, so you can skip the 3rd line below.
git clone ssh://p-lariat-online@cdcvs.fnal.gov/cvs/projects/lariat-online mkdir build_lariatonline mkdir local_product_installation
Now you are ready to perform the build. The "-d" in the second line says that you are setting up a build that will have debugging symbols turned on. To have a build without them, you can use "-p" instead and that option also sets the -O4 flag for compilation. The "e9" indicates the version of the compiler being used, in this case gcc 4.9.3.
In the buildtool line, "-j 8" says to use 8 cores while doing the build, "-i" indicates that you want the product to be installed and "-I" indicates that the following directory is where you want it installed.
cd build_lariatonline source ../lariat-online/ups/setup_for_development -p e9 buildtool -j 8 -i -I ../local_product_installation
You are almost ready to setup your newly created ups product. If you already built and installed lariatfragments you can skip the next set of steps and go on to setting up the ups product. If not, you need to cd to the directory containing build_lariatonline and do the following steps:
cd .. cp -R /grid/fermiapp/products/lariat/.upsfiles local_product_installation/ export PRODUCTS=`pwd`/local_product_installation:${PRODUCTS} cd -
You can now setup your ups product
ups list -aK+ lariatonline setup lariatonline vXX_YY_ZZ -q prof:e9
And you are ready to go. In the above example, XX_YY_ZZ is determined by the tag of the code and "e9" will change with compiler versions. The necessary executables are all installed in $LARIATONLINE_FQ_DIR/bin. In fact, several helpful variables are defined that all contain "LARIATONLINE".
For future work, you need only do
source /grid/fermiapp/larsoft/products/setup export PRODUCTS=/full/path/to/local_product_installation:/grid/fermiapp/products/lariat/:${PRODUCTS}
To be setup to develop the code. To run it, you must always do
setup lariatonline vXX_YY_ZZ -q prof:e9
As lariatonline depends on lariatfragments, setting up the former automatically sets up the latter.