Commit in hps-java/src/main/java/org/lcsim/hps/recon/tracking on MAIN | |||
HPSHelicalTrackHitDriver.java | +8 | -2 | 1.2 -> 1.3 |
fix this Driver so it doesn't fail when MC data is missing
diff -u -r1.2 -r1.3 --- HPSHelicalTrackHitDriver.java 7 Jul 2011 20:57:38 -0000 1.2 +++ HPSHelicalTrackHitDriver.java 14 Mar 2012 01:22:19 -0000 1.3 @@ -326,8 +326,14 @@
HelicalTrackStrip strip = new HelicalTrackStrip(org, u, v, umeas, du, vmin, vmax, dEdx, time, rawhits, det, lyr, be);
- for (MCParticle p : h.getMCParticles()) { - strip.addMCParticle(p);
+ try { + if (h.getMCParticles() != null) { + for (MCParticle p : h.getMCParticles()) { + strip.addMCParticle(p); + } + } + } catch (RuntimeException e) { + // Okay when MC info not present.
} return strip; }
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1