00001 package SummaryReader; 00002 import java.io.*; 00003 00004 public class ReaderReportUtilities { 00005 public static void showTestReport(String sn, Test testResult) { 00006 StringBuffer htmlReport = new StringBuffer(guiUtilities.DaveUtils.getHTMLHeader("Test Report for "+sn)); 00007 htmlReport.append(testResult.getTestInfo().getSummaryTable()); 00008 htmlReport.append(testResult.getCommentsSummary()); 00009 htmlReport.append(testResult.getDAQInfo().getSummaryTable()); 00010 htmlReport.append(testResult.getScanInfo().getSummaryTable()); 00011 DCSInfo dcsInfo = testResult.getDCSInfo(); 00012 if(dcsInfo!=null) htmlReport.append(dcsInfo.getSummaryTable()); 00013 else htmlReport.append("<h3>DCS Info</h3>No DCS information available.\n"); 00014 LinkInfo linkInfo = testResult.getLinkInfo(); 00015 if(linkInfo==null) { 00016 int dataBlocks=testResult.noDataBlocks(); 00017 if(dataBlocks==0) htmlReport.append("<br>No chip data available<br>"); 00018 else for(int i=0;i<testResult.noDataBlocks();i++) htmlReport.append(testResult.getDataBlock(i).getSummaryTable()); 00019 } 00020 else htmlReport.append(linkInfo.getSummaryTable()); 00021 htmlReport.append(testResult.getDefectSummaryTable()); 00022 htmlReport.append(guiUtilities.DaveUtils.getHTMLFooter()); 00023 guiUtilities.HTMLViewer.getInstance().show(htmlReport.toString(),testResult.getTestInfo().getName()+" Report for "+sn); 00024 } 00025 public static void showIVTestReport(String sn, Test testResult) { 00026 StringBuffer htmlReport = new StringBuffer(guiUtilities.DaveUtils.getHTMLHeader("IVScan Report for "+sn)); 00027 htmlReport.append(testResult.getTestInfo().getSummaryTable()); 00028 DCSInfo dcsInfo = testResult.getDCSInfo(); 00029 if(dcsInfo!=null) htmlReport.append(dcsInfo.getSummaryTable()); 00030 else htmlReport.append("<br>No DCS information available."); 00031 htmlReport.append(testResult.getIVData().getSummaryTable()); 00032 00033 htmlReport.append(guiUtilities.DaveUtils.getHTMLFooter()); 00034 guiUtilities.HTMLViewer.getInstance().show(htmlReport.toString(),testResult.getTestInfo().getName()+" Report for "+sn); 00035 } 00036 }