hps-java/src/main/java/org/lcsim/hps/recon/tracking
diff -u -r1.27 -r1.28
--- TrackerReconDriver.java 12 Oct 2012 20:29:04 -0000 1.27
+++ TrackerReconDriver.java 17 Oct 2012 22:58:21 -0000 1.28
@@ -188,8 +188,11 @@
// Debug printouts.
if (debug) {
- System.out.println(this.getClass().getSimpleName() + ": The HelicalTrackHit collection " + stInputCollectionName + " has " + event.get(HelicalTrackHit.class, stInputCollectionName).size() + " hits.");
-
+ if(event.hasCollection(HelicalTrackHit.class,stInputCollectionName)) {
+ System.out.println(this.getClass().getSimpleName() + ": The HelicalTrackHit collection " + stInputCollectionName + " has " + event.get(HelicalTrackHit.class, stInputCollectionName).size() + " hits.");
+ } else {
+ System.out.println(this.getClass().getSimpleName() + ": No HelicalTrackHit collection for this event");
+ }
// Check for Tracks.
List<Track> tracks = event.get(Track.class, trackCollectionName);
System.out.println(this.getClass().getSimpleName() + ": The Track collection " + trackCollectionName + " has " + tracks.size() + " tracks.");