# Issues related to Delphes/ExRootAnalysis

**URL:** <https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033>\
**Category:** ROOT\
**Created:** [March 27, 2015, 2:04am UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033 "2015-03-27T02:04:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vpascuzz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/58f4c7/32.png) [@vpascuzz](https://root-forum.cern.ch/u/vpascuzz)\
**Post date:** [March 27, 2015, 2:04am UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/1 "2015-03-27T02:04:23Z")

</div>

Hi,

I am using Madgraph5+Pythia6+Delphes-3.2.0 and am attempting to run Example1 (included in post, provided by Delphes). There are a number of issues that I am having:

1. Running a compiled Example1.cpp

I’ve tried using the binary as well as compiling, both versions ROOT 5.34 and 6.02. From what I can tell, the program is running normally (ExeROOT6.txt) using ROOT 6. However, no histograms are drawn. That is, nothing appears, not even an empty canvas. With ROOT5 I get:

```auto
./Example1 /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root 
dyld: Symbol not found: _gInterpreterMutex
  Referenced from: /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/./Example1
  Expected in: /Users/vincepascuzzi/sw/root/lib/libCore.so
 in /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/./Example1
Trace/BPT trap: 5
```

1. Running Example1.C as a macro

I’ve tried using the binary as well as compiling, both versions ROOT 5.34 and 6.02. In version \< 6 the Delphes library would not load:

```auto
root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
dlopen error: dlopen(/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so, 9): Symbol not found: _gInterpreterMutex
  Referenced from: /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
  Expected in: /Users/vincepascuzzi/sw/root/lib/libCore.so
 in /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
Load Error: Failed to load Dynamic link library /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/libDelphes.so
Warning: Return value of void Example1() ignored /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:16:
```

The errors trying version 6 are:

```auto
root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
In file included from input_line_24:1:
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:23:3: error: unknown type
      name 'ExRootTreeReader'
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
  ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:23:38: error: unknown type
      name 'ExRootTreeReader'
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
                                     ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:7: error: unknown type
      name 'Jet'
      Jet *jet = (Jet*) branchJet->At(0);
      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:19: error: use of
      undeclared identifier 'Jet'
      Jet *jet = (Jet*) branchJet->At(0);
                  ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:44:23: error: expected
      expression
      Jet *jet = (Jet*) branchJet->At(0);
                      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:53:5: error: unknown type
      name 'Electron'
    Electron *elec1, *elec2;
    ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:59:16: error: use of
      undeclared identifier 'Electron'
      elec1 = (Electron *) branchElectron->At(0);
               ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:59:26: error: expected
      expression
      elec1 = (Electron *) branchElectron->At(0);
                         ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:7: error: use of
      undeclared identifier 'elec2'
      elec2 = (Electron *) branchElectron->At(1);
      ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:16: error: use of
      undeclared identifier 'Electron'
      elec2 = (Electron *) branchElectron->At(1);
               ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:60:26: error: expected
      expression
      elec2 = (Electron *) branchElectron->At(1);
                         ^
/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C:63:40: error: use of
      undeclared identifier 'elec2'
      histMass->Fill(((elec1->P4()) + (elec2->P4())).M());
```

I’ve tried setting include directories from within ROOT using gROOT-\>ProcessLine(".include …") to no avail. When I add the following:

```auto
#include <classes/DelphesClasses.h>
#include <external/ExRootAnalysis/ExRootTreeReader.h>
```

when running from Delphes directory, and get another error:

```auto
root [0] .x /Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/Delphes-3.2.0/examples/Example1.C("/Users/vincepascuzzi/sw/MG5_aMC_v2_2_3/MY_PROCS/sm_pp_wpwm/Events/run_01/wpwm_ATLAS_7TeV_delphes_events.root")
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReader9ReadEntryEx' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReader9UseBranchEPKc' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN16ExRootTreeReaderC1EP5TTree' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
IncrementalExecutor::executeFunction: symbol '_ZN8Electron2P4Ev' unresolved while linking function'_Z15__cling_Un1Qu30Pv'!
```

I am on OS X 10.10.2. My environment is in env.txt. Please let me know if there is any additional information I can provide.

Thank you in advance,

Vince.  
[Example1.C](https://root-forum.cern.ch/uploads/default/original/2X/0/06dba12f20372dc42ed0cf577194dc5299bb8084.C) (1.96 KB)  
[Example1.cpp](https://root-forum.cern.ch/uploads/default/original/2X/e/e7dd9c88235bd61ebd444c89028cb1c280db3d52.cpp) (2.2 KB)  
[env.txt](https://root-forum.cern.ch/uploads/default/original/2X/0/0396b5642d09d4f7a83d1da31df28c34efaa4494.txt) (1.94 KB)

---

<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:** [March 27, 2015, 6:12am UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/2 "2015-03-27T06:12:09Z")

</div>

Hi,

I tried to compile delphes to reproduce these errors: I failed - tcl does not build on Kubuntu14 with clang 36 (error: invalid argument ‘-std=c++11’ not allowed with ‘C/ObjC’). Any suggestion to move forward apart from changing the cmake configuration?

Coming to your issue, it is a bit hard to understand what is going on from the errors you post.  
Two general suggestions about root6 could be:

1. Set the ROOT\_INCLUDE\_PATH to the delphes includes.
2. Make sure rootmaps are properly created and in the LD\_LIBRARY\_PATH in order for ROOT to load the approriate libraries

Cheers,  
Danilo

- 

By the way, with gcc49 one finds scary warnings like, even if I cannot judge if this could possibly ever affect the physics

```auto
Delphes/delphes/classes/DelphesStream.cc:94:31: warning: comparison of constant -9223372036854775808 with expression of type 'int' is always false [-Wtautological-constant-out-of-range-compare]
    if(fFirstLongMin && value == (-9223372036854775807L -1L)) 
```

---

<div class="post-metadata">

**Author:** ![pavel-demin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@pavel-demin](https://root-forum.cern.ch/u/pavel-demin)\
**Post date:** [March 27, 2015, 12:42pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/3 "2015-03-27T12:42:59Z")

</div>

Hi Danilo,

I’d suggest to build Delphes without using cmake.

The recommended commands to build it are  
wget [cp3.irmp.ucl.ac.be/downloads/Del … 2.0.tar.gz](http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.2.0.tar.gz)  
tar -zxf Delphes-3.2.0.tar.gz  
cd Delphes-3.2.0  
make -j 4

Cheers,

Pavel

---

<div class="post-metadata">

**Author:** ![pavel-demin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@pavel-demin](https://root-forum.cern.ch/u/pavel-demin)\
**Post date:** [March 27, 2015, 12:47pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/4 "2015-03-27T12:47:03Z")

</div>

Example1.C in Delphes relies on the ‘gSystem-\>Load(“libEvent”); Event\* e = new Event();’ feature of the ROOT 5 CLI.

According to

[root.cern.ch/drupal/content/way-root-6](https://root.cern.ch/drupal/content/way-root-6)

this feature is not supported in the ROOT 6 CLI.

So, we’ll need to adapt all the Delphes interpreted examples to ROOT 6.

All the compiled code works fine with ROOT 6.

---

<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:** [March 27, 2015, 1:06pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/5 "2015-03-27T13:06:06Z")

</div>

Hi Pawel,

thanks for the instructions: I did not follow the instructions and just used CMake once I saw CMakeLists ☹  
What you say is true: ROOT6 does not support yet dynamic scopes fully, i.e. it is not possible to load at runtime a library and have the names of its symbols available for the interpreter.  
The way in which many users accomplished the transition to ROOT6 is using rootmap files. The interpreter is able to autoload the necessary libraries with those while inspecting the macro. Is the rootmap file created for libevent? If not you can easily produce one adding these commands to the rootcint/cling invocation for creating the dictionary: "-rml [libEvent.so](http://libEvent.so) -rmf libEvent.rootmap"  
The file produced is in ASCII format and should reside where [libEvent.so](http://libEvent.so) is located (technically it is enough for it to be in the LD\_LIBRARY\_PATH).

Cheers,  
Danilo

---

<div class="post-metadata">

**Author:** ![vpascuzz](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/v/58f4c7/32.png) [@vpascuzz](https://root-forum.cern.ch/u/vpascuzz)\
**Post date:** [March 27, 2015, 1:26pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/6 "2015-03-27T13:26:42Z")

</div>

> [@pavel-demin](#):
>
> All the compiled code works fine with ROOT 6.

As I mentiond in my original post, compiling Example1.cpp runs, but no histograms are drawn (nothing shows up at all). Output says default canvas drawn but ROOT doesn’t even launch a canvas nor draws anything.

---

<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:** [March 27, 2015, 1:34pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/7 "2015-03-27T13:34:12Z")

</div>

Can you provide the input file you are using for Example1?

---

<div class="post-metadata">

**Author:** ![pavel-demin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@pavel-demin](https://root-forum.cern.ch/u/pavel-demin)\
**Post date:** [March 27, 2015, 1:44pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/8 "2015-03-27T13:44:16Z")

</div>

As I’ve already explained in the comments to your Delphes ticket:

[cp3.irmp.ucl.ac.be/projects/delphes/ticket/444](https://cp3.irmp.ucl.ac.be/projects/delphes/ticket/444)

The only purpose of the compiled Example1 is to demonstrate how to convert an existing ROOT macro (Example1.C) to an executable. This example was created to answer a question from a different ticket.

If you want it to show canvas, it should be modified.

---

<div class="post-metadata">

**Author:** ![pavel-demin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/p/eada6e/32.png) [@pavel-demin](https://root-forum.cern.ch/u/pavel-demin)\
**Post date:** [March 27, 2015, 2:23pm UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/9 "2015-03-27T14:23:49Z")

</div>

Danilo,

Thanks for the hint about the rootmap files. I did not know about them and I’ll try to add them to Delphes.

Could you point me to some documentation/examples on how to use them? With Google, I’ve only found the following forum thread:

[root.cern.ch/root/roottalk/roottalk10/0034.html](https://root.cern.ch/root/roottalk/roottalk10/0034.html)

This forum thread mentions a command called rlibmap but this command does not seem to be included with some of the prebuilt ROOT binaries. For example, it’s not available in root\_v6.02.05.macosx64-10.10-i386.tar.gz

Cheers,

Pavel

---

<div class="post-metadata">

**Author:** ![MFarooq786](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mfarooq786/32/20581_2.png) [@MFarooq786](https://root-forum.cern.ch/u/MFarooq786)\
**Post date:** [March 23, 2020, 7:42am UTC](https://root-forum.cern.ch/t/issues-related-to-delphes-exrootanalysis/19033/10 "2020-03-23T07:42:55Z")

</div>

Hi!  
In order to solve this puzzle you just have to do the following steps. just copy the files and paste in the root include directory “/home/youpath/root/include”  
The files you have to paste are these:  
ExRootTreeReader.h from the directory of “/home/youpath/work/MG5\_aMC\_v2\_7\_2/ExRootAnalysis/ExRootAnalysis”  
and the other two files are: DelphesClasses.h and SortableObject.h from the directory  
“/home/youpath/work/MG5\_aMC\_v2\_7\_2/Delphes/classes”.  
And just write these header files in your program  
#include \<DelphesClasses.h\>  
#include \<ExRootTreeReader.h\>
