[HepData-svn] r1813 - in trunk/hepdata-webapp/src/main: java/cedar/hepdata/formats java/cedar/hepdata/webapp/components resources/cedar/hepdata/webapp/pages

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Tue Aug 5 17:45:51 BST 2014


Author: watt
Date: Tue Aug  5 17:45:51 2014
New Revision: 1813

Log:
Check for hasZeroSize when writing errors.  Add link to ROOT converter script.

Modified:
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/BdmsFormatter.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java
   trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java
   trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/AboutHepdata.tml
   trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/SubmittingData.tml

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/BdmsFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/BdmsFormatter.java	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/BdmsFormatter.java	Tue Aug  5 17:45:51 2014	(r1813)
@@ -268,7 +268,7 @@
 			       
 			       if(nerr == 1) {
 				   
-                                    if(err.isSymmetric()){
+                                    if(err.isSymmetric() || err.hasZeroSize()){
                                         if(yax.getPoint(i+1).getErrors().size()==1&&err.getSourceType().toString().equals("statistical")){ s.append(" (STAT=" + f_plus + norm+")");} 
                                         else{ s.append(" +- " + f_plus + norm);} 
                                     }
@@ -293,7 +293,7 @@
                                     else { s.append(" (DSYS="); }
 //                                    if(err.isSymmetric()) {s.append(err.getPlus() + norm);}
 //                                    else{s.append("+" + err.getPlus() + norm + ",-" + err.getMinus() + norm);}
-                                    if(err.isSymmetric()) {s.append(f_plus + norm);}
+                                    if(err.isSymmetric() || err.hasZeroSize()) {s.append(f_plus + norm);}
 				    else {
 					if (err.getPlus() < 0.0) { s.append("" + f_plus + norm); }
 					else { s.append("+" + f_plus + norm); }
@@ -306,7 +306,7 @@
                                     s.append(",DSYS=");
 //                                    if(err.isSymmetric()) {s.append(err.getPlus() + norm);}
 //                                    else{s.append("+" + err.getPlus() + norm + ",-" + err.getMinus() + norm);}
-                                    if(err.isSymmetric()) {s.append(f_plus + norm);}
+                                    if(err.isSymmetric() || err.hasZeroSize()) {s.append(f_plus + norm);}
 				    else {
 					if (err.getPlus() < 0.0) { s.append("" + f_plus + norm); }
 					else { s.append("+" + f_plus + norm); }

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/InputFormatter.java	Tue Aug  5 17:45:51 2014	(r1813)
@@ -299,7 +299,7 @@
 			    }
                                 
                             if(nerr == 1) {
-                                if(err.isSymmetric()){ 
+                                if(err.isSymmetric() || err.hasZeroSize()){ 
                                     s.append(" +- " + f_plus + norm); 
                                 } else if (err.getMinus() == 0.0) {
 				    s.append(" +" + f_plus + norm + ",-" + f_minus + norm);
@@ -314,7 +314,7 @@
 				else {
 				    s.append(" (DSYS=");
 				}
-                                if(err.isSymmetric()) {s.append(f_plus + norm);}
+                                if(err.isSymmetric() || err.hasZeroSize()) {s.append(f_plus + norm);}
 				else {
 				    if (err.getPlus() < 0.0) { s.append("" + f_plus + norm); }
 				    else { s.append("+" + f_plus + norm); }
@@ -325,7 +325,7 @@
                             }
                             else { 
                                 s.append(",DSYS=");
-                                if(err.isSymmetric()) {s.append(f_plus + norm);}
+                                if(err.isSymmetric() || err.hasZeroSize()) {s.append(f_plus + norm);}
 				else {
 				    if (err.getPlus() < 0.0) { s.append("" + f_plus + norm); }
 				    else { s.append("+" + f_plus + norm); }

Modified: trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java
==============================================================================
--- trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/formats/MarcXMLFormatter.java	Tue Aug  5 17:45:51 2014	(r1813)
@@ -496,7 +496,7 @@
 				    String stype = e.getSourceType().toShortString();
 				    SignificantFigures vale = null;
 				    if (e.getPlusLength() != null) { lsd = -e.getPlusLength(); }
-				    if (e.isSymmetric()) {
+				    if (e.isSymmetric() || e.hasZeroSize()) {
 					vale = new SignificantFigures(e.getPlus());
 					s.append(" +- "); // chosen to allow breaks *before* the +- sign only
 					if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); }

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	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/java/cedar/hepdata/webapp/components/DatasetAsHtml.java	Tue Aug  5 17:45:51 2014	(r1813)
@@ -594,7 +594,7 @@
 				    String stype = e.getSourceType().toShortString();
 				    SignificantFigures vale = null;
 				    if (e.getPlusLength() != null) { lsd = -e.getPlusLength(); }
-				    if (e.isSymmetric()) {
+				    if (e.isSymmetric() || e.hasZeroSize()) {
 					vale = new SignificantFigures(e.getPlus());
 					writer.writeRaw(" ± "); // chosen to allow breaks *before* the +- sign only
 					if (e.getNormType() == ErrorNorm.PCT) { lsd = vale.getLSD(); }

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/AboutHepdata.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/AboutHepdata.tml	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/AboutHepdata.tml	Tue Aug  5 17:45:51 2014	(r1813)
@@ -15,7 +15,7 @@
 <p/>
 HepData is funded by a grant from the STFC (UK) and is based at the IPPP at Durham University in the UK.  The HepData team is very small comprising:
 <ul>
-<li> Database Manager (Dr Mike Whalley, retiring)</li>
+<li> Database Manager (Dr Mike Whalley, part-time, retiring)</li>
 <li> Database Manager (Dr Graeme Watt, since October 2013)</li>
 <li> Coding Assistant (Mrs Joanne Bentham)</li>
 </ul> 

Modified: trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/SubmittingData.tml
==============================================================================
--- trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/SubmittingData.tml	Tue Aug  5 17:43:25 2014	(r1812)
+++ trunk/hepdata-webapp/src/main/resources/cedar/hepdata/webapp/pages/SubmittingData.tml	Tue Aug  5 17:45:51 2014	(r1813)
@@ -20,6 +20,8 @@
 The format we accept data in is very wide and generally we require only a flat file containing the numerical values.  Postscript and pdf figures are not suitable.  However, supplementary files of any format (.ps, .pdf, .root, .C, .slha, etc.) can be placed in a web directory linked from the main HepData record.
 <p/>
 Any text files you send us will be processed into a standard format, which can be seen from the "input" link on any of the existing records.  Data submissions provided in text formats closer to the "input" format (<i>not</i> the "plain text" format) can therefore be entered more quickly into the database.  You can start by looking at the "input" file for an existing record that is similar to your submitted data.  An annotated <a href="http://hepdata.cedar.ac.uk/resource/sample.input">sample input file</a> is available, as is a <a href="http://hepdata.cedar.ac.uk/resource/6150.pl">Perl script</a> or <a href="http://hepdata.cedar.ac.uk/resource/6150.py">Python script</a> used to produce the "input" file from the <a href="http://hepdata.cedar.ac.uk/resource/zz.txt">original submission</a>.  Some nomenclature that is still used in practice is defined in the historical 1970s <a href="http://hepdata.cedar.ac.uk/resource/EncodingManual.pdf">encoding manual</a> (14 MB).  It is useful to pro
 vide key metadata for each table such as a caption, the process being considered (initial-state and final-state particles), important kinematic cuts, and headers for the x and y columns specifying the quantity with units.  Multiple x and y values can be given in the same row separated by semicolons and non-existent entries can be indicated by dashes "-".  Numerical values should be given with an appropriate and not excessive number of significant figures (in general, a maximum of 4), avoiding giving more decimal places for the errors than the central values.  An <a href="http://hepdata.cedar.ac.uk/resource-cgi/input">online form</a> is available to test data input.  Click on "Browse..." to select your input file, followed by "Upload" and "Process", then click "Display" for the first 10 tables, or "All" for the whole record.  Please note that this <a href="http://hepdata.cedar.ac.uk/resource-cgi/input">online form</a> is only for testing purposes, and the final submittal to HepData m
 ust still be done by email to hepdata(at)projects.hepforge.org.
+<p/>
+A Python <a href="http://hepdata.cedar.ac.uk/resource/hepconverter.py">script</a> has been written by Mike Flowerdew (ATLAS) to convert objects in .root files to the HepData "input" format.  A test .root file can be made with another Python <a href="http://hepdata.cedar.ac.uk/resource/MakeTestFile.py">script</a> and some brief usage <a href="http://hepdata.cedar.ac.uk/resource/hepconverternotes.txt">notes</a> are provided.
 </td>
 </tr>
 </table>


More information about the HepData-svn mailing list