Commit in lcsim/src/org/lcsim/recon/cluster/nn on MAIN
NearestNeighborClusterer.java+2-81.9 -> 1.10
Fix coding error for using hitmap

lcsim/src/org/lcsim/recon/cluster/nn
NearestNeighborClusterer.java 1.9 -> 1.10
diff -u -r1.9 -r1.10
--- NearestNeighborClusterer.java	1 Jul 2006 21:56:52 -0000	1.9
+++ NearestNeighborClusterer.java	14 Sep 2007 13:59:12 -0000	1.10
@@ -12,6 +12,7 @@
 import org.lcsim.event.SimCalorimeterHit;
 import org.lcsim.geometry.CalorimeterIDDecoder;
 import org.lcsim.recon.cluster.util.*;
+import org.lcsim.util.hitmap.HitMap;
 import org.lcsim.util.Driver;
 
 /**
@@ -77,14 +78,7 @@
     public List<Cluster> createClusters(Map<Long, CalorimeterHit> hitmap)
     {
         // create a temporary map of cells keyed on their index
-        Map<Long, CalorimeterHit> tempmap = new HashMap<Long, CalorimeterHit>();
-        while (!hitmap.isEmpty())
-        {
-            Long k = hitmap.keySet().iterator().next();
-            CalorimeterHit hit = hitmap.get(k);
-            tempmap.put(k, hit);
-        }
-        List<Cluster> clusters = createClustersFromTempMap(tempmap);
+        List<Cluster> clusters = createClustersFromTempMap(new HitMap(hitmap));
         return clusters;
     }    
     public List<Cluster> createClustersFromTempMap(Map<Long, CalorimeterHit> hitmap)
CVSspam 0.2.8