Print

Print


Commit in GeomConverter on MAIN
project.properties+3-31.5 -> 1.6
project.xml+103-1041.10 -> 1.11
src/META-INF/services/org.lcsim.geometry.compact.converter.Converter+2added 1.1
src/org/lcsim/geometry/compact/converter/Converter.java+16added 1.1
                                        /Main.java+140added 1.1
                                        /MainGUI.form+198added 1.1
                                        /MainGUI.java+321added 1.1
src/org/lcsim/geometry/compact/converter/heprep/Main.java+38-51.3 -> 1.4
src/org/lcsim/geometry/compact/converter/lcdd/Main.java+40-91.9 -> 1.10
test/org/lcsim/geometry/compact/converter/MainTest.java+70added 1.1
test/org/lcsim/geometry/compact/converter/lcdd/ConvertTest.java+1-11.4 -> 1.5
                                              /ForwardDetectorCnvTest.java+2-21.1 -> 1.2
+934-124
6 added + 6 modified, total 12 files
Add new main routine (GC-11)

GeomConverter
project.properties 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- project.properties	12 Jun 2005 05:26:58 -0000	1.5
+++ project.properties	27 Jun 2005 21:57:34 -0000	1.6
@@ -4,6 +4,6 @@
 maven.compile.target=1.5
 maven.javadoc.source=1.5
 
-maven.repo.remote = http://www.ibiblio.org/maven,http://java.freehep.org/maven
-maven.jar.mainclass=org.lcsim.geometry.compact.converter.lcdd.Main
-maven.javadoc.links=http://java.sun.com/j2se/1.5.0/docs/api/, http://www.jdom.org/docs/apidocs
\ No newline at end of file
+maven.repo.remote=http://www.ibiblio.org/maven,http://java.freehep.org/maven
+maven.jar.mainclass=org.lcsim.geometry.compact.converter.Main
+maven.javadoc.links=http://java.sun.com/j2se/1.5.0/docs/api/, http://www.jdom.org/docs/apidocs

GeomConverter
project.xml 1.10 -> 1.11
diff -u -r1.10 -r1.11
--- project.xml	22 Jun 2005 05:22:53 -0000	1.10
+++ project.xml	27 Jun 2005 21:57:34 -0000	1.11
@@ -1,108 +1,107 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project>
-    <pomVersion>3</pomVersion>
-    <artifactId>GeomConverter</artifactId>
-    <groupId>lcsim</groupId>
-    <currentVersion>0.3</currentVersion>
-    <shortDescription>Geometry Converter for org.lcsim</shortDescription>
-    <url>http://www.lcsim.org</url>
-    <name>GeomConverter</name>
-    <package>org.lcsim</package>
-    <inceptionYear>2005</inceptionYear>
-    <organization>
-        <name>SLAC</name>
-        <url>http://www.slac.stanford.edu</url>
-    </organization>
-    <description>Software for handling compact geometry description.</description>
-    <shortDescription>Roftware for handling compact geometry description for the international linear collider.</shortDescription>
-    <url>http://www.lcsim.org/software/geomconverter</url>
-    <issueTrackingUrl>http://jira.slac.stanford.edu/secure/BrowseProject.jspa?id=10172</issueTrackingUrl>
-    <repository>
-        <connection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:GeomConverter</connection>
-    </repository>
-    <developers>
-        <developer>
-            <name>Tony Johnson</name>
-            <id>tonyj</id>
-            <email>[log in to unmask]</email>
-            <organization>SLAC</organization>
-            <roles>
-                <role>Developer</role>
-            </roles>
-            <url/>
-            <timezone/>
-        </developer>
-    </developers>
-    <dependencies>
-        <dependency>
-            <groupId>jdom</groupId>
-            <artifactId>jdom</artifactId>
-            <version>1.0</version>
-            <url>http://www.jdom.org/</url>
-            <properties>
-                <war.bundle>true</war.bundle>
-            </properties>
-        </dependency>
-        <dependency>
-            <groupId>jel</groupId>
-            <artifactId>jel</artifactId>
-            <version>0.9.10</version>
-            <url>http://galaxy.fzu.cz/JEL/</url>
-        </dependency>
-        <dependency>
-            <groupId>xerces</groupId>
-            <artifactId>xercesImpl</artifactId>
-            <version>2.6.2</version>
-            <url>http://xerces.apache.org/</url>
-        </dependency>
-        <dependency>
-            <groupId>freehep</groupId>
-            <artifactId>freehep-heprep</artifactId>
-            <version>02032005</version>
-            <url>http://java.freehep.org</url>
-        </dependency>
-        <dependency>
-            <groupId>freehep</groupId>
-            <artifactId>freehep-jheprep</artifactId>
-            <version>02032005</version>
-            <url>http://java.freehep.org</url>
-        </dependency>
-        <dependency>
-            <groupId>freehep</groupId>
-            <artifactId>freehep-base</artifactId>
-            <version>27012005</version>
-            <url>http://java.freehep.org</url>
-        </dependency>
-        <dependency>
-            <groupId>freehep</groupId>
-            <artifactId>freehep-run-plugin</artifactId>
-            <version>1.1</version>
-            <url>http://java.freehep.org/maven/freehep/plugins</url>
-            <type>plugin</type>
-        </dependency>
-    </dependencies>
-    <build>
-        <sourceDirectory>src</sourceDirectory>
-        <unitTestSourceDirectory>test</unitTestSourceDirectory>
-        <unitTest>
-            <resources>
-                <resource>
-                    <directory>test</directory>
-                    <includes>
-                        <include>**/*.xml</include>
-                        <include>**/*.xsd</include>
-                    </includes>
-                </resource>
-            </resources>
-        </unitTest>
-        <resources>
-            <resource>
-                <directory>src</directory>
-                <includes>
-                    <include>**/*.xml</include>
-                </includes>
-            </resource>
-        </resources>
-    </build>
+  <pomVersion>3</pomVersion>
+  <artifactId>GeomConverter</artifactId>
+  <groupId>lcsim</groupId>
+  <currentVersion>0.3</currentVersion>
+  <shortDescription>Geometry Converter for org.lcsim</shortDescription>
+  <url>http://www.lcsim.org</url>
+  <name>GeomConverter</name>
+  <package>org.lcsim</package>
+  <inceptionYear>2005</inceptionYear>
+  <organization>
+    <name>SLAC</name>
+    <url>http://www.slac.stanford.edu</url>
+  </organization>
+  <description>Software for handling compact geometry description.</description>
+  <shortDescription>Roftware for handling compact geometry description for the international linear collider.</shortDescription>
+  <url>http://www.lcsim.org/software/geomconverter</url>
+  <issueTrackingUrl>http://jira.slac.stanford.edu/secure/BrowseProject.jspa?id=10172</issueTrackingUrl>
+  <repository>
+    <connection>scm:cvs:pserver:[log in to unmask]:/cvs/lcd:GeomConverter</connection>
+  </repository>
+  <developers>
+    <developer>
+      <name>Tony Johnson</name>
+      <id>tonyj</id>
+      <email>[log in to unmask]</email>
+      <organization>SLAC</organization>
+      <roles>
+        <role>Developer</role>
+      </roles>
+    </developer>
+  </developers>
+  <dependencies>
+    <dependency>
+      <groupId>jdom</groupId>
+      <artifactId>jdom</artifactId>
+      <version>1.0</version>
+      <url>http://www.jdom.org/</url>
+      <properties>
+        <war.bundle>true</war.bundle>
+      </properties>
+    </dependency>
+    <dependency>
+      <groupId>jel</groupId>
+      <artifactId>jel</artifactId>
+      <version>0.9.10</version>
+      <url>http://galaxy.fzu.cz/JEL/</url>
+    </dependency>
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+      <version>2.6.2</version>
+      <url>http://xerces.apache.org/</url>
+    </dependency>
+    <dependency>
+      <groupId>freehep</groupId>
+      <artifactId>freehep-heprep</artifactId>
+      <version>02032005</version>
+      <url>http://java.freehep.org</url>
+    </dependency>
+    <dependency>
+      <groupId>freehep</groupId>
+      <artifactId>freehep-jheprep</artifactId>
+      <version>02032005</version>
+      <url>http://java.freehep.org</url>
+    </dependency>
+    <dependency>
+      <groupId>freehep</groupId>
+      <artifactId>freehep-base</artifactId>
+      <version>27012005</version>
+      <url>http://java.freehep.org</url>
+    </dependency>
+    <dependency>
+      <groupId>freehep</groupId>
+      <artifactId>freehep-run-plugin</artifactId>
+      <version>1.1</version>
+      <url>http://java.freehep.org/maven/freehep/plugins</url>
+      <type>plugin</type>
+    </dependency>
+  </dependencies>
+  <build>
+    <sourceDirectory>src</sourceDirectory>
+    <unitTestSourceDirectory>test</unitTestSourceDirectory>
+    <unitTest>
+      <resources>
+        <resource>
+          <directory>test</directory>
+          <includes>
+            <include>**/*.xml</include>
+            <include>**/*.xsd</include>
+          </includes>
+        </resource>
+      </resources>
+    </unitTest>
+    <resources>
+      <resource>
+        <directory>src</directory>
+        <includes>
+          <include>**/*.xml</include>
+          <include>META-INF/services/*</include>
+        </includes>
+      </resource>
+    </resources>
+  </build>
 </project>
 

GeomConverter/src/META-INF/services
org.lcsim.geometry.compact.converter.Converter added at 1.1
diff -N org.lcsim.geometry.compact.converter.Converter
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ org.lcsim.geometry.compact.converter.Converter	27 Jun 2005 21:57:34 -0000	1.1
@@ -0,0 +1,2 @@
+org.lcsim.geometry.compact.converter.heprep.Main
+org.lcsim.geometry.compact.converter.lcdd.Main
\ No newline at end of file

GeomConverter/src/org/lcsim/geometry/compact/converter
Converter.java added at 1.1
diff -N Converter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Converter.java	27 Jun 2005 21:57:34 -0000	1.1
@@ -0,0 +1,16 @@
+package org.lcsim.geometry.compact.converter;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.swing.filechooser.FileFilter;
+
+/**
+ * An interface to be implemented by all converters
+ * @author tonyj
+ */
+public interface Converter
+{
+   void convert(String inputFileName, InputStream in, OutputStream out) throws Exception;
+   String getOutputFormat();
+   FileFilter getFileFilter();
+}
\ No newline at end of file

GeomConverter/src/org/lcsim/geometry/compact/converter
Main.java added at 1.1
diff -N Main.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ Main.java	27 Jun 2005 21:57:34 -0000	1.1
@@ -0,0 +1,140 @@
+package org.lcsim.geometry.compact.converter;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import javax.imageio.spi.ServiceRegistry;
+
+/**
+ * A main routine which can be used to invoke other main routines.
+ * @author tonyj
+ */
+public class Main
+{
+   private String inFile;
+   private String outFile;
+   private String format;
+   private Converter converter;
+   
+   String getInputFile()
+   {
+      return inFile;
+   }
+   String getOutputFile()
+   {
+      return outFile;
+   }
+   String getFormat()
+   {
+      return format;
+   }
+   void parseArgs(String[] args) throws InvalidArgumentException
+   {
+      for (int i=0; i<args.length; i++)
+      {
+         String arg = args[i];
+         if ("-o".equals(arg))
+         {
+            i++;
+            if (i >= args.length) usage();
+            format = args[i];
+         }
+         else if (arg.startsWith("-")) usage();
+         else if (inFile == null) inFile = arg;
+         else if (outFile == null) outFile = arg;
+         else throw new InvalidArgumentException();
+      }
+      
+      if (format != null)
+      {
+         for (Converter c : getConverters())
+         {
+            if (c.getOutputFormat().equalsIgnoreCase(format))
+            {
+               converter = c;
+               break;
+            }
+         }
+         if (converter == null) throw new InvalidArgumentException("Sorry, could not find converter for format: "+format);
+      }
+      // If not explicitly set try to guess output type from output file
+      else if (outFile != null)
+      {
+         File out = new File(outFile);
+         for (Converter c : getConverters())
+         {
+            if (c.getFileFilter().accept(out))
+            {
+               converter = c;
+               break;
+            }
+         }
+         if (converter == null) throw new InvalidArgumentException("Sorry, could not find converter for output file");
+      }
+   }
+   public static void main(String[] args) throws Exception
+   {
+      Main main = new Main();
+      try
+      {
+         main.parseArgs(args);
+      }
+      catch (InvalidArgumentException x)
+      {
+         String message = x.getMessage();
+         if (message != null) System.err.println(message);
+         usage();
+      }
+      if (main.outFile == null)
+      {
+         MainGUI.main(args);
+      }
+      else if (main.converter != null)
+      {
+         main.run();
+      }
+   }
+   private void run() throws Exception
+   {
+      InputStream in = new BufferedInputStream(new FileInputStream(inFile));
+      OutputStream out = new BufferedOutputStream(new FileOutputStream(outFile));
+      converter.convert(inFile,in,out);
+      in.close();
+      out.close();
+   }
+   
+   private static void usage()
+   {
+      System.out.println("java "+Main.class.getName()+" [-o <format>] [<input> [<output>]]");
+      System.exit(0);
+   }
+   static List<Converter> getConverters()
+   {
+      Iterator<Converter> iter = getServices(Converter.class);
+      List<Converter> result = new ArrayList<Converter>();
+      while (iter.hasNext()) result.add(iter.next());
+      return result;
+   }
+   private static <T> Iterator<T> getServices(Class<T> providerClass)
+   {
+      return ServiceRegistry.lookupProviders(providerClass,Main.class.getClassLoader());
+   }
+   class InvalidArgumentException extends Exception
+   {
+      InvalidArgumentException()
+      {
+         super();
+      }
+      InvalidArgumentException(String message)
+      {
+         super(message);
+      }
+   }
+}

GeomConverter/src/org/lcsim/geometry/compact/converter
MainGUI.form added at 1.1
diff -N MainGUI.form
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MainGUI.form	27 Jun 2005 21:57:34 -0000	1.1
@@ -0,0 +1,198 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.0" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+  <Properties>
+    <Property name="defaultCloseOperation" type="int" value="2"/>
+    <Property name="title" type="java.lang.String" value="GeomConverter"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+  </SyntheticProperties>
+  <Events>
+    <EventHandler event="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="windowClosing"/>
+  </Events>
+  <AuxValues>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+  <SubComponents>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
+          <Color blue="ff" green="ff" red="ff" type="rgb"/>
+        </Property>
+        <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
+          <Font name="Tahoma" size="24" style="1"/>
+        </Property>
+        <Property name="text" type="java.lang.String" value="GeomConverter"/>
+        <Property name="opaque" type="boolean" value="true"/>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+        <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Component class="javax.swing.JSeparator" name="jSeparator1">
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+        <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+    </Component>
+    <Container class="javax.swing.JPanel" name="jPanel1">
+      <Properties>
+        <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
+          <Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
+            <EmptyBorder bottom="10" left="10" right="10" top="10"/>
+          </Border>
+        </Property>
+      </Properties>
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+        <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="1" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="1.0"/>
+        </Constraint>
+      </Constraints>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JLabel" name="jLabel2">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Input"/>
+          </Properties>
+          <AuxValues>
+            <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+            <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+          </AuxValues>
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="5" anchor="13" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JTextField" name="inputTextField">
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JButton" name="inputBrowseButton">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Browse..."/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="inputBrowseButtonActionPerformed"/>
+          </Events>
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JLabel" name="jLabel3">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Output"/>
+          </Properties>
+          <AuxValues>
+            <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+            <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+          </AuxValues>
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="5" anchor="13" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JTextField" name="outputTextField">
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="2" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="1.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JButton" name="outputBrowseButton">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Browse..."/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="outputBrowseButtonActionPerformed"/>
+          </Events>
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JLabel" name="jLabel4">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Format"/>
+          </Properties>
+          <AuxValues>
+            <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+            <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+          </AuxValues>
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="5" anchor="13" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+        <Component class="javax.swing.JComboBox" name="converterComboBox">
+          <Constraints>
+            <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+              <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
+            </Constraint>
+          </Constraints>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JPanel" name="jPanel2">
+      <AuxValues>
+        <AuxValue name="JavaCodeGenerator_VariableLocal" type="java.lang.Boolean" value="true"/>
+        <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="0"/>
+      </AuxValues>
+      <Constraints>
+        <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
+          <GridBagConstraints gridX="-1" gridY="-1" gridWidth="0" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="0" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="10" weightX="0.0" weightY="0.0"/>
+        </Constraint>
+      </Constraints>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.DesignFlowLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JButton" name="convertButton">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Convert"/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="convertButtonActionPerformed"/>
+          </Events>
+        </Component>
+        <Component class="javax.swing.JButton" name="exitButton">
+          <Properties>
+            <Property name="text" type="java.lang.String" value="Exit"/>
+          </Properties>
+          <Events>
+            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exitButtonActionPerformed"/>
+          </Events>
+        </Component>
+      </SubComponents>
+    </Container>
+  </SubComponents>
+</Form>

GeomConverter/src/org/lcsim/geometry/compact/converter
MainGUI.java added at 1.1
diff -N MainGUI.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MainGUI.java	27 Jun 2005 21:57:34 -0000	1.1
@@ -0,0 +1,321 @@
+package org.lcsim.geometry.compact.converter;
+
+import java.awt.Dimension;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.prefs.Preferences;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JFileChooser;
+import javax.swing.JOptionPane;
+import javax.swing.JTextField;
+import javax.swing.UIManager;
+import javax.swing.filechooser.FileFilter;
+import org.lcsim.geometry.compact.converter.Main.InvalidArgumentException;
+
+/**
+ *
+ * @author  tonyj
+ */
+public class MainGUI extends javax.swing.JFrame
+{
+   private Preferences prefs = Preferences.userNodeForPackage(MainGUI.class);
+   private List<Converter> converters;
+   
+   /** Creates new form MainGUI */
+   public MainGUI(String inFile, String outFile, String format)
+   {
+      initComponents();
+      inputTextField.setText(inFile == null ? prefs.get("input","") : inFile);
+      outputTextField.setText(outFile == null ? prefs.get("output","") : outFile);
+      DefaultComboBoxModel model = new DefaultComboBoxModel();
+      converters = Main.getConverters();
+      for (Converter c : converters)
+      {
+         model.addElement(c.getOutputFormat());
+      }
+      converterComboBox.setModel(model);
+      if (format == null) format = prefs.get("format",null);
+      if (format != null) converterComboBox.setSelectedItem(format);
+   }
+   
+   /** This method is called from within the constructor to
+    * initialize the form.
+    * WARNING: Do NOT modify this code. The content of this method is
+    * always regenerated by the Form Editor.
+    */
+   // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
+   private void initComponents()
+   {
+      java.awt.GridBagConstraints gridBagConstraints;
+      javax.swing.JLabel jLabel1;
+      javax.swing.JLabel jLabel2;
+      javax.swing.JLabel jLabel3;
+      javax.swing.JLabel jLabel4;
+      javax.swing.JPanel jPanel1;
+      javax.swing.JPanel jPanel2;
+      javax.swing.JSeparator jSeparator1;
+
+      jLabel1 = new javax.swing.JLabel();
+      jSeparator1 = new javax.swing.JSeparator();
+      jPanel1 = new javax.swing.JPanel();
+      jLabel2 = new javax.swing.JLabel();
+      inputTextField = new javax.swing.JTextField();
+      inputBrowseButton = new javax.swing.JButton();
+      jLabel3 = new javax.swing.JLabel();
+      outputTextField = new javax.swing.JTextField();
+      outputBrowseButton = new javax.swing.JButton();
+      jLabel4 = new javax.swing.JLabel();
+      converterComboBox = new javax.swing.JComboBox();
+      jPanel2 = new javax.swing.JPanel();
+      convertButton = new javax.swing.JButton();
+      exitButton = new javax.swing.JButton();
+
+      getContentPane().setLayout(new java.awt.GridBagLayout());
+
+      setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+      setTitle("GeomConverter");
+      addWindowListener(new java.awt.event.WindowAdapter()
+      {
+         public void windowClosing(java.awt.event.WindowEvent evt)
+         {
+            MainGUI.this.windowClosing(evt);
+         }
+      });
+
+      jLabel1.setBackground(new java.awt.Color(255, 255, 255));
+      jLabel1.setFont(new java.awt.Font("Tahoma", 1, 24));
+      jLabel1.setText("GeomConverter");
+      jLabel1.setOpaque(true);
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+      getContentPane().add(jLabel1, gridBagConstraints);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+      getContentPane().add(jSeparator1, gridBagConstraints);
+
+      jPanel1.setLayout(new java.awt.GridBagLayout());
+
+      jPanel1.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(10, 10, 10, 10)));
+      jLabel2.setText("Input");
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+      gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
+      jPanel1.add(jLabel2, gridBagConstraints);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+      jPanel1.add(inputTextField, gridBagConstraints);
+
+      inputBrowseButton.setText("Browse...");
+      inputBrowseButton.addActionListener(new java.awt.event.ActionListener()
+      {
+         public void actionPerformed(java.awt.event.ActionEvent evt)
+         {
+            inputBrowseButtonActionPerformed(evt);
+         }
+      });
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      jPanel1.add(inputBrowseButton, gridBagConstraints);
+
+      jLabel3.setText("Output");
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+      gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
+      jPanel1.add(jLabel3, gridBagConstraints);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
+      gridBagConstraints.weightx = 1.0;
+      jPanel1.add(outputTextField, gridBagConstraints);
+
+      outputBrowseButton.setText("Browse...");
+      outputBrowseButton.addActionListener(new java.awt.event.ActionListener()
+      {
+         public void actionPerformed(java.awt.event.ActionEvent evt)
+         {
+            outputBrowseButtonActionPerformed(evt);
+         }
+      });
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      jPanel1.add(outputBrowseButton, gridBagConstraints);
+
+      jLabel4.setText("Format");
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
+      gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5);
+      jPanel1.add(jLabel4, gridBagConstraints);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
+      jPanel1.add(converterComboBox, gridBagConstraints);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
+      gridBagConstraints.weightx = 1.0;
+      gridBagConstraints.weighty = 1.0;
+      getContentPane().add(jPanel1, gridBagConstraints);
+
+      convertButton.setText("Convert");
+      convertButton.addActionListener(new java.awt.event.ActionListener()
+      {
+         public void actionPerformed(java.awt.event.ActionEvent evt)
+         {
+            convertButtonActionPerformed(evt);
+         }
+      });
+
+      jPanel2.add(convertButton);
+
+      exitButton.setText("Exit");
+      exitButton.addActionListener(new java.awt.event.ActionListener()
+      {
+         public void actionPerformed(java.awt.event.ActionEvent evt)
+         {
+            exitButtonActionPerformed(evt);
+         }
+      });
+
+      jPanel2.add(exitButton);
+
+      gridBagConstraints = new java.awt.GridBagConstraints();
+      gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
+      getContentPane().add(jPanel2, gridBagConstraints);
+
+      pack();
+   }
+   // </editor-fold>//GEN-END:initComponents
+
+   private void convertButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_convertButtonActionPerformed
+   {//GEN-HEADEREND:event_convertButtonActionPerformed
+      try
+      {
+         String inFile = inputTextField.getText();
+         InputStream in = new BufferedInputStream(new FileInputStream(inFile));
+         String outFile = outputTextField.getText();
+         OutputStream out = new BufferedOutputStream(new FileOutputStream(outFile));
+         getCurrentConverter().convert(inFile,in,out);
+         out.close();
+         in.close();
+         // No Exception
+         JOptionPane.showMessageDialog(this,"Conversion successful","Success",JOptionPane.INFORMATION_MESSAGE);
+      }
+      catch (Exception x)
+      {
+         x.printStackTrace();
+         JOptionPane.showMessageDialog(this,x.toString(),"Error",JOptionPane.ERROR_MESSAGE);
+      }
+   }//GEN-LAST:event_convertButtonActionPerformed
+
+   private void outputBrowseButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_outputBrowseButtonActionPerformed
+   {//GEN-HEADEREND:event_outputBrowseButtonActionPerformed
+      doBrowse(outputTextField, false, getCurrentConverter().getFileFilter());
+   }//GEN-LAST:event_outputBrowseButtonActionPerformed
+   
+   private void windowClosing(java.awt.event.WindowEvent evt)//GEN-FIRST:event_windowClosing
+   {//GEN-HEADEREND:event_windowClosing
+      exit();
+   }//GEN-LAST:event_windowClosing
+   
+   private void exitButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_exitButtonActionPerformed
+   {//GEN-HEADEREND:event_exitButtonActionPerformed
+      exit();
+   }//GEN-LAST:event_exitButtonActionPerformed
+   
+   private void inputBrowseButtonActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_inputBrowseButtonActionPerformed
+   {//GEN-HEADEREND:event_inputBrowseButtonActionPerformed
+      doBrowse(inputTextField,true,new CompactFileFilter());
+   }//GEN-LAST:event_inputBrowseButtonActionPerformed
+   
+   private void doBrowse(JTextField field, boolean input, FileFilter filter)
+   {
+      JFileChooser chooser = new JFileChooser();
+      chooser.setCurrentDirectory(new File(field.getText()));
+      chooser.addChoosableFileFilter(filter);
+      chooser.setApproveButtonText("Select");
+      chooser.setApproveButtonMnemonic('S');
+      int rc = input ? chooser.showOpenDialog(this) : chooser.showSaveDialog(this);
+      if (rc == JFileChooser.APPROVE_OPTION)
+      {
+         field.setText(chooser.getSelectedFile().getAbsolutePath());
+      }      
+   }
+   private Converter getCurrentConverter()
+   {
+      return converters.get(converterComboBox.getSelectedIndex());
+   }
+   /**
+    * @param args the command line arguments
+    */
+   public static void main(String args[])
+   {
+      try
+      {
+         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+      }
+      catch (Exception x)
+      {
+         // Too bad
+      }
+      Main main = new Main();
+      try
+      {
+         main.parseArgs(args);
+      }
+      catch (InvalidArgumentException x)
+      {
+         String message = x.getMessage();
+         if (message != null) System.err.println(message);
+      }
+      MainGUI gui = new MainGUI(main.getInputFile(), main.getOutputFile(), main.getFormat());
+      gui.setSize(new Dimension(500,300));
+      gui.setLocationByPlatform(true);
+      gui.setVisible(true);
+   }
+   private void exit()
+   {
+      prefs.put("input",inputTextField.getText());
+      prefs.put("output", outputTextField.getText());
+      prefs.put("format", converterComboBox.getSelectedItem().toString());
+      System.exit(0);
+   }
+   
+   
+   // Variables declaration - do not modify//GEN-BEGIN:variables
+   private javax.swing.JButton convertButton;
+   private javax.swing.JComboBox converterComboBox;
+   private javax.swing.JButton exitButton;
+   private javax.swing.JButton inputBrowseButton;
+   private javax.swing.JTextField inputTextField;
+   private javax.swing.JButton outputBrowseButton;
+   private javax.swing.JTextField outputTextField;
+   // End of variables declaration//GEN-END:variables
+   
+   
+   private static class CompactFileFilter extends FileFilter
+   {
+      public boolean accept(java.io.File file)
+      {
+         return file.isDirectory() || file.getName().endsWith(".xml");
+      }
+      
+      public String getDescription()
+      {
+         return "Compact Geometry Description (*.xml)";
+      }
+   }
+}

GeomConverter/src/org/lcsim/geometry/compact/converter/heprep
Main.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- Main.java	10 Mar 2005 05:10:06 -0000	1.3
+++ Main.java	27 Jun 2005 21:57:35 -0000	1.4
@@ -11,18 +11,20 @@
 import java.io.FileOutputStream;
 import java.io.InputStream;
 import java.io.OutputStream;
+import javax.swing.filechooser.FileFilter;
 import org.jdom.input.SAXBuilder;
 import org.lcsim.geometry.GeometryReader;
 import org.lcsim.geometry.Detector;
-
+import org.lcsim.geometry.compact.converter.Converter;
 
 /**
  *
  * @author tonyj
  */
-public class Main
+public class Main implements Converter
 {
-   private static boolean validate = false; // FREEHEP-553
+   private static boolean validateDefault = false; // FREEHEP-553
+   private boolean validate;
    /**
     * @param args the command line arguments
     */
@@ -31,9 +33,17 @@
       if (args.length < 1 || args.length >2) usage();
       InputStream in = new BufferedInputStream(new FileInputStream(args[0]));
       OutputStream out = args.length == 1 ?  System.out : new BufferedOutputStream(new FileOutputStream(args[1]));
-      new Main(in,out,validate);
+      new Main().convert(args[0],in,out);
+   }
+   public Main()
+   {
+      this(validateDefault);
+   }
+   public Main(boolean validate)
+   {
+      this.validate = validate;
    }
-   Main(InputStream in, OutputStream out, boolean validate) throws Exception
+   public void convert(String inputFileName, InputStream in, OutputStream out) throws Exception
    {
       GeometryReader reader = new GeometryReader();
       Detector det = reader.read(in);
@@ -72,4 +82,27 @@
       System.out.println("java "+Main.class.getName()+" <compact> [<heprep>]");
       System.exit(0);
    }
+
+   public FileFilter getFileFilter()
+   {
+      return new HepRepFileFilter();
+   }
+
+   public String getOutputFormat()
+   {
+      return "heprep";
+   }
+   
+   private static class HepRepFileFilter extends FileFilter
+   {
+      public boolean accept(java.io.File file)
+      {
+         return file.isDirectory() || file.getName().endsWith(".heprep");
+      }
+      
+      public String getDescription()
+      {
+         return "HepRep file (*.heprep)";
+      }
+   }
 }
\ No newline at end of file

GeomConverter/src/org/lcsim/geometry/compact/converter/lcdd
Main.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- Main.java	23 Jun 2005 22:02:14 -0000	1.9
+++ Main.java	27 Jun 2005 21:57:35 -0000	1.10
@@ -6,42 +6,50 @@
 import java.io.ByteArrayOutputStream;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
-import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import javax.swing.filechooser.FileFilter;
 import org.jdom.Document;
-import org.jdom.JDOMException;
 import org.jdom.input.SAXBuilder;
 import org.jdom.output.Format;
 import org.jdom.output.XMLOutputter;
 import org.lcsim.geometry.compact.ElementFactory;
-import org.lcsim.geometry.compact.ElementFactory.ElementCreationException;
 import org.lcsim.geometry.compact.Detector;
 import org.lcsim.geometry.compact.CompactReader;
+import org.lcsim.geometry.compact.converter.Converter;
 
 /**
  *
  * @author tonyj
  */
-public class Main
+public class Main implements Converter
 {
-   private static boolean validate = true;
+   private static boolean validateDefault = true;
+   private boolean validate;
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws Exception
-   {      
+   {
       if (args.length < 1 || args.length >2) usage();
       InputStream in = new BufferedInputStream(new FileInputStream(args[0]));
       OutputStream out = args.length == 1 ? System.out : new BufferedOutputStream(new FileOutputStream(args[1]));
-      new Main(args[0],in,out,validate);
+      new Main(validateDefault).convert(args[0],in,out);
+   }
+   Main(boolean validate) throws Exception
+   {
+      this.validate = validate;
+   }
+   public Main() throws Exception
+   {
+      this(validateDefault);
    }
-   Main(String name, InputStream in, OutputStream out, boolean validate) throws Exception
+   public void convert(String inputFileName, InputStream in, OutputStream out) throws Exception
    {
       ElementFactory factory = new LCDDElementFactory();
       CompactReader reader = new CompactReader(factory);
       Detector det = reader.read(in);
-      Document doc = ((LCDDDetector) det).writeLCDD(name);
+      Document doc = ((LCDDDetector) det).writeLCDD(inputFileName);
       
       XMLOutputter outputter = new XMLOutputter();
       if (validate)
@@ -71,4 +79,27 @@
       System.out.println("java "+Main.class.getName()+" <compact> [<lcdd>]");
       System.exit(0);
    }
+
+   public String getOutputFormat()
+   {
+      return "lcdd";
+   }
+
+   public FileFilter getFileFilter()
+   {
+      return new LCDDFileFilter();
+   }
+   
+   private static class LCDDFileFilter extends FileFilter
+   {
+      public boolean accept(java.io.File file)
+      {
+         return file.isDirectory() || file.getName().endsWith(".heprep");
+      }
+      
+      public String getDescription()
+      {
+         return "HepRep file (*.heprep)";
+      }
+   }
 }
\ No newline at end of file

GeomConverter/test/org/lcsim/geometry/compact/converter
MainTest.java added at 1.1
diff -N MainTest.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ MainTest.java	27 Jun 2005 21:57:35 -0000	1.1
@@ -0,0 +1,70 @@
+package org.lcsim.geometry.compact.converter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import junit.framework.*;
+
+
+/**
+ *
+ * @author tonyj
+ */
+public class MainTest extends TestCase
+{
+   private File tempFile;
+   
+   public MainTest(String testName)
+   {
+      super(testName);
+   }
+   
+   protected void setUp() throws Exception
+   {
+      InputStream in = MainTest.class.getResourceAsStream("/org/lcsim/geometry/compact/sdjan03_compact.xml");
+      tempFile = File.createTempFile("xyz","xml");
+      OutputStream out = new FileOutputStream(tempFile);
+      byte[] buffer = new byte[8096];
+      for (;;)
+      {
+         int l = in.read(buffer);
+         if (l < 0) break;
+         out.write(buffer, 0, l);
+      }
+      out.close();
+      in.close();
+   }
+   
+   protected void tearDown() throws Exception
+   {
+      tempFile.delete();
+   }
+   
+   public static Test suite()
+   {
+      return new TestSuite(MainTest.class);
+   }
+   
+   /**
+    * Test of main method, of class org.lcsim.geometry.compact.converter.Main.
+    */
+   public void testMain() throws Throwable
+   {
+      String[] args = (tempFile.getAbsolutePath()+" temp.heprep").split(" ");
+      Main.main(args);
+   }
+   
+   /**
+    * Test of getConverters method, of class org.lcsim.geometry.compact.converter.Main.
+    */
+   public void testGetConverters()
+   {
+      List<Converter> converters = Main.getConverters();
+      assertEquals(2,converters.size());
+      for (Converter c : converters)
+      {
+         assertTrue(c instanceof Converter);
+      }
+   }
+}

GeomConverter/test/org/lcsim/geometry/compact/converter/lcdd
ConvertTest.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- ConvertTest.java	9 Jun 2005 03:18:40 -0000	1.4
+++ ConvertTest.java	27 Jun 2005 21:57:36 -0000	1.5
@@ -33,6 +33,6 @@
    public void testMain() throws Exception
    {
       InputStream in = ConvertTest.class.getResourceAsStream("/org/lcsim/geometry/compact/sdjan03_compact.xml");
-      new Main("sdjan03",in,null,true);      
+      new Main(true).convert("sdjan03",in, null);      
    }  
 }
\ No newline at end of file

GeomConverter/test/org/lcsim/geometry/compact/converter/lcdd
ForwardDetectorCnvTest.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- ForwardDetectorCnvTest.java	16 Jun 2005 23:54:27 -0000	1.1
+++ ForwardDetectorCnvTest.java	27 Jun 2005 21:57:36 -0000	1.2
@@ -27,9 +27,9 @@
         return new TestSuite(ForwardDetectorCnvTest.class);
     }
     
-    public void test_ForwardDetectorCnv() throws Exception
+    public void testForwardDetectorCnv() throws Exception
     {
       InputStream in = ForwardDetectorCnvTest.class.getResourceAsStream("/org/lcsim/geometry/subdetector/ForwardDetectorTest.xml");
-      new Main("ForwardDetectorTest", in, null, true);      
+      new Main(true).convert("ForwardDetectorTest",in,null);      
     }  
 }
CVSspam 0.2.8