[HepData-svn] r1820 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Thu Oct 9 17:30:04 BST 2014


Author: watt
Date: Thu Oct  9 17:30:04 2014
New Revision: 1820

Log:
Accommodate asymmetric errors when writing *dserror in input formatter

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java	Tue Sep 30 18:20:21 2014	(r1819)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java	Thu Oct  9 17:30:04 2014	(r1820)
@@ -81,7 +81,14 @@
             s.append("*plabkey: "+plab+"\n");
         }
         for (DatasetError de : ds.getErrors()){
-            s.append("*dserror: " + de.getPlus());
+            //s.append("*dserror: " + de.getPlus());
+	    // G.W. 09/10/2014 Accommodate asymmetric errors.
+	    s.append("*dserror: ");
+	    if(de.getPlus()==de.getMinus()){ 
+		s.append(de.getPlus());
+	    } else {
+		s.append("+" + de.getPlus() + ",-" + de.getMinus());
+	    }
             if(de.getNormType().toSymbol().equals("%")){s.append(" PCT");}
             s.append(" : " + de.getComment());
 	    s.append("\n");


More information about the HepData-svn mailing list