In file included from input_line_8:1:
/home/amin/Documents/Backgrounds/copytree3.C:51:9: error: unknown type name 'MissingET’
MissingET met = (MissingET) branchMissingET->At(0);
^
/home/amin/Documents/Backgrounds/copytree3.C:51:27: error: use of undeclared identifier 'MissingET’
MissingET met = (MissingET) branchMissingET->At(0);
^
/home/amin/Documents/Backgrounds/copytree3.C:51:37: error: expected expression
MissingET met = (MissingET) branchMissingET->At(0);
Any idea why? ROOT 5 runs this script with out problems!
I fixed the path to libDelphes to become: /home/amin/Documents/Delphes-3.3.3/libDelphes.so
It seems it needs “.so” extension. However, I run into another problem now. It cannot find libCint.so and gives the error:
cling::DynamicLibraryManager::loadLibrary(): libCint.so: cannot open shared object file: No such file or directory
In file included from input_line_8:1:
/home/amin/Documents/Backgrounds/copytree3.C:3:10: fatal error: 'classes/DelphesClasses.h' file not found
#include "classes/DelphesClasses.h"
^
/home/amin/Documents/Backgrounds/copytree3.C:56:9: error: unknown type name 'MissingET'
MissingET *met = (MissingET*) branchMissingET->At(0);
^
/home/amin/Documents/Backgrounds/copytree3.C:56:27: error: use of undeclared identifier 'MissingET'
MissingET *met = (MissingET*) branchMissingET->At(0);
^
/home/amin/Documents/Backgrounds/copytree3.C:56:37: error: expected expression
MissingET *met = (MissingET*) branchMissingET->At(0);
In root/lib directory, the file libCint.so does not exist. However, it does exist in ROOT 5. I copied the file into the lib directory of ROOT 6 but it gave an error also:
Don’t copy libraries around, please This will leave a mess of inconsistent libraries.
You should not load libCint. Do you know where this is coming from?
Where is the file DelphesClasses.h? Where do you run the script? You can use R__ADD_INCLUDE_PATH(/some/dir/) to help your script find the relevant headers. Similar to -I passed to a compiler.
Thanks Axel.
The DelphesClasses.h is in the Delphes directory and, specifically, in the class subdirectory. I used R__ADD_INCLUDE_PATH to point the script to the place where the header files are. Now, I am no longer getting error from that, but from something else. This what I have now before the main():
If I specify R__LOAD_LIBRARY(libDelphes), i.e. removing “.so”, it gives an error: libDelphes cannot be found.
Also, it starts loading libCint.so when I place R__LOAD_LIBRARY(libDelphes.so) before the main.
I am using now Example2.C from the Delphes’ examples directory and I’m running it in ROOT 6.08 as .x Example2.C("filename.root").
If I load the library as R__LOAD_LIBRARY(libDelphes), I get:
input_line_10:1:10: fatal error: 'libDelphes' file not found
#include "libDelphes"
However, specifying “.so”, i.e. R__LOAD_LIBRARY(libDelphes.so) gives the same error I mentioned in the previous post.
I am attaching the file Example2.C so if you could, kindly, have a look at it.
I don’t have any lib directory in my Delphes. All there is is libDelphes.so which I am attaching here.
Also, what do you mean by building ROOT 6 against Delphes? I already have rootlogon.C file in ROOT 6 which points to where Delphes lives. Isn’t that enough?
Thanks for looking into this. Appreciate it.
I moved my ROOT file into the Delphes folder and executed Example2.C and it ran perfectly. It seems that R__ADD_INCLUDE_PATH was not enough so I had to set LD_LIBRARY_PATH in my .profile so it would catch libDelphes. Despite working perfectly inside Delphes directory, it is still giving me an error when running outside Delphes. However, the error did not prevent the histograms from being generated. The errors I am getting now are:
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootTreeReader.h
requested to autoload type ExRootTreeReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootTreeWriter.h
requested to autoload type ExRootTreeWriter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootTreeBranch.h
requested to autoload type ExRootTreeBranch
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootResult.h
requested to autoload type ExRootResult
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootClassifier.h
requested to autoload type ExRootClassifier
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootFilter.h
requested to autoload type ExRootFilter
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootProgressBar.h
requested to autoload type ExRootProgressBar
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
requested to autoload type ExRootConfParam
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootConfReader.h
requested to autoload type ExRootConfReader
Error in cling::AutoloadingVisitor::InsertIntoAutoloadingState:
Missing FileEntry for ExRootAnalysis/ExRootTask.h
requested to autoload type ExRootTask
I tried setting PATH to ExRootAnalysis but it didn’t solve the problem. If I only had one ROOT file I would transfer it to the Delphes directory and work there with out any problem but I have over 200 ROOT files and I don’t want to transfer all of them there. Do you see a solution to that?
I don’t understand that. What do you define in your .profile? I suspect it’s LD_LIBRARY_PATH. But that is for finding the library. You also need to find the headers - and that’s where ROOT_INCLUDE_PATH comes in.