|
[Rivet] mkhtml config optionsAndy Buckley andy.buckley at cern.chMon Jun 8 20:42:18 BST 2015
On 08/06/15 11:22, David Grellscheid wrote: > Hi Frank, > >> does the second option described here: >> https://rivet.hepforge.org/make-plots.html#_configuration_files >> not work anymore? > > Ah, thanks! That's what I was remembering. But it only works in > make-plots, not in rivet-mkhtml. We'll need to fix that. Hi David, I made a useful step towards this today, by finishing off an earlier idea for filtering which analysis objects are loaded by the yoda.read() functions. The read functions now take optional strings, regex objects, or iterables of them, as match & unmatch patterns. It passes a new test that I added, which gives the idea: $ cat tests/pytest-iofilter #! /usr/bin/env python import yoda aos = yoda.read("test1.yoda", False, patterns=r".*_(eta|mass)_(2|4)") print aos assert len(aos) == 4 import re aos = yoda.read("test1.yoda", False, patterns=[r".*_y_(1|3)", re.compile(r".*_dphi_(2|4)")]) print aos assert len(aos) == 3 I'm looking into using this with reinstated -m,-M options to rivet-cmphistos now; hopefully it'll be as trivial as just passing the command line options to the YODA function. I think this is the best way to do it: put as much comparison & plot assembling logic as possible into the libraries, and let the scripts be very thin UI wrappers on the module functionality. Then we can reduce duplication, and it's also useful to users who want to write a customised comparison script. Andy -- Dr Andy Buckley, Lecturer / Royal Society University Research Fellow Particle Physics Expt Group, University of Glasgow
More information about the Rivet mailing list |