|
[HepData-svn] r1367 - trunk/hepdata-webapp/src/main/java/cedar/hepdata/formatsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgWed Jun 23 14:25:37 BST 2010
Author: buckley Date: Wed Jun 23 14:25:46 2010 New Revision: 1367 Log: Try again! 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 13:49:33 2010 (r1366) +++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/RootFormatter.java Wed Jun 23 14:25:46 2010 (r1367) @@ -46,7 +46,7 @@ public static String _header() { String s = "#include \"TGraphAsymmErrors.h\"\n"; - s += " gROOT->SetStyle(\"Plain\");\n\n"; + s += "gROOT->SetStyle(\"Plain\");\n\n"; s += "{\n\n"; return s; } @@ -116,10 +116,17 @@ s.append(yv + " };\n"); s.append(yem + " };\n"); s.append(yep + " };\n"); - s.append(" int numpoints = " + d.getNumPoints() + ";\n"); + s.append(" int "+varname+"_numpoints = " + d.getNumPoints() + ";\n"); // Append code to make the graph object - s.append(" " + varname + " = TGraphAsymmErrors(numpoints, xval, yval, xerrminus, xerrplus, yerrminus, yerrplus);\n"); + s.append(" " + varname + " = TGraphAsymmErrors(" + + varname + "_numpoints, " + + varname + "_xval, " + + varname + "_yval, " + + varname + "_xerrminus, " + + varname + "_xerrplus, " + + varname + "_yerrminus, " + + varname + "_yerrplus);\n"); s.append(" " + varname + ".SetName(\"" + path.toString() + "\");\n"); s.append(" " + varname + ".SetTitle(\"" + path.toString() + "\");\n"); s.append(" " + varname + ".Draw(\"AP\");\n");
More information about the HepData-svn mailing list |