# IncrementalExecutor::executeFunction

**URL:** <https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468>\
**Category:** Newbie\
**Created:** [August 26, 2021, 5:10pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468 "2021-08-26T17:10:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aya\_Beshr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aya_beshr/32/27192_2.png) [@Aya\_Beshr](https://root-forum.cern.ch/u/Aya_Beshr)\
**Post date:** [August 26, 2021, 5:10pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/1 "2021-08-26T17:10:16Z")

</div>

Dear ROOT experts,

I have created a simple macro test.C using MakeClass method doing some plots. However, when I run it using commands:

.L test.C  
test m

**I get the following error:**  
IncrementalExecutor::executeFunction: symbol ‘\_ZN14TLorentzVectorC1Ev’ unresolved while linking function ‘\_GLOBAL\_\_sub\_I\_cling\_module\_113’!

You are probably missing the definition of TLorentzVector::TLorentzVector()  
Maybe you need to load the corresponding shared library?

I have searched for the shared library libPhysics.so that TLorentzVector needs, its found in rootbuild/lib directory, I tried to load it with various methods as:

gSystem-\>Load("/SGE/HEP/root/lib/libPhysics.so");

or in macro by,  
R\_\_LOAD\_LIBRARY(libPhysics)

but, either non of the two methods works and I get the same error.

More info:  
Platform: Centos7  
ROOT\_version: root-6.18.04  
Delphes\_version: Delphes-3.4.2 (used for creation of input data root file)

Actually, as a new user to root forum I couldn’t upload my macro.

Any help will be much appreciated.

Thanks,  
Aya

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [August 26, 2021, 5:32pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/3 "2021-08-26T17:32:51Z")

</div>

Try to move “`R__LOAD_LIBRARY(libPhysics)`” to a place before all “`#include`” statements.

---

<div class="post-metadata">

**Author:** ![Aya\_Beshr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aya_beshr/32/27192_2.png) [@Aya\_Beshr](https://root-forum.cern.ch/u/Aya_Beshr)\
**Post date:** [August 27, 2021, 1:09pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/4 "2021-08-27T13:09:59Z")

</div>

Hi,

Thanks a lot, I have tried this and it works, but I had another problem with loading libDelphes. I defined it in macro as : `R__LOAD_LIBRARY(/home/aya/programs/Delphes-3.4.2/libDelphes)` before all includes, but it gives an error :

> input\_line\_9:1:10: fatal error: ‘/home/aya/programs/Delphes-3.4.2/libDelphes’ file not found

despite the shared library location is true and exists in specified location. I also, tried to load it using `gSystem->Load(libDelphes);` , but I get the following errors:

> Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:  
> Missing FileEntry for ExRootAnalysis/ExRootTreeReader.h  
> requested to autoload type ExRootTreeReader

and many others related to ExRootAnalysis, despite I set its directory path in .bashrc file as :  
`export ROOT_INCLUDE_PATH=/home/aya/programs/Delphes-3.4.2/external/ExRootAnalysis/ `

Thanks,  
Aya

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [August 27, 2021, 1:58pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/5 "2021-08-27T13:58:43Z")

</div>

Try:  
`R__LOAD_LIBRARY(/home/aya/programs/Delphes-3.4.2/libDelphes.so)`  
and / or:  
`R__ADD_LIBRARY_PATH(/home/aya/programs/Delphes-3.4.2)`  
`R__LOAD_LIBRARY(libDelphes)`

---

<div class="post-metadata">

**Author:** ![Aya\_Beshr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aya_beshr/32/27192_2.png) [@Aya\_Beshr](https://root-forum.cern.ch/u/Aya_Beshr)\
**Post date:** [August 27, 2021, 2:14pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/6 "2021-08-27T14:14:43Z")

</div>

I tried both methods but, unfortunately, I am getting the same result. I also tried to define those variables in .bashrc file, which may be the same as the above method as:

> export LD\_LIBRARY\_PATH=/home/aya/programs/Delphes-3.4.2:$LD\_LIBRARY\_PATH  
> export ROOT\_INCLUDE\_PATH=/home/aya/programs/Delphes-3.4.2/external/  
> export ROOT\_INCLUDE\_PATH=/home/aya/programs/Delphes-3.4.2/classes/

but, I also get the same result. I have uploaded my macro, in case it is kindly needed!

More info:  
I have two machines with platforms: Centos7 and Ubuntu18.04 with the same root and delphes versions, I am currently working on Ubuntu.

Thanks,  
Aya  
[test.C](https://root-forum.cern.ch/uploads/short-url/yzTJnujbbUfZCaFZSBK31ObX1zz.C) (16.6 KB)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [August 27, 2021, 2:27pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/7 "2021-08-27T14:27:30Z")

</div>

`ls -al /home/aya/programs/Delphes-3.4.2/libDelphes.so`

---

<div class="post-metadata">

**Author:** ![Aya\_Beshr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aya_beshr/32/27192_2.png) [@Aya\_Beshr](https://root-forum.cern.ch/u/Aya_Beshr)\
**Post date:** [August 27, 2021, 2:32pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/8 "2021-08-27T14:32:48Z")

</div>

`-rwxrwxr-x 1 aya aya 4418344 أغس 27 12:18 /home/aya/programs/Delphes-3.4.2/libDelphes.so`

---

<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:** [August 27, 2021, 3:10pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/9 "2021-08-27T15:10:05Z")

</div>

The `ROOT_INCLUDE_PATH` needs to point to where `ExRootAnalysis/ExRootTreeReader.h` is - you have a duplicate `ExRootAnalysis/` in there. I.e. I expect this to work with `ROOT_INCLUDE_PATH=/home/aya/programs/Delphes-3.4.2/external:/home/aya/programs/Delphes-3.4.2/classes/` (your second `export` replaces the first one!)

---

<div class="post-metadata">

**Author:** ![Aya\_Beshr](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/aya_beshr/32/27192_2.png) [@Aya\_Beshr](https://root-forum.cern.ch/u/Aya_Beshr)\
**Post date:** [August 27, 2021, 5:36pm UTC](https://root-forum.cern.ch/t/incrementalexecutor-executefunction/46468/10 "2021-08-27T17:36:59Z")

</div>

Thanks, it is solved.
