Home | News | Documentation | Download

Loading Delphes and ExRootAnalysis libraries


#1

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


#2

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


#3

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


#4

Hi Sebastian,

that would work in bash, yes.

Cheers,
D


#5

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


#6

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


#7

Oh, I see… thank you so much!