# Loading Delphes and ExRootAnalysis libraries

**URL:** <https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543>\
**Category:** Newbie\
**Created:** [November 11, 2018, 11:03pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543 "2018-11-11T23:03:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 11, 2018, 11:03pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/1 "2018-11-11T23:03:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 12, 2018, 7:55am UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/2 "2018-11-12T07:55:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 12, 2018, 9:10pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/3 "2018-11-12T21:10:19Z")

</div>

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:

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

```

Best,  
Sebastian

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 12, 2018, 9:27pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/4 "2018-11-12T21:27:08Z")

</div>

Hi Sebastian,

that would work in bash, yes.

Cheers,  
D

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 12, 2018, 9:52pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/5 "2018-11-12T21:52:28Z")

</div>

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

```auto
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

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

```

but I’m still getting this error:

```auto
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

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [November 13, 2018, 7:40am UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/6 "2018-11-13T07:40:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![surrutiaquir](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/ea666f/32.png) [@surrutiaquir](https://root-forum.cern.ch/u/surrutiaquir)\
**Post date:** [November 13, 2018, 10:31pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/7 "2018-11-13T22:31:16Z")

</div>

Oh, I see… thank you so much!

---

<div class="post-metadata">

**Author:** ![jaofferm](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jaofferm/32/21649_2.png) [@jaofferm](https://root-forum.cern.ch/u/jaofferm)\
**Post date:** [July 31, 2019, 11:00pm UTC](https://root-forum.cern.ch/t/loading-delphes-and-exrootanalysis-libraries/31543/8 "2019-07-31T23:00:08Z")

</div>

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](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033), but it’s unclear to me if anything became of that.
