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

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Mar 2 11:05:55 GMT 2011


Author: whalley
Date: Wed Mar  2 11:06:04 2011
New Revision: 1444

Log:
adding stat errors to root output

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 Mar  2 11:04:47 2011	(r1443)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/RootFormatter.java	Wed Mar  2 11:06:04 2011	(r1444)
@@ -87,6 +87,8 @@
                         StringBuffer yv = new StringBuffer("  double "+varname+"_yval[] = { ");
                         StringBuffer yem = new StringBuffer("  double "+varname+"_yerrminus[] = { ");
                         StringBuffer yep = new StringBuffer("  double "+varname+"_yerrplus[] = { ");
+                        StringBuffer ystatm = new StringBuffer("  double "+varname+"_ystatminus[] = { ");
+                        StringBuffer ystatp = new StringBuffer("  double "+varname+"_ystatplus[] = { ");
                         String sep = "";
                         for (int r = 1; r <= d.getMaxPointId(); ++r) {
                             Bin b = x.getBin(r);
@@ -110,6 +112,10 @@
                                 yem.append(sep + brk + dyminus.toString());
                                 Double dyplus = p.getQuadCombinedPlusError();
                                 yep.append(sep + brk + dyplus.toString());
+                                Double dystatminus = p.getStatMinusError();
+                                ystatm.append(sep + brk + dystatminus.toString());
+                                Double dystatplus = p.getStatPlusError();
+                                ystatp.append(sep + brk + dystatplus.toString());
                                 // Once we've seen a valid point, init the comma separator
                                 sep = ", ";
                             }
@@ -122,6 +128,8 @@
                         s.append(yv + " };\n");
                         s.append(yem + " };\n");
                         s.append(yep + " };\n");
+                        s.append(ystatm + " };\n");
+                        s.append(ystatp + " };\n");
                         s.append("  int "+varname+"_numpoints = " + d.getNumPoints() + ";\n");
 
                         // Append code to make the graph object


More information about the HepData-svn mailing list