Dear ROOT experts,
I have created a simple macro test.C using MakeClass method doing some plots. However, when I run it using commands:
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:
or in macro by,
but, either non of the two methods works and I get the same error.
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.
Try to move “
R__LOAD_LIBRARY(libPhysics)” to a place before all “
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 :
and / or:
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:
but, I also get the same result. I have uploaded my macro, in case it is kindly needed!
I have two machines with platforms: Centos7 and Ubuntu18.04 with the same root and delphes versions, I am currently working on Ubuntu.
test.C (16.6 KB)
ls -al /home/aya/programs/Delphes-3.4.2/libDelphes.so
-rwxrwxr-x 1 aya aya 4418344 أغس 27 12:18 /home/aya/programs/Delphes-3.4.2/libDelphes.so
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!)