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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue May 1 09:54:58 BST 2012


Author: whalley
Date: Tue May  1 09:54:58 2012
New Revision: 1536

Log:
output all of second x

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java	Tue May  1 09:54:09 2012	(r1535)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/PlainFormatter.java	Tue May  1 09:54:58 2012	(r1536)
@@ -183,7 +183,11 @@
             s.append("x\t");
             s.append("xlow\t");
             s.append("xhigh\t");
-            for (int ix=1; ix<x.getDataset().getXAxes().size(); ix++){s.append("x" + Integer.toString(ix+1) + "\t");} 
+            for (int ix=1; ix<x.getDataset().getXAxes().size(); ix++){
+                s.append("x" + Integer.toString(ix+1) + "\t");
+                s.append("x" + Integer.toString(ix+1) + "low\t");
+                s.append("x" + Integer.toString(ix+1) + "high\t");
+            } 
             for ( YAxis yax : d.getYAxes()){
                s.append("y\t");
                if(yax.getPoints().size()>0) {
@@ -206,7 +210,9 @@
                     template = "$xfocus$\t$xlow$\t$xhigh$";
                     for (int ix=1; ix<x.getDataset().getXAxes().size(); ix++){
                         template=template.concat("\t$val" + Integer.toString(ix) + "$");
-                    } 
+                        template=template.concat("\t$val" + Integer.toString(ix) + "low$");
+                        template=template.concat("\t$val" + Integer.toString(ix) + "high$");
+                   } 
 //                    template=template.concat("\t$yval$");
                     row.setTemplate(template);
                     row.setAttribute("xfocus", xfocus);
@@ -214,6 +220,8 @@
                     row.setAttribute("xhigh", xhigh);
                     for (int ix=1; ix<x.getDataset().getXAxes().size(); ix++){
                         row.setAttribute("val" + Integer.toString(ix),x.getDataset().getXAxis(ix+1).getBin(r).getFocus());
+                        row.setAttribute("val" + Integer.toString(ix)+"low",x.getDataset().getXAxis(ix+1).getBin(r).getLowValue());
+                        row.setAttribute("val" + Integer.toString(ix)+"high",x.getDataset().getXAxis(ix+1).getBin(r).getHighValue());
                     } 
                     s.append(row.toString());
                     for (int ny=1; ny<=p.getYAxis().getDataset().getYAxes().size(); ny++ ) {


More information about the HepData-svn mailing list