Installation on MacOS

The list of software needed for the course:

  • The C++ compiler: on MacOS is distributed with XCode.
  • Atom text editor: recommended editor for our course
  • ROOT: will be needed for later sessions

Xcode Installation

Xcode bundles the necessary tools to build software on MacOS. The steps to install XCode:

  • Download it from the App Store
  • Open once installed. It will ask to install additional components - approve the action.
  • Open a terminal (Applicaions>Utilities>Terminal) and install the command line tools using:
sudo xcode-select --install

approve the license conditions by

sudo xcodebuild -license

Homebrew Installation

On MacOS we recommend to install both Atom and ROOT via Homebrew If you have already Homebrew installed you can skip this section and go directly to the next one (Atom installation).

In a macOS Terminal type the following command:

/bin/bash -c "$(curl -fsSL"

Visit Homebrew web site for details:

Atom Installation

The Atom text editor is recommended for ours course as it provides all functions needed for C++ programming.

The command: brew install atom will install atom 1.53.0.

Visit for more information about Atom.

ROOT Installation

The ROOT installation is required for some exercises in this course.

The command: brew install root will install root 6.22.02.

Homebrew installs ROOT in relocatable mode. To use ROOT, you must set its environment sourcing the script from the ROOT installation directory:

source /usr/local/bin/

Visit for more information about ROOT.

Test Installations

C++ compiler

In a macOS Terminal (Applicaions>Utilities>Terminal) type the following command:

g++ -v

You shoulld see something like:

Configured with: --prefix=/Applications/ --with-gxx-include-dir=/Applications/
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/

ROOT Installation

Start the ROOT interactive session:

$ root
  | Welcome to ROOT 6.22/02               |
  | (c) 1995-2020, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for macosx64 on Aug 17 2020, 12:46:52                      |
  | From tags/v6-22-02@v6-22-02                                      |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q'       |

and type .demo after the ROOT prompt:

root [0] .demo

You will see the ROOT demo bar and can run some demos by clicking on the demo menu. You need to go from up to down in the menu, some demos depend on the previous demos results.

To quit ROOT type .q on the ROOT prompt

root [1] .q

Taking a break from ROOT? Hope to see you back!