GeomConverter/src/org/lcsim/geometry/compact/converter/html
diff -u -r1.2 -r1.3
--- HtmlConverter.java 10 Jan 2011 20:51:16 -0000 1.2
+++ HtmlConverter.java 10 Jan 2011 22:52:12 -0000 1.3
@@ -23,7 +23,7 @@
* Convert a compact description to an html information page.
*
* @author Jeremy McCormick <[log in to unmask]>
- * @version $Id: HtmlConverter.java,v 1.2 2011/01/10 20:51:16 jeremy Exp $
+ * @version $Id: HtmlConverter.java,v 1.3 2011/01/10 22:52:12 jeremy Exp $
*/
// TODO add css
// TODO add timestamp at bottom including generation date, user name, and compact file
@@ -351,8 +351,16 @@
Segmentation seg = ( Segmentation ) subdet.getReadout().getIDDecoder();
addLabeledRow( tbl, "Segmentation Type", seg.getClass().getSimpleName() );
}
- addLabeledRow( tbl, "Cell Size U", subdet.getReadout() != null ? cal.getCellSizeU() + " mm" : "NA" );
- addLabeledRow( tbl, "Cell Size V", subdet.getReadout() != null ? cal.getCellSizeV() + " mm" : "NA" );
+
+ try
+ {
+ addLabeledRow( tbl, "Cell Size U", subdet.getReadout() != null ? cal.getCellSizeU() + " mm" : "NA" );
+ addLabeledRow( tbl, "Cell Size V", subdet.getReadout() != null ? cal.getCellSizeV() + " mm" : "NA" );
+ }
+ catch (IndexOutOfBoundsException x)
+ {
+ // This can happen sometimes with a few types of Segmentation that have no cell U/V defined.
+ }
}
}
@@ -495,6 +503,6 @@
super( "a" );
this.setAttribute( "href", url );
this.setText( url );
- }
+ }
}
}
\ No newline at end of file