|
[Rivet-svn] r2806 - trunk/binblackhole at projects.hepforge.org blackhole at projects.hepforge.orgThu Dec 2 18:07:39 GMT 2010
Author: holsch Date: Thu Dec 2 18:07:39 2010 New Revision: 2806 Log: Add method that downloads the AIDA datafile from HepDAta, closing ticket 410 Modified: trunk/bin/rivet-mkanalysis Modified: trunk/bin/rivet-mkanalysis ============================================================================== --- trunk/bin/rivet-mkanalysis Thu Dec 2 16:49:07 2010 (r2805) +++ trunk/bin/rivet-mkanalysis Thu Dec 2 18:07:39 2010 (r2806) @@ -109,6 +109,19 @@ KEYWORDS["ANABIBKEY"] = ANABIBKEY KEYWORDS["ANABIBTEX"] = ANABIBTEX + ## Try do download AIDA data file from hepdata + try: + import urllib + logging.debug("Getting data file from hepdata for '%s'" % ANANAME) + url = urllib.urlopen('http://hepdata.cedar.ac.uk/view/irn%s/aida'%ANASPIRESID) + f = open("%s.aida"%ANANAME, "w") + for line in url.readlines(): + f.write(line) + f.close() + url.close() + except Exception, e: + print "HepData Oops:", e + if opts.INLINE: INLINEMETHODS="""
More information about the Rivet-svn mailing list |