Commit in lcsim/src/org/lcsim/contrib/uiowa/template on MAIN
DebugInfoClusterList.java+7-11.2 -> 1.3
DebugInfoHitMap.java+7-11.1 -> 1.2
DebugInfoParticleList.java+9-21.1 -> 1.2
DebugInfoTrackList.java+8-11.1 -> 1.2
+31-5
4 modified files
Add some safety checks to debug drivers

lcsim/src/org/lcsim/contrib/uiowa/template
DebugInfoClusterList.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- DebugInfoClusterList.java	27 Jan 2006 23:54:51 -0000	1.2
+++ DebugInfoClusterList.java	4 Feb 2006 01:21:52 -0000	1.3
@@ -28,7 +28,13 @@
     public void process(EventHeader event) 
     {
 	// Read in the clusters:
-	List<Cluster> inputClusterList = event.get(Cluster.class, m_inputClusterListName);
+	List<Cluster> inputClusterList;
+	try {
+	    inputClusterList = event.get(Cluster.class, m_inputClusterListName);
+	} catch (java.lang.IllegalArgumentException x) {
+	    System.out.println("WARNING: cluster list ["+m_inputClusterListName+"] not found in event.");
+	    return;
+	}
 
 	int hitSum = 0;
 	Set<Long> uniqueCellIDs = new HashSet<Long>();

lcsim/src/org/lcsim/contrib/uiowa/template
DebugInfoHitMap.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- DebugInfoHitMap.java	17 Jan 2006 00:33:13 -0000	1.1
+++ DebugInfoHitMap.java	4 Feb 2006 01:21:52 -0000	1.2
@@ -27,7 +27,13 @@
     public void process(EventHeader event) 
     {
 	// Read in the clusters:
-	Map<Long, CalorimeterHit> inputHitMap = (Map<Long, CalorimeterHit>) (event.get(m_inputHitMapName));
+	Map<Long, CalorimeterHit> inputHitMap;
+	try {
+	    inputHitMap = (Map<Long, CalorimeterHit>) (event.get(m_inputHitMapName));
+	} catch (java.lang.IllegalArgumentException x) {
+	    System.out.println("WARNING: Hitmap ["+m_inputHitMapName+"] not found.");
+	    return;
+	}
 
 	int hitSum = 0;
         Set<CalorimeterHit> usedHits = new HashSet<CalorimeterHit>();

lcsim/src/org/lcsim/contrib/uiowa/template
DebugInfoParticleList.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- DebugInfoParticleList.java	17 Jan 2006 00:33:13 -0000	1.1
+++ DebugInfoParticleList.java	4 Feb 2006 01:21:52 -0000	1.2
@@ -17,13 +17,20 @@
     public void process(EventHeader event) 
     {
 	// Read in the clusters:
-	List<ReconstructedParticle> inputParticleList = event.get(ReconstructedParticle.class, m_inputParticleListName);
+	List<ReconstructedParticle> inputParticleList;
+	try {
+	    inputParticleList = event.get(ReconstructedParticle.class, m_inputParticleListName);
+	} catch (java.lang.IllegalArgumentException x) {
+	    System.out.println("WARNING: Particle list ["+m_inputParticleListName+"] not found.");
+	    return;
+	}
+
 	double energySum = 0.0;
 	for (ReconstructedParticle part : inputParticleList) {
 	    energySum += part.getEnergy();
 	}
 
-	System.out.println("There were "+inputParticleList.size()+" particles found in this event, for a total energy of "+energySum);
+	System.out.println("For particle list ["+m_inputParticleListName+"]: "+inputParticleList.size()+" particles, for a total energy of "+energySum);
     }
 
     String m_inputParticleListName;

lcsim/src/org/lcsim/contrib/uiowa/template
DebugInfoTrackList.java 1.1 -> 1.2
diff -u -r1.1 -r1.2
--- DebugInfoTrackList.java	17 Jan 2006 00:33:13 -0000	1.1
+++ DebugInfoTrackList.java	4 Feb 2006 01:21:53 -0000	1.2
@@ -15,7 +15,14 @@
 
     public void process(EventHeader event) 
     {
-	List<Track> inputTrackList = event.get(Track.class, m_name);
+	List<Track> inputTrackList;
+	try {
+	    inputTrackList = event.get(Track.class, m_name);
+	} catch (java.lang.IllegalArgumentException x) {
+	    System.out.println("WARNING: Track list ["+m_name+"] not found.");
+	    return;
+	}
+
 	System.out.println("Track list "+m_name+" contains "+inputTrackList.size()+" tracks.");
 	for (Track t : inputTrackList) {
 	    String paramDump = new String("   Params:");
CVSspam 0.2.8