Hi,
I’m trying to import an external C++ library, fastjet, into Root and use it through PyRoot. So far, I’ve sucessfully managed to import the library by running the commands:
import ROOT
ROOT.gSystem.AddIncludePath("-I/home/asopio/fastjet-install/include")
ROOT.gSystem.Load("/home/asopio/fastjet-install/lib/libfastjet")
This will let me run compiled macros, like the default fastjet example. If I run eg.
ROOT.gInterpreter.ProcessLine(".L short-example.cc++")
it compiles the C++ code and after it has run it will even let me access the fastjet classes through the PyRoot interface like:
pj = ROOT.fastjet.PseudoJet()
So far, so good! However, I’ve found no way to import the fastjet classes wthout running a piece of compiled code first. Running eg.
ROOT.gInterpreter.ProcessLine("#include <fastjet/PseudoJet.hh>")
gives the error
input_line_38:1:10: fatal error: 'fastjet/PseudoJet.hh' file not found
Is there a simple one-line command that I can run to include the fastjet library without needing to compile a .cc file first? I’m sure there must be a way to do this, given that I’ve seen examples on the web where the “#include” statements are simply passed to an interactive ROOT session.
Cheers,
Alex
ROOT Version:_ 6.26
Platform: Ubuntu 22.04
Compiler: Not Provided