|
Analysis
- Data Summary
- Experimental Code (@CERN)
- Experimental Code (@after)
- Theory
Samples
- Diamond
- Alignment
DAQ
- Remote Monitoring
Learning Material
- Configure your machine
- Learn Unix shell
- Learn CPP
- Install and Learn ROOT
- Compiling ROOT Example
- Using Root for analysis
- BL4S 2014 Wiki
- Analyse-2014
- GEANT
- New ROOT + TCutg
edit SideBar
|
Follow these steps
Download
- Preferred Installation Method : the ROOT framework installation from source
- Go to ROOT web site
- Download the latest production version (see also the release notes)
- Can also use the Git repository
- Copy it from the download folder to the where you will install it.
- In Catalina on OSX of the Mac , we are using
~/sw/root as the ROOT installation folder
- The source file archive should 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.26.00 with of course the version number of the latest version
- 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
- in Catalina, with the zsh shell, replace
.bashrc with .zshrc
- This new environment only comes into effect if you re-open an ew shell.
- Now click on the link to for the "instructions" build root with cmake.
- Go into your
~/sw/root directory
-
mkdir <root-6.04.00-builddir>
-
mkdir <root-6.04.00-installdir>
-
cd <root-6.04.00-builddir>
-
cmake <srcdir (full path to root-6.04.00)> -DCMAKE_INSTALL_PREFIX=<installdir (full path to root-6.04.00-installdir>
-
make [or, make -jn for n core machines]
-
make install
- You should make sure the path to the "thisroot.sh" is correct in your /etc/bashrc" file.
- Google the setting up of the environment in linux.
- In Catalina of Mac OSX its zsh, not bash, and you use instead the environment file ~/.zshrc
- 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.
- You can add a lot of other definitions ... for example, for myself, i have
-
-Dmathmore=ON -Dminuit2=ON -Dbuiltin_vdt=ON, but there may need to be others, like special path to your python installation et.
- Recently there is an issue with XROOTD on Mac ....
- Install Xrootd with
brew install xrootd
- use these additional flags
-Dbuiltin_xrootd=OFF -DXROOTD_ROOT_DIR=/usr/local/Cellar/xrootd
- ALTERNATIVE to build ROOT from source and libEvent
- Follow these steps:
- Command Line Tools for Xcode
- 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
- 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.
- 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 installer
- Also copy in the
EventDict_rdict.pcm
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
|