java/branches/hps_java_trunk_HPSJAVA-251/evio/src/main/java/org/hps/evio
--- java/branches/hps_java_trunk_HPSJAVA-251/evio/src/main/java/org/hps/evio/ECalEvioReader.java 2014-09-12 18:20:33 UTC (rev 1018)
+++ java/branches/hps_java_trunk_HPSJAVA-251/evio/src/main/java/org/hps/evio/ECalEvioReader.java 2014-09-12 19:20:26 UTC (rev 1019)
@@ -168,7 +168,7 @@
}
- long id = daqToGeometryId(crate, slot, channel);
+ Long id = daqToGeometryId(crate, slot, channel);
// Long id = EcalConditions.daqToPhysicalID(crate, slot, channel);
System.out.println("The long id is: " + id);
@@ -193,10 +193,13 @@
return hits;
}
- private long daqToGeometryId(int crate, short slot, short channel) {
+ private Long daqToGeometryId(int crate, short slot, short channel) {
DaqId daqId = new DaqId(new int[]{crate,slot,channel});
EcalChannel ecalChannel = channels.findChannel(daqId);
- if(ecalChannel == null) throw new RuntimeException("Daq Id not found.");
+ if(ecalChannel == null) {
+ System.out.println("Daq Id not found.");
+ return null;
+ }
int ix = ecalChannel.getX();
int iy = ecalChannel.getY();
GeometryId geometryId = new GeometryId(helper, new int[]{subDetector.getSystemID(),ix,iy});