|
[Rivet] problem with Analysis::divide?James Monk jmonk at hep.ucl.ac.ukFri Dec 14 12:05:12 GMT 2012
Anyone..? In case I wasn't clear, this is causing a seg-fault at runtime James On 10 Dec 2012, at 19:30, James Monk wrote: > Hi, > > I think there's a problem with the histogram divide method on the YODA-fied version of Rivet. It takes a pointer to a scatter plot for the result, thus: > > void Analysis::divide(const Histo1D & h1, const Histo1D & h2, Scatter2DPtr s) const > > and then assigns > > *s = h1 / h2; > > but that / operator returns a temporary that is not valid outside of the divide method. I'm not sure what the intent is here - should it be > > s = new Scatter2DPtr(h1 / h2); > > but in that case, why not do away with passing the pointer in and just return it? > > cheers, > > James > _______________________________________________ > Rivet mailing list > Rivet at projects.hepforge.org > http://www.hepforge.org/lists/listinfo/rivet
More information about the Rivet mailing list |