Output Classes can't be constructed interactively

Issue #197 resolved
Laurie Nevay created an issue

Opening an issue so we don't forget.

I cannot instantiate / use the analysis classes (Event, Model, Run etc) in the root interpreter. This is reproducible on Mac and SLC68.

The error is due to not finding a header from the main repository for an output class.

As per the instructions in the manual, I modify my environment in my profile with:

export BDSIM=/Users/nevay/physics/reps/bdsim-develop-install
export PATH=$PATH:$BDSIM/bin
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$BDSIM/lib

I have the following root logon macro (rootlogon.C) in the root installation dir:

/Users/nevay/physics/packages/root-6.06.06-install/macros

gSystem->Load("/Users/nevay/physics/reps/bdsim-develop-install/lib/librebdsimLib");

In all cases, I get the error attached in the screenshot.

Screen Shot 2017-06-14 at 11.32.38.png

Comments (8)

  1. Stewart Boogert

    Fixed this by changing rootcling/cint with flag -noIncludePaths and -inlineInputHeader

    Requires the setting of environment ROOT_INCLUDE_PATH

    export ROOT_INCLUDE_PATH=/home/accsoft/SL68/software/Bdsim/SBTest-GCC-4.9.3/include/bdsim/:/home/accsoft/SL68/software/Bdsim/SBTest-GCC-4.9.3/include/bdsim/analysis/
    
  2. Jochem Snuverink

    Another way to fix this is to add the needed include paths to your root logon macro as is done in examples/features/analysis/0_output/loadLibraries.C.in, something like:

      gSystem->AddIncludePath("-I/home/scratch/bdsim/analysis");
      gInterpreter->AddIncludePath("-I/home/scratch/bdsim/analysis");
      gInterpreter->AddIncludePath("-I/home/scratch/bdsim/include");
      gInterpreter->AddIncludePath("-I/home/scratch/bdsim");
    
  3. Laurie Nevay reporter

    Stewart says apparently this last comment is wrong and doesn't work. The ROOT_INCLUDE_PATH environmental variable must be used. Only this line is necessary in a root logon macro:

    gSystem->Load("librebdsimLib");
    
  4. Jochem Snuverink

    Stewart says apparently this last comment is wrong and doesn't work.

    Did it not work for you? Well at least these were working for me without setting the ROOT_INCLUDE_PATH path, while now the interactive tests (root-) are failing, also on the linappserv cdash server.

  5. Laurie Nevay reporter

    It didn't work for me either - this took quite some time of trial to find out. The only thing that worked was the ROOT_INCLUDE_PATH. Sadly, the ROOT documentation isn't so clear about all of this.

    I'll fix the tests - the environmental variable isn't set. I'd expect them to work after that.

    Eitherway, we should be able to have a consistent approach for both platforms.

  6. Jochem Snuverink

    Okay strange. ROOT_INCLUDE_PATH works for me too, so let's go for that then. It would be great to get a Mac with clang on the test server to detect these differences earlier.

  7. Log in to comment