[Rivet] pluggable analyses?

Lars Sonnenschein sonne at mail.cern.ch
Wed Nov 7 14:22:44 GMT 2007


Hello Andy
let me first clarify that I put the libRivetMyAnalysis.so shared library,
produced via 
g++ -o libRivetMyAnalysis.so -shared MyAnalysis.cc MyAnalysisLoader.cc 
-I../../include -I../../../../local/include
in the prefix/lib location, which is supposed to be the first place to be 
looked at according to the description on the web.
Indeed if I add the environment variable RIVET_ANALYSIS_PATH
(syntax as given on the web) it does not make a difference.

The MyAnalysisLoader.cc code is copied from the StdAnalyses.cc file,
augmented by the lines:

#include "Rivet/Analyses/MyAnalysis.hh"

fns["MYANALYSIS"] = Rivet::MyAnalysis::create;

Now looking at the debugging output when executing rivet -h 
the crucial line seems to be:

      4840:     /build/sonne/local/lib/libRivetMyAnalysis.so: error: 
symbol lookup error: undefined symbol: _ZTVN5Rivet10ZPhys73C11E (fatal)
Cannot open /build/sonne/local/lib/libRivetMyAnalysis.so: 
/build/sonne/local/lib/libRivetMyAnalysis.so: undefined symbol: 
_ZTVN5Rivet10ZPhys73C11E

Now if I comment out the ZPhys analysis in StdAnalyses.cc, the next one in 
front of it gives the offending statement.

What's going on?

	     Lars

P.S.: Let me emphasize again that it is working fine, if I add MyAnalysis 
to the StdAnalyses.cc file and the corresponding Makefile.am's (the 
"easy way") 


On Wed, 7 Nov 2007, Andy Buckley wrote:

> Lars Sonnenschein wrote:
> > Hello all
> > as promised to Mikhail
> > I tried the description according to the web, to plug in a user analysis.
> > 
> > It is working fine the "easy way" which is explained there first.
> > (this means adding the new analysis to the existing Rivet.so shared library
> > and adding it's name to the StdAnalyses code)
> > 
> > But when I try the way to get the analysis linked into an external library
> > the newly created shared library, including the analysis and the necessary
> > piece of code from the StdAnalyses file, the new user analysis is not
> > available under the Rivet/Gun help options.
> > 
> > Even if I put the additional shared library into the global lib path, where
> > I have all the libraries (Rivet, RivetGun, Pythia etc.)
> > 
> > Am I missing something?
> > 
> > Can somebody please confirm that it is working for her/him?
> 
> Well, it works for me, otherwise it wouldn't be in there! I'd need proper
> debug information to work out why it doesn't work for you. Without knowing
> what environment variables exist, whether you've provided the factory builder
> function, what the name of the external lib is, etc. I can't be very helpful!
> For example, try running rivet (not rivetgun) with LD_DEBUG=libs, e.g.
> 
> LD_DEBUG=libs rivet -h
> 
> This will give you information on all the library loading attempts made by the
> executable. You might also want to try (temporarily) putting a debug cout into
> the AnalysisLoader functions to see which directories and libraries are being
> scanned.
> 
> At the risk of being obvious, I assume your library has an appropriate name,
> i.e. libRivet*.so? And you've tried setting the RIVET_LIBRARY_PATH? (check the
> name... I think that's right but no guarantee)
> 
> Andy
> 

-- 

 
________________________________
Lars Sonnenschein    
________________________________
Home Institution:
PH/TH 4/1-030 
CERN
CH-1211 Geneve 23
Switzerland
Tel.:+41(22)767-2827
--------------------------------
________________________________
FNAL:
D0, PK151
Mailstop #352
Fermilab, P.O.Box 500
Batavia, IL 60510-500
Tel.: +1(630)840-8740
________________________________


More information about the Rivet mailing list