|
[yoda-svn] r457 - in trunk: bin pyext/yoda/includeblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed May 2 17:43:26 BST 2012
Author: hoeth Date: Wed May 2 17:43:26 2012 New Revision: 457 Log: adding simple yoda2aida converter Added: trunk/bin/yoda2aida (contents, props changed) Modified: trunk/pyext/yoda/include/99-ReaderYODA.pyx Added: trunk/bin/yoda2aida ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/bin/yoda2aida Wed May 2 17:43:26 2012 (r457) @@ -0,0 +1,22 @@ +#! /usr/bin/env python + +"""\ +%prog yodafile aidafile +""" + +import yoda, sys +from optparse import OptionParser + + +if __name__ == "__main__": + + parser = OptionParser(usage=__doc__) + opts, args = parser.parse_args() + + if len(args) != 2: + sys.stderr.write("need to specify yoda and aida file name\n") + sys.exit(1) + + analysisobjects = yoda.ReaderYODA().read(args[0]) + yoda.WriterAIDA().write(args[1], analysisobjects) + Modified: trunk/pyext/yoda/include/99-ReaderYODA.pyx ============================================================================== --- trunk/pyext/yoda/include/99-ReaderYODA.pyx Wed May 2 17:20:04 2012 (r456) +++ trunk/pyext/yoda/include/99-ReaderYODA.pyx Wed May 2 17:43:26 2012 (r457) @@ -20,6 +20,8 @@ out.append(Histo1D_fromptr(<cHisto1D*>vec[i], True)) elif ana_.type == 'Profile1D': out.append(Profile1D_fromptr(<cProfile1D*>vec[i], True)) + elif ana_.type == 'Scatter2D': + out.append(Scatter2D_fromptr(<cScatter2D*>vec[i], True)) return out
More information about the yoda-svn mailing list |