[Rivet] Plot multiple histograms from one yoda on same canvas

Christian Johnson christian.johnson at cern.ch
Tue Mar 24 15:02:52 GMT 2015


I think you are right in guessing that Python is trying to regenerate the core.cpp file. I compared your “core.cpp” file to the “core.cpp” file in a freshly downloaded copy of YODA-1.3.1 with diff and found no differences. Then I started to build the source code and ran into the error again. After this, I compared the two files again and saw a large number of differences.

I have attached the diff file. I also see that you are using Cython 0.20 and I am using 0.22. I am not sure how much this matters though because I also used 0.22 to successfully build Yoda 1.3.0.

Cheers,
Christian



> On Mar 24, 2015, at 6:52 AM, Andy Buckley <a.g.buckley at gmail.com> wrote:
> 
> Hi Christian,
> 
> I've copied in the other YODA authors. I don't know what could be going
> on there -- I've tested for a long time on my Linux laptop, and before
> release I also tested that it builds on a couple of Scientific Linux
> systems. I just checked now and it also built ok on our OS X build
> testing machine (although we do have issues with that test system
> configuration at the moment).
> 
> I also just looked at the version of pyext/yoda/core.cpp on my machine
> and it doesn't seem to line up with the line numbers that you've got. In
> fact, I couldn't even find '__pyx_t_5 = __pyx_t_2->bins()' in my
> core.cpp file, although there were some similar things. I wouldn't
> expect this error (a bin type mismatch in the Python interface build) to
> succeed for some compilers and not others. It looks to me like you've
> somehow got an old version of core.cpp... or is it possible that a
> version of Cython on your machine tried to regenerate it?
> 
> Maybe someone Mac-based can also try out the new YODA 1.3.1 and let us
> know their experience...
> 
> Thanks for reporting; hopefully we can figure this out quickly.
> Andy
> 
> PS. I will email you my copy of core.cpp privately, since it's 3.6 MB,
> but it should be the same as that from the tarball.
> 
> 
> On 24/03/15 01:47, Christian Johnson wrote:
>> Hi Andy,
>> 
>> Thanks for this! I looked through it in the source code and it appears
>> to be very useful. Unfortunately I am having some troubles upgrading.
>> When compiling on my Mac (OS X 10.10.2) I run into this error:
>> 
>> gcc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include
>> -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall
>> -Wstrict-prototypes -I/Users/Alex/Desktop/yoda/include -Iyoda
>> -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7
>> -c yoda/core.cpp -o build/temp.macosx-10.10-x86_64-2.7/yoda/core.o
>> -I/usr/local/include -Wno-sign-compare -Wno-strict-prototypes
>> *yoda/core.cpp:38593:15: **error: **no viable overloaded '='*
>>    __pyx_t_5 = __pyx_t_2->bins().at(__pyx_v_i);
>> *    ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
>> *yoda/core.cpp:213:7: note: *candidate function (the implicit copy
>> assignment operator) not viable: no known conversion from 'value_type'
>>      (aka 'YODA::HistoBin2D') to 'const
>> __Pyx_FakeReference<YODA::HistoBin1D>' for 1st argument
>> class __Pyx_FakeReference {
>> 
>> Cheers,
>> Christian
>> 
>> 
>>> On Mar 19, 2015, at 6:29 PM, Andy Buckley <a.g.buckley at gmail.com
>>> <mailto:a.g.buckley at gmail.com <mailto:a.g.buckley at gmail.com>>> wrote:
>>> 
>>> On 06/03/15 22:18, Christian Johnson wrote:
>>>> Hi Rivet team,
>>>> 
>>>> I have a feature request. There may already be a method for this, if
>>>> so then please let me know.
>>>> 
>>>> I have run into a few occasions where it is useful to compare several
>>>> plots from the same yoda file (e.g. control region distribution
>>>> comparison, etc…) on the same canvas. I have not been able to figure
>>>> out a simple way to do this other than building the “*.dat” file
>>>> myself and then using make-plots. I am sure there is an easier way
>>>> using the YODA framework.
>>> 
>>> Hi Christian,
>>> 
>>> We don't have a ready-made script in Rivet for that, but I just released
>>> a new version of YODA (1.3.1) which includes a new yoda.plotting Python
>>> module and yodaplot script that might help. There is also a yodacmp
>>> script which might be worth look at as an example of how to
>>> programmatically make .dat files that could be plotted with yodaplot or
>>> make-plots.
>>> 
>>> We're looking to improve the plotting and plot handling functionality
>>> over time, although it's definitely a side-project relative to the Rivet
>>> physics content. So please let us know what does and doesn't work for you!
>>> 
>>> Cheers,
>>> Andy
>>> 
>>> -- 
>>> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
>>> Particle Physics Expt Group, University of Glasgow
>> 
> 
> 
> -- 
> Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
> Particle Physics Expt Group, University of Glasgow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20150324/5bbc6c1d/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff_corecpp.txt
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20150324/5bbc6c1d/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20150324/5bbc6c1d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3427 bytes
Desc: not available
URL: <https://www.hepforge.org/lists-archive/rivet/attachments/20150324/5bbc6c1d/attachment.bin>


More information about the Rivet mailing list