Install ROOT

Follow these steps

Download

  • First the ROOT framework itself - install of binaries
    • Go to ROOT web site
    • Select the Download menu option
    • Select the link .... Pro, version 6.04/00 recommended (see also the release notes)
    • Go down to the link for OSX, 10.10 x86-64 with clang 6.1, version 6.04.00 tar.gz or dmg (133 MB).
    • Click on the "dmg" file and it will download.
    • Find the ROOT dmg file and install ROOT ... following obvious steps.
  • Alternative : the ROOT framework installation from source
    • Go to ROOT web site
    • Select the Download menu option
    • Select the link .... Pro, version 6.04/00 recommended (see also the release notes)
    • Go down to the link for OSX, 10.10 x86-64 with clang 6.1, version 6.04.00 tar.gz.
    • In the link for " ... complete source tree", click on the file and it will download.
    • Copy it from the download folder to the (new) /sw folder under a (new) "root" folder.
      • It will now be in the folder /sw/root
    • Use "tar -xvf <filename>" to unpack the source file tree into this folder.
      • It will now look like this if you do a directory listing. /sw/root/root-6.04.00
    • Going down to the section "Two build methods", use the "cmake" build process. Find the link to this in the "Installing ROOT From Source" instructions
    • You will need to follow the link to first install "cmake" and add the path to the "cmake" binary into your PATH variable.
      • edit /etc/bashrc with "vi" and add the lines
        • PATH=$PATH:<path to cmake binary>
        • export PATH
    • Now click on the link to for the "instructions" build root with cmake.
      • Go into your /sw/root directory
        • mkdir <root-6.04.00-workdir>
        • mkdir <root-6.04.00-installdir>
        • cd <root-6.04.00-workdir>
        • cmake <srcdir (full path to root-6.04.00)> -DCMAKE_INSTALL_PREFIX=<installdir (full path to root-6.04.00-installdir>
        • make [or, make -j n for n core machines]
        • make install
    • You should make sure the path to the "thisroot.sh" is correct in your /etc/bashrc" file.
  • If you already had a ROOT installation, then comment out the ROOT environment in your bashrc and work from a new shell (terminal)
    • If the new root which is installed from source is working, then remove all old versions which did not work perfectly.
  • ALTERNATIVE to build ROOT from source and libEvent
    • Follow these steps:
      • Command Line Tools for Xcode
        • xcode-select --install
      • Build root using make
        • sudo -s
        • mkdir /sw
        • cd /sw
        • tar zxvf ~/Downloads/root_v6.04.02.source.tar.gz
        • cd root-6.04.02
        • ./configure
        • make
      • Make sure your /etc/bashrc sources the correct script to establish the ROOT environment
        • . <path to the root bin directory>/thisroot.sh
      • You need to do this too to use TTree::MakeClass
        • cd test
        • make libEvent.so
        • cp libEvent.so EventDict_rdict.pcm ../macros
      • Now test the installation
        • root
        • .L libEvent.so
  • Now the ROOT Userguide
    • This in under "Documentation"
    • Choose the one sided pdf option ... development trunk version 6 ... you will consult this often

Set your environment

  • Get the instructions from the link in the line "After downloading and unpacking please read the included README/README file on how to set the necessary environment variables." which you see at the bottom of the page where all the versions for download are.
  • You will need to make your /etc/bashrc file automatically run a script to set the Environment by inserting this string in the file. ". <pathname>/root<version>/bin/thisroot.sh"
  • <pathname> is where the root installation went. Probably /Applications/.

Check ROOT works

  • issue the command "root" in a shell.
  • you must open the shell afresh to get the updated environment from the previous step

Make sure you have "libEvent.so" installed

  • in a root session, run .L libEvent.so ... check it runs with no errors
  • if necessary, install libEvent.so in the root installdir
    • go to the root sourcedir, go to the test subdir, ... say make Event , it will build libEvent.so
    • copy this to the macros subdir of the root installdir

Learn ROOT

  • Do Chapters 2-5 as a Tutorial
    • Fire up ROOT ....
    • Have the UserGuide open
    • Have your editor open
    • Some examples are one liners ... enter them directly into the ROOT window
    • Some examples you must save as a code fragment.
      • Use your editor to do this.
      • You can give the extension .cpp again
      • Once again ... a folder per example !
      • Run the code by typing .x <filename> in the ROOT session
      • The examples are also in the tutorial section
  • You should for example, understand and play with the "FittingDemo.C" from the tutorial/fit folder, as in Chapter 5 of the User Guide
  • If you want to be more expert .. then also learn
    • chapters 6, 7, 12