Print

Print


Commit in GeomConverter/src/org/lcsim/detector on MAIN
DetectorElementStore.java+2-271.11 -> 1.12
JM: cleanup

GeomConverter/src/org/lcsim/detector
DetectorElementStore.java 1.11 -> 1.12
diff -u -r1.11 -r1.12
--- DetectorElementStore.java	28 Aug 2007 06:24:56 -0000	1.11
+++ DetectorElementStore.java	14 Sep 2007 23:48:19 -0000	1.12
@@ -23,12 +23,7 @@
     {   
     	// Add to the list using super, which will check for dups, etc.
     	super.add(de);
-    	
-    	//System.out.println("adding DetectorElement " + de.getName() +" ...");
-    	
-    	//if (this.contains(de))
-    	//	throw new RuntimeException("weirdness! trying to add " + de.getName() + " twice!");
-    	
+    	    	
     	// Check to see if the id is cacheable ...
     	
     	IIdentifier id = de.getIdentifier(); 
@@ -39,16 +34,6 @@
     		// Is the id flagged as valid?
     		if (id.isValid())
     		{
-    			//IDetectorElementContainer dups = find(id);
-    		
-    			// Is the id unique?
-    			//if (dups.size() > 0)
-    			//{
-    			//	throw new IllegalArgumentException("Cannot add DetectorElement <" 
-    			//			+ de.getName() + "> because its identifier <"+id
-    			//			+"> is already used by <"+dups.get(0).getName()+">.");
-    			//}    		
-
     			// Cache this DE in the lookup map.
     			cache.put(id.getValue(), de);
     		}
@@ -63,15 +48,5 @@
     	IDetectorElement lookup = cache.get(id.getValue());
     	if (lookup != null) match.add(lookup);
     	return match;
-    }                
- 
-    public String toString()
-    {
-    	StringBuffer buff = new StringBuffer();
-    	for (IDetectorElement de : this)
-    	{
-    		buff.append(de.getName());
-    	}
-    	return buff.toString();
-    }
+    }                 
 }
\ No newline at end of file
CVSspam 0.2.8