|
[HepData-svn] r1452 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/componentsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgMon Apr 11 10:11:46 BST 2011
Author: whalley Date: Mon Apr 11 10:11:46 2011 New Revision: 1452 Log: outputting the Dataset/Axis errors in the table header Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java ============================================================================== --- trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Mon Apr 4 15:02:36 2011 (r1451) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java Mon Apr 11 10:11:46 2011 (r1452) @@ -38,6 +38,46 @@ writer.element("br"); writer.end(); writer.write(comment); } + + // now try to deal with additional dataset errors... + for (DatasetError de : _dataset.getErrors()){ + writer.element("br");writer.end(); + writer.write("Additional systematic error: "); + if(de.getPlus() != 0.0 || de.getPlus() != 0.0) { + if(de.getPlus().equals(de.getMinus())){ + writer.writeRaw("±"); + writer.write(" " + de.getPlus()); + } else{ + writer.write("+" + de.getPlus() + "-" + de.getMinus() + " "); + } + writer.write(de.getNormType().toSymbol()+ " "); + } + writer.write("(" +de.getComment() + ")"); + } + String lasterror = ""; + int ycount = 0; + for (YAxis y : _dataset.getYAxes()){ + ycount += 1; + for (AxisError ye : y.getErrors()){ + String newerror = "e" + ye.getPlus() + ye.getMinus() + ye.getNormType() + ye.getComment(); + if(!newerror.equals(lasterror)){ + writer.element("br");writer.end(); + writer.write("Additional systematic error(" + ycount + "): "); + if(ye.getPlus() != 0.0 || ye.getPlus() != 0.0) { + if(ye.getPlus().equals(ye.getMinus())){ + writer.writeRaw("±"); + writer.write(" " + ye.getPlus()); + } else{ + writer.write("+" + ye.getPlus() + "-" + ye.getMinus() + " "); + } + writer.write(ye.getNormType().toSymbol()+ " "); + } + writer.write("(" +ye.getComment() + ")"); + } + lasterror = newerror; + } + } + writer.end(); //p // Determine the number of axes and points in the dataset
More information about the HepData-svn mailing list |