Loading Delphes and ExRootAnalysis libraries

Hi all,
I have a very very naive question, but I would really appreciate if you can help me with it. I’m trying to run a macro .C but I’m having some problemas when I try to load the Delphes and ExRootAnalysis libraries since my macro is located in another folder. I’ve unsuccessfully tried with the full path, so I’m wondering if there is a way to do it. Maybe I have to add both Delphes and ExRootAnalysis directories to my bashrc file, but I don’t know how to do it properly.
Any suggestion is welcome. Thank you in advance!
Sebastian

1 Like

Hi Sebastian,

I think the right way to load the necessary ROOT libraries and to access the headers containing the interfaces necessary for a macro to work is to set the LD_LIBRARY_PATH variable to the directory where the shared libraries and rootmap files of Delphes are located.

Cheers,
D

Hi Danilo,
Thank you so much! I apologize in advance for this, but could you address me about how to do it? I’m not sure if what I did is right:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/seba/Programs/MG5_aMC_v2.3.3/Delphes

Best,
Sebastian

Hi Sebastian,

that would work in bash, yes.

Cheers,
D

Hi Danilo,
I have that in mi bashrc file, but something is not working. I added the following line to my bashrc file:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/seba/Programs/MG5_aMC_v2.3.3/Delphes:/home/seba/Programs/MG5_aMC_v2.3.3/ExRootAnalysis

In my macro, I have

#include "classes/DelphesClasses.h"
#include "ExRootTreeReader.h"
#include "ExRootResult.h"

but I’m still getting this error:

In file included from input_line_12:9:
././LNVAnalysis.C:33:10: fatal error: 'classes/DelphesClasses.h' file not found
#include "classes/DelphesClasses.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~
Error in <ACLiC>: Dictionary generation failed!

Any suggestion about how to fix it is welcome!

Best,
Sebastian

Hi,

a workaround consists in setting the variable ROOT_INCLUDE_PATH which is formatted as LD_LIBRARY_PATH. On the other hand, real issue here is to understand why your Delphes installation does not have any rootmap.

Cheers,
D

Oh, I see… thank you so much!

Hi,
To clarify, should the “ROOT_INCLUDE_PATH” variable be set to something like “/path/to/delphes:”? I have something like that set up, however the ROOT examples provided with Delphes will only run from the Delphes folder itself. Similarly, some macros I wrote that include Delphes classes will only compile inside the Delphes folder – it seems like the ROOT compiler doesn’t know where Delphes is located? I see a mention of a “rootmap”. I don’t believe that my installation of Delphes 3.4.1 has one, although I built it following the provided instructions. I see some mention of the rootmap in this ROOT forum post, but it’s unclear to me if anything became of that.