rebdsim gives compilation error for ROOT without Eve

Issue #140 resolved
Jochem Snuverink created an issue

When I link against a ROOT without Eve, I get the following error:

../bdsim/analysis/EventDisplay.cc:9:25: fatal error: TEveManager.h: No such file or directory
 #include "TEveManager.h"

It would be good to check somehow if ROOT has Eve support and decide to compile rebdsim based on that (since the error might stop compiling the not-affected bdsim binary)

I couldn't find for sure how to properly check this, but I think one can check if ROOT has OpenGL:

root-config --has-opengl

Comments (8)

  1. Laurie Nevay

    Although this is rebdsim, it's only the event display that causes this problem. I looked into this and as you found root-config doesn't identify eve as a separate feature, only opengl. The LXPLUS build of root we use, has this so it should work, but it doesn't seem to. This only seems to be a problem on LXPLUS.

    My idea was to split edbdsim into a separate directory / library so it can be turned on and off given different dependencies and link against rebdsim lib. Also note, the rebdsim lib is doubly named with lib. This way, it could be turned off for LXPLUS build.

    I propose we make a separate directory / library called 'eventdisplay'.

  2. Jochem Snuverink reporter

    Yes, I also noticed EventDisplay class is not used for rebdsim but only for the event display (edbdsim), which is not even made for ROOT5. For ROOT5, it should be removed from rebdsim sources, that will also solve the issue (for me). Shall I do this?

    There is already a separate library for edbdsim, but a separate directory is also possible. But please discuss it with @stewartboogert. If a separate directory, then the CMakeLists.txt should be cleverly separated, and not duplicated.

  3. Laurie Nevay

    We talked about this a few weeks ago and agreed it has to be fixed / separated, but no one has since done it.

    I had a look at analysis/CMakeLists.txt and the large complex bit of cmake starts with a for_each (header) where header is a file in a list. It looks like this chunk could be made into a function - looking through, it'd need reference to an external list (in this one called) rebdsimLibSources, athough it depends if the function encapsulates the for loop. If we could make it a function, there would hardly be any duplication - just different file list names. Is this possible in CMake?

    That being said, the (smaller) root5 chunk doesn't apply to event display.

  4. Jochem Snuverink reporter

    Yes, sure you can make functions (new scope) or macros (no new scope). There are some in cmake/Modules/bdsim_macros.cmake or some provided from ROOT in cmake/Modules/FindROOT.cmake that could be used or adapted.

    Note that analysis/CMakeLists.txt is largely copied from cmake/ROOT.cmake already.

    Yes, for root5 EventDisplay.cc is still compiled. I agree that a better separation would be good. I'll just fix it for my version locally then without pushing.

  5. Laurie Nevay
    • edited description
    • changed status to resolved

    ROOT does not identify EVE as a feature in root-config so it's not possible to test against whether a build has it or not. Eve is broken in their most recent release (6.12), which they have not patched in a few months. I have made th event display an optional component with USE_EVENTDISLAY in cmake. Turning this off will prevent this error and allow successful compilation.

    We could perhaps link this to the USE_AFS option as the build there also has broken eve libs last I checked (although this was a while back).

  6. Log in to comment