Root with mods

From LWP-Wiki
Jump to: navigation, search

Running R3BRoot, CBMRoot or PandaRoot with modifications of your own.

These instructions are specific to R3Broot, but they can be applied equally well to PANDAroot or CBMroot. First open a file manager (nautilus, dolphin, thunar, etc.), go to the directory /opt/netapps/fair_install/ and copy the folder R3BRoot from there to /home/p123456/fair_install/ or use the following command (changing the environment to your choice of course):

 cp -rf /opt/netapps/fair_install/R3BRoot/ ~/fair_install/

NOTE: This will overwrite any existing version of r3broot in your home directory.

After this has finished go to /home/p123456/fair_install/R3BRoot/ and locate all history-tracking directories with the command:

 find ./ -type d -name .svn

This command will display all the directories inside /home/p123456/fair_install/R3BRoot/ with the name .svn. Navigate to the parent-directories of these .svn directories and delete those with the command:

 rm -rf ./.svn

You can use the following command to do the same in one go (run the first part, find ./ -type d -name .svn -print0, first if you want to make sure it doesn't remove too much):

 find ./ -type d -name .svn -print0 | xargs -0 rm -rf

Next empty the previous build directory, so you can build your own:

 rm -rf build/*

Now, make any modifications you like to the source code of R3Broot by modifying the right files inside /home/p123456/fair_install/R3BRoot/. If you do not know how to do this, you should not try to run your own version of R3Broot and just use the command root-setup r3b instead.

After making all the modifications you want to the source code, but before building, you need to set up your environment for FairRoot, so follow those instructions now. After set up of FairRoot is done, run the following command (if you haven't already):

 source /opt/netapps/fair_install/FairRoot/build/config.sh &> /dev/null

Now navigate to /home/p123456/fair_install/R3BRoot/build/ and give the command:

 cmake ../

After cmake is done, give the command:

 make

Wait for the compilation to finish. If the compilation did not finish successfully, you did not make your modifications correctly. If the compilation did finish successfully, open your .bashrc file and comment out any lines with source ... <environment>root .... Now add the following to source your own build automatically or run the command in a terminal to set up for that terminal:

 source /home/p123456/fair_install/R3BRoot/build/config.sh &> /dev/null

The part &> /dev/null redirects the on screen output to nowhere.

When this is done, you are ready to enjoy R3Broot with your own modifications.