Output Classes can't be constructed interactively
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.
Comments (8)
-
-
- changed status to resolved
-
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");
-
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");
-
reporter I've updated the manual and setup instructions appropriately.
-
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.
-
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.
-
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.
- Log in to comment
Fixed this by changing rootcling/cint with flag -noIncludePaths and -inlineInputHeader
Requires the setting of environment ROOT_INCLUDE_PATH