Commit in lcsim/src/org/lcsim/contrib/uiowa/mipfinder on MAIN
MIPClusterBuilder.java+6-51.1 -> 1.2
MIPClusterDriver.java+2-21.1 -> 1.2
+8-7
2 modified files
Make type-safe; also added a bit more info to debug printouts

lcsim/src/org/lcsim/contrib/uiowa/mipfinder
MIPClusterBuilder.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- MIPClusterBuilder.java	29 Sep 2005 21:03:13 -0000	1.1
+++ MIPClusterBuilder.java	1 Oct 2005 01:29:29 -0000	1.2
@@ -84,11 +84,11 @@
 	    Set<Integer> layers = hitTable.keySet();
 	    for (Integer i : layers) {
 		Vector<CalorimeterHit> v = hitTable.get(i);
-		System.out.println(i+" "+v.size()); 
+		System.out.println(this.getClass().getName()+" init: layer "+i+": "+v.size()+" hits"); 
 		for (CalorimeterHit hit : v) {
 		    IDDecoder id = hit.getIDDecoder();
 		    id.setID(hit.getCellID());
-		    System.out.println("     "+hit.getRawEnergy()+" "+hit+" "+id.getTheta()+" "+id.getPhi());
+		    System.out.println(this.getClass().getName()+" init:    E="+hit.getRawEnergy()+", hit="+hit+", theta="+id.getTheta()+", phi="+id.getPhi());
 		}
 	    }
 	}
@@ -104,6 +104,7 @@
 
 	    if ( flash.find(hit) == null ) {
 		// Someone fed us a nucleus that's not in the hit list
+		// It can also be that the hit was used in a previous cluster.
 		continue; 
 	    }
 	    
@@ -138,13 +139,13 @@
 //
 	if ( lDebug ){
 	    for (Cluster cluster : vCluster) {
-		System.out.println(cluster);
+		System.out.println(this.getClass().getName()+" found cluster: "+cluster);
 		
 		int i=0; 
 		for (CalorimeterHit hit : cluster.getCalorimeterHits()) {
 		    IDDecoder id = hit.getIDDecoder();
 		    id.setID(hit.getCellID());
-		    System.out.println("  "+i+":"+hit+" "+id.getLayer()+" "+id.getTheta()+" "+id.getPhi());
+		    System.out.println(this.getClass().getName()+" found cluster:    hit #"+i+":"+hit+", layer="+id.getLayer()+", theta="+id.getTheta()+", phi="+id.getPhi());
 		    i++;
 		}
 	    }
@@ -164,7 +165,7 @@
 	id.setID(h.getCellID());
 	long[] neighbours = id.getNeighbourIDs(dLayer, dU, dV);
 
-	Vector<CalorimeterHit> vHits = new Vector(); 
+	Vector<CalorimeterHit> vHits = new Vector<CalorimeterHit>(); 
 
 	int iNeighboursInNextLayer = 0; 
 	for ( int i=0; i<neighbours.length; i++ ){

lcsim/src/org/lcsim/contrib/uiowa/mipfinder
MIPClusterDriver.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- MIPClusterDriver.java	29 Sep 2005 21:03:13 -0000	1.1
+++ MIPClusterDriver.java	1 Oct 2005 01:29:29 -0000	1.2
@@ -103,9 +103,9 @@
     private String userTag = null; 
     private String clusterName = null;// = "MIPCluster "+calType; 
 
-    private Vector nucleii = new Vector(); 
+    private Vector<CalorimeterHit> nucleii = new Vector<CalorimeterHit>(); 
     private boolean lUserNucleii = false; 
-    public void provideNucleii(Vector v){
+    public void provideNucleii(Vector<CalorimeterHit> v){
 	nucleii = v; 
 	lUserNucleii = true; 
     }
CVSspam 0.2.8