Print

Print


Commit in GeomConverter on MAIN
src/org/lcsim/material/MaterialElementDataToGDMLCnv.java+5-51.3 -> 1.4
test/org/lcsim/material/MaterialElementDataToGDMLCnvTest.java+3-81.1 -> 1.2
+8-13
2 modified files
JM: fix for GC-109

GeomConverter/src/org/lcsim/material
MaterialElementDataToGDMLCnv.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- MaterialElementDataToGDMLCnv.java	1 Jul 2005 21:39:25 -0000	1.3
+++ MaterialElementDataToGDMLCnv.java	31 Mar 2008 23:14:05 -0000	1.4
@@ -58,10 +58,10 @@
     }
     
     /** Write GDML materials block to given file and path. */
-    public static void write(String path, String nm) throws FileNotFoundException, IOException
+    public static void write(String path) throws FileNotFoundException, IOException
     {
-        Document d = convertElementData();        
-        File f = new File(path + File.separator + nm);
+        Document d = convertElementData();
+        File f = new File(path);
         OutputStream out = new BufferedOutputStream(new FileOutputStream(f.getAbsolutePath()));
         XMLOutputter outputter = new XMLOutputter();
         outputter.setFormat(Format.getPrettyFormat());
@@ -72,9 +72,9 @@
     /** Default write converted elements to ./elements.xml . */
     public static void write() throws FileNotFoundException, IOException
     {
-        write(".", elementFileName);
+        write("." + File.separator + elementFileName);
     }
-    
+        
     /** Create the "materials" root node. */
     public static Element createMaterialsRoot()
     {

GeomConverter/test/org/lcsim/material
MaterialElementDataToGDMLCnvTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- MaterialElementDataToGDMLCnvTest.java	1 Jul 2005 00:12:25 -0000	1.1
+++ MaterialElementDataToGDMLCnvTest.java	31 Mar 2008 23:14:05 -0000	1.2
@@ -1,13 +1,8 @@
-/*
- * ElementDataToGDMLCnv.java
- *
- * Created on June 7, 2005, 3:55 PM
- */
-
 package org.lcsim.material;
 import junit.framework.TestCase;
 import junit.framework.Test;
 import junit.framework.TestSuite;
+import org.lcsim.util.test.TestUtil.TestOutputFile;
 
 /**
  *
@@ -28,6 +23,6 @@
     
     public static void test_write() throws java.io.FileNotFoundException, java.io.IOException
     {        
-        MaterialElementDataToGDMLCnv.write();
+        MaterialElementDataToGDMLCnv.write((new TestOutputFile("elements.xml").getCanonicalPath()));
     }
-}
+}
\ No newline at end of file
CVSspam 0.2.8