[Rivet] [Rivet-svn] r2506 - trunk/pyext

Andy Buckley andy.buckley at ed.ac.uk
Wed Jun 23 10:25:28 BST 2010


Thanks Frank. This one's a bit mysterious to me: the $self approach is
the one mentioned in the official SWIG docs (although only in passing),
and it works fine on my machine. I guess we're seeing a SWIG version
issue there.

Anyway, I was feeling a bit dodgy about having ad hoc extended the
Analysis class interface in the Python wrapper, just to have an easy way
to write out beam pair strings, so I've just removed that %extend thing
entirely and put tailored string writing code into each of the Python
scripts that uses the metadata (rivet command line, and the LaTeX and
HTML doc generators).

Andy


On 22/06/10 21:08, blackhole at projects.hepforge.org wrote:
> Author: fsiegert
> Date: Tue Jun 22 21:08:46 2010
> New Revision: 2506
> 
> Log:
> Bugfix in python wrapper in the hope of making Hudson happy.
> 
> Modified:
>    trunk/pyext/rivet.i
> 
> Modified: trunk/pyext/rivet.i
> ==============================================================================
> --- trunk/pyext/rivet.i	Tue Jun 22 20:47:11 2010	(r2505)
> +++ trunk/pyext/rivet.i	Tue Jun 22 21:08:46 2010	(r2506)
> @@ -108,7 +108,7 @@
>    %extend Analysis {
>      std::vector<std::string> requiredBeamsNames() {
>        std::vector<std::string> rtn;
> -      foreach (const Rivet::PdgIdPair& bp, $self->info().beams()) {
> +      foreach (const Rivet::PdgIdPair& bp, self->info().beams()) {
>          std::string bps = Rivet::toBeamsString(bp);
>          rtn.push_back(bps);
>        }
> _______________________________________________
> Rivet-svn mailing list
> Rivet-svn at projects.hepforge.org
> http://www.hepforge.org/lists/listinfo/rivet-svn
> 


-- 
Dr Andy Buckley
SUPA Advanced Research Fellow
Particle Physics Experiment Group, University of Edinburgh


More information about the Rivet mailing list