[Rivet] Query/fix on behaviour of plotparser

Andy Buckley andy.buckley at cern.ch
Sat Aug 19 10:28:06 BST 2017


Yep, I agree. I doubt anyone's relying on this behaviour, and it does 
seem undesirable. So thanks, and please commit your fix!

(Best to do it on the release-2-5-x branch, and I'll pull in on to the 
default branch for the 2.6.0 release.)

Andy


On 18/08/17 15:10, Frank Siegert wrote:
> Hi Jon,
> 
> I think this is fine.
> 
> If I understand correctly you don't remove the looping over the
> "addfiles". Those are necessary for rivet-mkhtml -c (and
> rivet-cmphistos -c) and should indeed be allowed to overwrite any
> previous settings like currently implemented.
> For the plotpaths on the other hand I don't see a good reason for the
> current behaviour and have not used that functionality to combine
> multiple plot files myself.
> 
> Cheers,
> Frank
> 
> 
> 
> On 18 August 2017 at 15:48, Jonathan Butterworth
> <J.Butterworth at ucl.ac.uk> wrote:
>> Hi all,
>>
>> A while ago I mentioned that I was having problems with rivet apparently not
>> respecting the users' choice of paths for plotinfo files.
>> Specifically, ATLAS_2012_I1203852.plot is buggy in the rivet release and
>> this causes problems for Contur, in that the plotparser we use doesn't
>> appear to pick up our fixed version of our file. (A fix has also been
>> committed to rivet.)
>>
>> The relevant file in rivet is plotinfo.py
>>
>> The problem is not that the path isn't known to rivet, but that the loop in
>> the getSection method continues and reads all versions of the plotinfo file
>> that it finds. The problem then is;
>>
>> - it reads the user version first, which is then potentially overwritten by
>> the official (buggy) version.
>>
>> I tried reversing the loop direction (there's even a comment already there
>> to this effect) but then there is still the case that
>>
>> - if the problem with the official version is actually an unwanted
>> attribute, this won't get overwritten/removed by the fixed version anyway.
>>
>> ... which is actually the problem here.
>>
>> I have attached a version of plotinfo.py which works for contur now because
>> it reads only the first valid plotinfo file it finds which is the users
>> version. (The user also can still feed extra files to this method, which
>> will be also searched for plot attributes.)
>>
>> However, this isn't a simple bug fix, it is a change in behaviour, which
>> might have implications elsewhere so I thought I should consult here before
>> committing.
>>
>> If no one care enough to comment, I'll commit it anyway, since this seems
>> like the optimal behaviour to me.
>> Cheers,
>> Jon
>>
>>
>>
>> Cheers,
>> Jon
>>
> _______________________________________________
> Rivet mailing list
> Rivet at projects.hepforge.org
> https://www.hepforge.org/lists/listinfo/rivet
> 


-- 
Dr Andy Buckley, Lecturer / Royal Society University Research Fellow
Particle Physics Expt Group, University of Glasgow


More information about the Rivet mailing list