GeomConverter/src/org/lcsim/detector/converter/compact
diff -u -r1.42 -r1.43
--- DetectorConverter.java 12 Mar 2009 23:43:10 -0000 1.42
+++ DetectorConverter.java 25 Mar 2009 00:29:12 -0000 1.43
@@ -8,6 +8,7 @@
import org.jdom.Element;
import org.jdom.JDOMException;
import org.lcsim.detector.DetectorElement;
+import org.lcsim.detector.DetectorElementStore;
import org.lcsim.detector.IDetectorElement;
import org.lcsim.detector.ILogicalVolume;
import org.lcsim.detector.IPhysicalVolume;
@@ -47,7 +48,10 @@
SystemMap sysMap;
public IPhysicalVolume convert(Detector detector, Document doc) throws JDOMException, IOException
- {
+ {
+ // Clear out DetectorElement store before building new detector.
+ DetectorElementStore.getInstance().clear();
+
// Convert materials.
convertMaterials("/org/lcsim/material/elements.xml");
convertMaterials("/org/lcsim/material/materials.xml");