|
[Rivet] rivet2 for genser validation.Dmitri Konstantinov Dmitri.Konstantinov at cern.chFri Nov 15 21:13:11 GMT 2013
Many thanks , Andy! For the moment it is more that enough :) We will keep you posted. Cheers, Dima On 11/15/13 9:19 PM, Andy Buckley wrote: > On 13/11/13 17:15, Dmitri Konstantinov wrote: >> Hi Andy, >> >> We would like to start using rivet2 for GENSER regression tests. >> First idea is to use simple rivet analyses like MC_XS, MC_WJETS, >> MC_ZJETS etc. It least it looks like a good way. >> And therefore I have a question: what is a best way to analyze/parse >> yoda files? >> It can be done by some regexp parsing...But I don't really like it. >> Is there any way to open them with yoda(python) and access/dump >> observables to some formatted file? >> If yes then could you provide an example? > Hi Dmitri, > > Sounds good: let us know if we can help. > > Yes, YODA has its own parser and Python interface: definitely use that > rather than trying to write your own! If you have a .yoda file, you can > read it like this (if I remember correctly): > >>>> import yoda >>>> histos = yoda.read("myfile.yoda") >>>> for h in histos: print h.path >>>> b = histos[0].bins[0] >>>> print b.width, b.height, b.heightErr, b.sumW > YODA can also do conversion to ROOT objects/files if you want, or plot > using our own plotter (which produces nicer-looking output (we think) > but is less familiar and could benefit from finishing some work which we > began to speed it up and make it more powerful. > > Hope that helps, > Andy >
More information about the Rivet mailing list |