Commit in GeomConverter/src/org/lcsim/units/clhep on MAIN
SystemOfUnitsMap.java+30added 1.1
JM: Add CLHEP system of units constants to the compact description.

GeomConverter/src/org/lcsim/units/clhep
SystemOfUnitsMap.java added at 1.1
diff -N SystemOfUnitsMap.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ SystemOfUnitsMap.java	1 Mar 2007 19:06:59 -0000	1.1
@@ -0,0 +1,30 @@
+package org.lcsim.units.clhep;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+
+public class SystemOfUnitsMap
+extends HashMap<String,Double>
+{	
+	public SystemOfUnitsMap()
+	{
+		create();
+	}
+		
+	private void create()
+	{		
+		SystemOfUnits units = new SystemOfUnits();		
+		Class<SystemOfUnits> klass = SystemOfUnits.class;
+		Field[] fields = klass.getFields();
+		for (Field f : fields)
+		{
+			try {
+				this.put(f.getName(), f.getDouble(units));
+			}
+			catch ( IllegalAccessException x )
+			{
+				throw new RuntimeException(x);
+			}
+		}
+	}
+}
\ No newline at end of file
CVSspam 0.2.8