# Trying to use root2lhco tool

**URL:** <https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368>\
**Category:** Newbie\
**Created:** [January 20, 2019, 3:07pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368 "2019-01-20T15:07:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gasar8](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gasar8/32/21054_2.png) [@gasar8](https://root-forum.cern.ch/u/gasar8)\
**Post date:** [January 20, 2019, 3:07pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368/1 "2019-01-20T15:07:38Z")

</div>

Hi,

I just installed ROOT on my Ubuntu 18.04 laptop, so I am new to it. I am working with MadGraph and trying to convert some .root results of different events to .lhco file for further MadAnalysis analysis. 😉 I have installed Delphes and also ExRootAnalysis. I added path to Delphes to .bashrc, so that I can call the tool root2lhco from anywhere, but when I try to run it, I get a very long error, which you can find in the appendix. As far as I was searching the internet I found some replies about adding the ROOT\_INCLUDE\_PATH variable, but now I am not sure, where to point it to. I already tried pointing it to Delphes, ROOT and ExRootAnalysis.

Can anybody please help me? Thank you in advance,  
gasar8

[error.txt](https://root-forum.cern.ch/uploads/default/original/3X/1/6/168563db7e5057e5df1cf6fc74ed7a773b55d39d.txt) (28.3 KB)

---

<div class="post-metadata">

**Author:** ![StephanH](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/c68b51/32.png) [@StephanH](https://root-forum.cern.ch/u/StephanH)\
**Post date:** [January 20, 2019, 10:03pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368/2 "2019-01-20T22:03:16Z")

</div>

Can you try to locate the ".pcm"s that cling looking for? We discussed such problems in this thread:

> [@Cannot find my rdict.pcm files](https://root-forum.cern.ch/t/cannot-find-my-rdict-pcm-files/21901/5):
>
> Hi, the \*rdict.pcm files can be put in the LD\_LIBRARY\_PATH. Cheers, Danilo

---

<div class="post-metadata">

**Author:** ![gasar8](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gasar8/32/21054_2.png) [@gasar8](https://root-forum.cern.ch/u/gasar8)\
**Post date:** [January 21, 2019, 10:28pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368/3 "2019-01-21T22:28:18Z")

</div>

Thank you for your answer. So I added the rdict.pcm to LD\_LIBRARY\_PATH and there is less error messages and it produces the output. However, in root file, there is 10 000 events, while in the output, there is only 2500? I also still get some errors (included in appendix) - from the requested link/topic, I found that .h files should be included to ROOT\_INCLUDE\_PATH, so I added the .h files from the error messages to the path, but the error is still there.

Thank you again!

[error2.txt](https://root-forum.cern.ch/uploads/default/original/3X/a/3/a34c69be9b138feef81f5a1cdd55a8a81f06aa52.txt) (721 Bytes)

---

<div class="post-metadata">

**Author:** ![Axel](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/axel/32/11084_2.png) [@Axel](https://root-forum.cern.ch/u/Axel)\
**Post date:** [January 22, 2019, 1:16pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368/4 "2019-01-22T13:16:16Z")

</div>

Hi,

Don’t add the headers to ROOT\_INCLUDE\_PATH but only the directory necessary to find `ExRootAnalysis/ExRootConfReader.h` etc. I.e. if you have `/my/home/delphes/exroot/ExRootAnalysis/ExRootConfReader.h`, `ROOT_INCLUDE_PATH` should be `/my/home/delphes/exroot`.

Regarding the number of entries: as we don’t know what `root2lhco` does (that’s not a ROOT thing) we won’t be able to be of much help with it. Maybe ask the Delphes people?

Cheers, Axel.

---

<div class="post-metadata">

**Author:** ![gasar8](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gasar8/32/21054_2.png) [@gasar8](https://root-forum.cern.ch/u/gasar8)\
**Post date:** [January 22, 2019, 3:41pm UTC](https://root-forum.cern.ch/t/trying-to-use-root2lhco-tool/32368/5 "2019-01-22T15:41:06Z")

</div>

Thank you very much for your reply, that solved every problem. 👍 🙂  
It still produces only 2499 events, but I will search for help elsewhere.
