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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Jun 23 15:57:42 BST 2010


Author: buckley
Date: Wed Jun 23 15:57:52 2010
New Revision: 1369

Log:
That last one worked! Except that the ROOT interpreter sometimes loses characters when being pasted into... don't ask. This commit just tidies up a little (or should so) to put the array commas *before* the line-breaks.

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

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/RootFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/RootFormatter.java	Wed Jun 23 15:20:24 2010	(r1368)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/RootFormatter.java	Wed Jun 23 15:57:52 2010	(r1369)
@@ -93,28 +93,23 @@
                             Point p = y.getPoint(r);
                             if (b != null && p != null) {
                                 // The ROOTCINT interpreter seems to die if passed long lines!
+                                String brk = "";
                                 if (r % 10 == 0) {
-                                    String brk = "\n    ";
-                                    xv.append(brk);
-                                    xem.append(brk);
-                                    xep.append(brk);
-                                    yv.append(brk);
-                                    yem.append(brk);
-                                    yep.append(brk);
+                                    brk = "\n    ";
                                 }
 
                                 Double xval = b.getFocus();
-                                xv.append(sep + xval.toString());
+                                xv.append(sep + brk + xval.toString());
                                 Double dxminus = b.getDMinus();
-                                xem.append(sep + dxminus.toString());
+                                xem.append(sep + brk + dxminus.toString());
                                 Double dxplus = b.getDPlus();
-                                xep.append(sep + dxplus.toString());
+                                xep.append(sep + brk + dxplus.toString());
                                 Double yval = p.getValue();
-                                yv.append(sep + yval.toString());
+                                yv.append(sep + brk + yval.toString());
                                 Double dyminus = p.getQuadCombinedMinusError();
-                                yem.append(sep + dyminus.toString());
+                                yem.append(sep + brk + dyminus.toString());
                                 Double dyplus = p.getQuadCombinedPlusError();
-                                yep.append(sep + dyplus.toString());
+                                yep.append(sep + brk + dyplus.toString());
                                 // Once we've seen a valid point, init the comma separator
                                 sep = ", ";
                             }


More information about the HepData-svn mailing list