Cannot compile sample macros on Mac OSX 10.8


I am new to using RooStats. When I try to run the macro in the tutorials StandardProfileLikelihoodDemo.C
I receive an error Error: cannot open file “RooWorkspace.h”

This problem occurs with ROOT install on Mac OSX 10.8
These macros work with a linux distribution (Fedora and Ubuntu)

I am following the youtube series
on how to use Roostats.

The ROOT I have built ROOT 3.34.11 from the repository.

What am I missing?


1 Like


What am I missing?





Some documentation would be nice, all tutorials I found never eluded to this.

Some documentation would be nice, all tutorials I found never eluded to this.[/quote][/quote]

Well true, but it’s true not only for roofit/roostat, but for any other tutorial(s) which require(s) some library not enabled by default. It’s not difficult to find out though - which library to enable/build :slight_smile:

I am facing the same problem. When exactly should I type --enable-roofit when working in CINT?

root-config --has-roofit
and if you do not get “yes”, try:
./configure --help


root-config --has-roofit



./configure --help
-bash: ./configure: No such file or directory

The “configure” script is in your ROOT source code directory.

There is no configure file in directory


I have no idea where to look for it

For ROOT 6 you should use the CMake based building method.

I think CMake based building method is the one I used to install ROOT from a tarball. Can I now add Roofit to my ROOT?

Try cmake -Dall="ON" ... and it should find and and enable all optional components that are available on your system.

From which I directory should I run it?
I get:

/opt/ROOT/v6-10-02$ cmake -Dall="ON"
CMake Error: The source directory "/opt/ROOT/v6-10-02" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

Building ROOT

Now, do I need to:

  1. rebuild the whole ROOT
  2. OR simply add roofit to the existing ROOT

I tip on rebuilding it from scratch.

Should cmake -Dall="ON" ... be added to step 4 or 5 of Quick Start at