Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

HTMLFitWriter.java

Go to the documentation of this file.
00001 package cedar.jetweb.html;
00002 
00003 import java.io.PrintWriter;
00004 import java.io.BufferedWriter;
00005 import java.io.File;
00006 import java.io.IOException;
00007 
00008 import java.text.SimpleDateFormat;
00009 import java.text.NumberFormat;
00010 
00011 import java.util.Date;
00012 import java.util.Enumeration;
00013 import java.util.Vector;
00014 import java.util.List;
00015 import java.util.Iterator;
00016 import java.util.Map;
00017 import java.util.Map.Entry;
00018 import java.util.TreeMap;
00019 
00020 import cedar.jetweb.*;
00021 import cedar.jetweb.model.*;
00022 import cedar.jetweb.model.paper.*;
00023 import cedar.jetweb.model.plots.*;
00024 import cedar.jetweb.model.fit.*;
00025 import cedar.jetweb.job.*;
00026 import cedar.jetweb.util.Match;
00027 import cedar.jetweb.hist.JetWebHist;
00028 import cedar.jetweb.generator.Generator;
00029 
00030 import cedar.jetweb.db.DBPlotManager;
00031 
00039 public class HTMLFitWriter extends HTMLWriter {
00040 
00050     public HTMLFitWriter(PrintWriter out, String newServletPath ){
00051 
00052     super(out,newServletPath);
00053     
00054     }
00055 
00056     public HTMLFitWriter(BufferedWriter out, String newServletPath ){
00057 
00058     super(out,newServletPath);
00059     
00060     }
00061 
00072     public HTMLFitWriter(String filename, String newServletPath ){
00073 
00074     super(filename,newServletPath);
00075 
00076     }
00077 
00082     public void endFitPage(String forward, String back){
00083     try {
00084         if (!forward.equals("")){
00085         ofile.write("<a href='"+forward+".html'>Next Fits</a> ");
00086         }
00087         if (!back.equals("")){
00088         ofile.write(" <a href='"+back+".html'>Previous Fits</a>");
00089         }
00090     } catch (IOException e){
00091         System.out.println("problem end of fit page");
00092         return;
00093     }
00094     close();
00095     }
00099     public void writeFitEditForm(String fitId){
00100 
00101     try{ 
00102         ofile.write("<div class='jetweb-buttons'>");
00103         openForm("POST", JetWebConfig.mainServletPath);
00104         ofile.write("<table>");
00105         
00106         ofile.write("<tr>");
00107         ofile.write("<td><P>Regenerate the fit using same data</TD>"); 
00108         ofile.write("<td><input type='RADIO' name='FITACTION' value='REDO' checked>");
00109         ofile.write("</tr>");
00110 
00111         /*
00112 
00113         ofile.write("<TR>");
00114         ofile.write("<TD COLSPAN=12><hr noshade size=1></TD>");
00115 
00116         ofile.write("<TR>");
00117         ofile.write("<TD><P>Zero the fit and logparms data and copy files to run/edit</P></TD>");
00118         ofile.write("<TD><INPUT TYPE=RADIO NAME=FITACTION VALUE=\"ZERO\">");
00119         
00120         ofile.write("<TD ALIGN=RIGHT><P>Reprocess new data straight afterwards:</TD>");
00121         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REPROCESS></TD>");
00122 
00123         ofile.write("<TD ALIGN=RIGHT><P>Zero/copy ee data</P></TD>");
00124         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEEE CHECKED>");
00125 
00126         ofile.write("<TD ALIGN=RIGHT><P>Zero/copy ep data</P></TD>");
00127         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEEP CHECKED>");
00128 
00129         ofile.write("<TD ALIGN=RIGHT><P>Zero/copy pp data</P></TD>");
00130         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEPP CHECKED>");
00131 
00132         ofile.write("<TR>");
00133         ofile.write("<TD COLSPAN=12><hr noshade size=1></TD>");
00134 
00135         ofile.write("<TR>");
00136         ofile.write("<TD><P>Completely remove the fit</P></TD>");
00137         ofile.write("<TD><INPUT TYPE=RADIO NAME=FITACTION VALUE=\"REMOVE\">");
00138 
00139         ofile.write("<TD ALIGN=RIGHT><P>Also remove the model</P></TD>");
00140         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEMODEL>");
00141 
00142         ofile.write("<TD ALIGN=RIGHT><P>Also remove ee RunSeries</P></TD>");
00143         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEEE>");
00144 
00145         ofile.write("<TD ALIGN=RIGHT><P>Also remove ep RunSeries</P></TD>");
00146         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEEP>");
00147 
00148         ofile.write("<TD ALIGN=RIGHT><P>Also remove pp RunSeries</P></TD>");
00149         ofile.write("<TD><INPUT TYPE=CHECKBOX NAME=REMOVEPP>");
00150                 
00151         ofile.write("<TR>");
00152         ofile.write("<TD COLSPAN=12><em>NB: These options not yet implemented. They will affect other fits too and should be used with care.</TD>");
00153 
00154         ofile.write("<TR>");
00155         ofile.write("<TD COLSPAN=12><hr noshade size=1></TD>");
00156 
00157 
00158         */
00159 
00160         ofile.write("<tr>");
00161         ofile.write("<td align='right' colspan='12'>");
00162         ofile.write("<input type='submit' name='SUBMITFITEDIT' value='Go'>");  
00163         ofile.write("<input type='hidden' name='FITID' value='"+fitId+"'>");
00164         ofile.write("</td></tr>");
00165         ofile.newLine();
00166         ofile.write("</table>");        
00167         closeForm();
00168         ofile.write("</div>");
00169         
00170     } catch ( IOException e ) {
00171         System.out.println("problem writing form");
00172     }
00173     }
00174     
00175 
00179     public void startPaperComparison(Paper paper,Fit fit1,Fit fit2){
00180     
00181     try {
00182         ofile.write("<TR>");
00183         ofile.write("<TD><I>"+paper.getTitle()+"</I></TD><TD><I>"+fit1.getId()+" Chi<SUP>2</SUP>/DOF</I></TD><TD><I>"+fit2.getId()+" Chi<SUP>2</SUP>/DOF</I></TD>");
00184         ofile.write("</TR>");
00185     } catch (IOException e){
00186         System.out.println("problem writing form");
00187     }
00188     
00189     }
00190 
00191 
00192     // Write papers & plots used in this fit.
00193     /*
00194     private void writePapers(Map<Integer,Paper> mcPapers, Fit fit) throws JetWebException {
00195 
00196     for (Paper mcPaper : (new TreeMap<Integer,Paper>(mcPapers)).values()){
00197         HTMLPaperWriter op = new HTMLPaperWriter(JetWebConfig.rootDirectory
00198                                +"/"+JetWebConfig.plotCacheDirName
00199                                +"/"+fit.getId()
00200                                +"/"+mcPaper.getDirName()
00201                                +"/paper.html"," ");
00202         op.display(mcPaper,fit);
00203         op.close();
00204     }
00205     }
00206     */
00207 
00208     public void endPaperComparison(){
00209     try {
00210         ofile.write("</table>");
00211     } catch (IOException e){
00212         System.out.println("problem writing form");
00213     }
00214 
00215     }
00216 
00217 
00221     private void writeVerbose(Fit fit) throws JetWebException {
00222 
00223     Model model = fit.getModel();
00224     Generator gen = model.getGenerator();
00225     PlotSelection selection = fit.getSelection();
00226     final Map<Integer,Paper> mcPapers = fit.getMCPapers();
00227         
00228     try{
00229 
00230         ofile.newLine();
00231 
00232         ofile.write("<div>");
00233         ofile.write("<p>The predictions were scaled by a factor of <b>"
00234             +dform.format(fit.getScale())
00235             +"</b>, determined by minimising the Chi2 for those plots used in the fit.</p>");
00236 
00237         // Writing the total chi2.
00238         ofile.write("<p>Chi2/Dof = "+dform.format(fit.getChi2()[0]/fit.getChi2()[1]));
00239         ofile.newLine();
00240         ofile.write(" for all fitted data.</p>");
00241         ofile.newLine();
00242         ofile.write("</div>");
00243         ofile.newLine();
00244 
00245         ofile.write("<div class='jetweb-buttons'>");
00246 
00247         openForm("POST", JetWebConfig.searchServletPath);
00248         ofile.write("<input type='HIDDEN' name='MODELID' value='"
00249             +model.getId()+"'>");
00250         ofile.write(HTMLUtils.writeSubmitButton("FINDDATA","Search for similar fits","Similar Fits"));
00251         closeForm();
00252 
00253         openForm("POST", JetWebConfig.searchServletPath);
00254         ofile.write("Compare to fit :");
00255         ofile.write("<input type='TEXT' name='FIT2'/>");
00256         ofile.write(HTMLUtils.writeSubmitButton("COMPAREFIT","Compare this fit to another fit - give the ID","GO"));
00257         ofile.write("<input type='HIDDEN' name='FIT1' value='"+fit.getId()+"'>");
00258         closeForm();
00259 
00260         openForm("POST", JetWebConfig.mainServletPath);
00261         ofile.write("<input type='HIDDEN' name='FITID' value='"+fit.getId()+"'>");
00262         ofile.write(HTMLUtils.writeSubmitButton("FITFIX",
00263                             "Get the fit maintenance form (password protected)",
00264                             "Maintenance"));
00265         closeForm();
00266 
00267         ofile.write("</div>");
00268 
00269 
00270         // Links to fitted Papers.
00271         ofile.write("<div class='jetweb-papers'>");
00272 
00273         ofile.write("<h3>Fitted data by process type and paper:</h3>");
00274         ofile.newLine();
00275         
00276         ofile.write("<table rules='rows' width='100%'><tr>");
00277         
00278         ofile.write("<td><p>Title</p></td>");
00279         ofile.write("<td><p>Spires</p></td>");
00280         ofile.write("<td><p>Plots</p></td>");
00281         ofile.write("<td><p>Chi2 Total</p></td>"); 
00282         ofile.write("<td><p>Per Dof</p></td>");
00283         ofile.write("<td><p>Experiment</p></td>"); 
00284         ofile.write("<td><p>Reference</p></td>");
00285 
00286 
00287         ofile.write("</tr>");
00288         
00289         for (MCProcessType proc : MCProcessType.getAll(true)){ 
00290 
00291         ofile.write("<tr class='jetweb-processtype'><td colspan='5'><p><b>"+proc.getMCProcessName()
00292                 +" "+proc.getCollision().toString()+" data</b></p></td>");
00293         ofile.write("</tr>");
00294 
00295 
00296         Vector<RunSeries> rsList = model.getRunSeries(proc);
00297         if (rsList.size()>0){
00298             RunSeries runSeries = rsList.firstElement();
00299             double chi2tmp[]=fit.getChi2(proc);
00300 
00301             ofile.write("<tr class='jetweb-summary'>");
00302             ofile.write("<td colspan='1'><p><b>Summary for this process type</b></p></td>");
00303 
00304 
00305             ofile.write("<td colspan='2'><p>Luminosity: "+dform.format(Math.abs( runSeries.getLumi()))
00306                 +"pb<sup>-1</sup></p></td>");
00307 
00308             ofile.write("<td><p>"+dform.format(chi2tmp[0])+"</p></td>");
00309             ofile.write("<td><p>"+dform.format(chi2tmp[0]/chi2tmp[1])+"</p></td>");
00310 
00311 
00312             ofile.write("<td><p>");
00313             openForm("POST", JetWebConfig.searchServletPath);
00314             //ofile.write("<input type='HIDDEN' name='FITID' value='"+fit.getId()+"'>");
00315             ofile.write("<input type='HIDDEN' name='RUNSERIESID' value='"+runSeries.getId()+"'>");
00316             ofile.write(HTMLUtils.writeSubmitButton("RSLOGS",
00317                                 "Inspect the logfiles for this fit and process.",
00318                                 "Log Files"));
00319             closeForm();
00320             ofile.write("</p></td>");
00321 
00322 
00323             ofile.write("</tr>");
00324 
00325         } else {
00326             ofile.write("<tr><td colspan='6'>Nothing generated for this process type.</td></tr>");
00327         }
00328 
00329 
00330         for (Paper paper : (new TreeMap<Integer,Paper>(mcPapers)).values()){
00331 
00332             ofile.newLine();
00333             if (paper.containsDataFor(proc)){
00334             ofile.write("<tr class='jetweb-fittedpaper'>");
00335 
00336             ofile.write("<td><p>"+paper.getTitle()+"</a></p></td>");
00337             ofile.write("<td><p>"+HTMLPaperWriter.getLink(paper)+"<p></td>");
00338             ofile.write("<td><p>");
00339             openForm("POST", JetWebConfig.searchServletPath);
00340             ofile.write("<input type='HIDDEN' name='FITID' value='"+fit.getId()+"'>");
00341             ofile.write("<input type='HIDDEN' name='PAPERID' value='"+paper.getId()+"'>");
00342             ofile.write(HTMLUtils.writeSubmitButton("PAPER",
00343                                 "Inpect the fitted plots for this paper.",
00344                                 "Plots"));
00345             closeForm();
00346             ofile.write("</td></p>");
00347 
00348             ofile.write("<td><p>"+dform.format(paper.getChi2(fit.getId()))+"</p></td>");
00349             ofile.write("<td><p>"+dform.format(paper.getChi2(fit.getId())/paper.getDOF(fit.getId()))
00350                     +"</p></td>");
00351 
00352 
00353 
00354             ofile.write("<td><p>"+paper.getCollaboration()+"</p></td>");
00355             ofile.write("<td><p>"+paper.getReference()+"</p></td>");
00356             ofile.write("</tr>");
00357             }
00358         }
00359         }
00360         ofile.write("</table>");
00361         ofile.newLine();
00362 
00363 
00364     } catch (IOException e) {
00365         System.out.println("Lost html file!!"+e);
00366         e.printStackTrace();
00367     } catch (JetWebException e){
00368         throw new JetWebException(e);
00369     }
00370 
00371     }
00372 
00373 
00378     public static void writeFitPage(Fit fit){
00379 
00380     // create a new HTML file for the fit
00381     File htmlfile = 
00382         new File(JetWebConfig.rootDirectory
00383              +"/"+JetWebConfig.plotCacheDirName
00384              +"/"+Integer.toString(fit.getId())+"/index.html");
00385 
00386     //if the directory doesn't exist, create it
00387     if (!(htmlfile.getParentFile().exists())) { 
00388         htmlfile.getParentFile().mkdirs();
00389     }
00390 
00391     //if the file already exists, overwrite it with an empty file
00392     try {
00393         if (htmlfile.exists()){
00394         htmlfile.delete();
00395         }
00396 
00397         System.out.println("Writing HTML File");        
00398         htmlfile.createNewFile();
00399         
00400         System.out.println(htmlfile.getPath());
00401         HTMLFitWriter op = new HTMLFitWriter(htmlfile.getPath()," ");
00402 
00403         try {
00404         op.writeVerbose(fit);
00405         } catch (JetWebException jwe){
00406         HTMLErrorWriter.write(op.getWriter(),jwe);
00407         }
00408         op.close();
00409     } catch (IOException e) {
00410         System.out.println("Unable to make html file"+e);
00411     }
00412     
00413     }
00414 
00415 
00416 
00417 
00421     public static void writeCompareFitsPage(String fitId1,String fitId2,
00422                         PrintWriter out,
00423                         String servletPath
00424                         ) throws JetWebException {
00425 
00426     //extract 2 fits to compare
00427     Fit fit1=new Fit(Integer.parseInt(fitId1));
00428     Fit fit2=new Fit(Integer.parseInt(fitId2));
00429 
00430     // Start new page.
00431     String title = "Comparison of Fit "+fitId1+" and Fit "+fitId2;
00432     System.out.println(title);
00433     HTMLFitWriter fw = new HTMLFitWriter(out,servletPath);
00434 
00435 
00436     // First compare the model parameters.
00437     HTMLModelWriter mw = new HTMLModelWriter(fw.getWriter(),servletPath);
00438     mw.listDifferences(fit1.getModel(),fit2.getModel());
00439 
00440 
00441     // Now the plots.
00442     fw.makeComparison(fit1,fit2);
00443     fw.close();
00444     }
00445 
00446 
00453     public void makeComparison(Fit fit1, Fit fit2){
00454     
00455     try {
00456 
00457         // compare each set of papers
00458         Map mcPapers1 = fit1.getMCPapers();
00459         Map mcPapers2 = fit2.getMCPapers();
00460         
00461         Iterator paperIds = mcPapers1.keySet().iterator();
00462         if (!paperIds.hasNext()){
00463         System.out.println("Fit: no papers");
00464         }
00465 
00466         ofile.write("<table>");
00467         ofile.write("<tr>");
00468         ofile.write("<td><h2>Plot Comparison</td>"); 
00469         ofile.write("</tr>");
00470         
00471         ofile.write("<tr><td colspan='12'>");
00472         ofile.write("<hr noshade size='3'></td></tr>");
00473                                 
00474         while (paperIds.hasNext()){
00475         Integer key = (Integer)paperIds.next();
00476         if (mcPapers2.containsKey(key)){
00477             Paper paper1 = (Paper)mcPapers1.get(key);
00478             Paper paper2 = (Paper)mcPapers2.get(key);
00479 
00480             comparePlots(paper1,paper2,fit1,fit2);
00481         }
00482         }
00483         // End the table.
00484         endPaperComparison();
00485 
00486         
00487     } catch (Exception e){
00488         System.out.println("Fit: Exception in compare fits "+e);
00489         e.printStackTrace();
00490     }
00491     
00492        
00493     }
00494 
00495 
00501     private void comparePlots(Paper paper1, Paper paper2,
00502                   Fit fit1,Fit fit2){
00503 
00504     Map plots1 = paper1.getIndexedPlots();
00505     Map plots2 = paper2.getIndexedPlots();
00506 
00507     Iterator ids = plots1.keySet().iterator();
00508 
00509     if (ids.hasNext()){
00510         startPaperComparison(paper1,fit1,fit2);
00511 
00512         while (ids.hasNext()){
00513         Integer key=(Integer)ids.next();
00514         if (plots2.containsKey(key)){
00515             DataPlot plot1 = (DataPlot)plots1.get(key);
00516             DataPlot plot2 = (DataPlot)plots2.get(key);
00517 
00518             double[] c21 = {0.0,1.0};
00519             double[] c22 = {0.0,1.0};
00520             try{
00521             c21 = DBPlotManager.getChi2(plot1.getId(),fit1.getId());
00522             c22 = DBPlotManager.getChi2(plot2.getId(),fit2.getId());
00523             } catch (Exception e){
00524             System.out.println("Fit: problem finding Chi2 for plot"+plot1.getId()+" or plot"+plot2.getId());
00525             }
00526             
00527             double val1 = 0;
00528             double val2 = 0;
00529 
00530             //System.out.println("Chi2 1:"+c21[0]+":"+c21[1]+" Chi2 2:"+c22[0]+":"+c22[1]);
00531             try {
00532             val1 = c21[0]/c21[1];
00533             } catch (Exception e){
00534             }
00535             try {
00536             val2 = c22[0]/c22[1];
00537             } catch (Exception e){
00538             }
00539             HTMLPlotWriter.writePlotComparison(this.getWriter(),plot1,val1,val2);
00540 
00541         }
00542         }
00543     }   
00544     }
00545 
00546 
00547 
00548 
00552     public void display(Fit fit) throws JetWebException {
00553 
00554     try { 
00555 
00556         Integer fitId;
00557         if (fit==null) {
00558         fitId = null;
00559         } else {
00560         fitId = new Integer(fit.getId());
00561         }
00562         
00563         ofile.write("<div class='jetweb-fit'>");
00564         
00565         if (verbose) {
00566         ofile.write("<p>A fit is the result of comparing predictions of a specific <em>model</em> to a <em>selection of data</em></p>");  
00567         }
00568 
00569         // The Fit ID   
00570         if (!hidden) {
00571         ofile.write("Fit ID: ");
00572         ofile.write(fitId.toString());
00573         } 
00574         if (hidden || (!modifiable && fitId != null)) {
00575         ofile.write("<input type='HIDDEN' name='FITID' value='"+fitId+"'>");
00576         }
00577 
00578 
00579         if (fit != null) {
00580 
00581         //ofile.write(" Date: "+dateFormat.format(fit.getDate()));
00582 
00583         ofile.write(" Scale: "+dform.format(fit.getScale()));
00584         
00585         ofile.newLine();
00586 
00587         // Writing the total chi2.
00588         if (!fit.getSelection().isDefaultSum()){
00589             ofile.write(" Chi2 for your selected plots: "
00590                 +dform.format(fit.getChi2()[0]/fit.getChi2()[1]));
00591         } else {
00592             ofile.write(" Chi2 for default plots: "
00593                 +dform.format(fit.getChi2()[0]/fit.getChi2()[1]));
00594         }
00595         ofile.newLine();
00596 
00597         if (!verbose) {
00598 
00599             openForm("POST", JetWebConfig.searchServletPath);
00600             ofile.write("<input type='HIDDEN' name='FITID' value='"+fit.getId()+"'>");
00601             ofile.write(HTMLUtils.writeSubmitButton("FITIDGET",
00602                                 "Show more details for this fit",
00603                                 "Details"));
00604             closeForm();
00605 
00606             ofile.write(" <A href='"+JetWebConfig.getHTMLRoot()
00607                 +"/"+JetWebConfig.plotCacheDirName
00608                 +"/"+fit.getId()
00609                 +"/index.html'>Full details</A> ");
00610 
00611 
00612         } else {
00613 
00614             openForm("POST", JetWebConfig.searchServletPath);
00615             ofile.write("<input type='HIDDEN' name='PLOTSELECTIONID' value='"+fit.getPlotSelection().getId()+"'>");
00616             ofile.write(HTMLUtils.writeSubmitButton("PLOTSELECTIONIDGET",
00617                                 "Show which data were used in this fit",
00618                                 "Data Selection"));
00619             closeForm();
00620             
00621             openForm("POST", JetWebConfig.searchServletPath);
00622             ofile.write("<input type='HIDDEN' name='MODELID' value='"+fit.getModel().getId()+"'>");
00623             ofile.write(HTMLUtils.writeSubmitButton("MODELIDGET",
00624                                 "Show the model used in this fit",
00625                                 "Model"));
00626             closeForm();
00627 
00628             // More details.
00629             writeVerbose(fit);
00630 
00631         }
00632 
00633         }
00634     
00635         ofile.write("</div>");
00636 
00637         //} catch (JetWebException e){
00638         //HTMLErrorWriter.write(ofile,e);
00639     } catch (IOException ioe) {
00640         ioe.printStackTrace(System.out);
00641         throw new JetWebException(ioe);
00642     }
00643     
00644         
00645         /*
00646 
00647         // Select sort
00648         ofile.write("<td align=\"left\" colspan=\"3\"> <P>Sort fits by:");
00649         ofile.newLine();
00650         ofile.write("<select name=\"SORT\" title=\"The returned fits will be sorted by the selected property\" size=\"1\">");
00651         ofile.write("<OPTION>"+HTMLUtils.CHI2ALL);//Overall Chi2
00652         ofile.write("<OPTION>"+HTMLUtils.CHI2HIGH);
00653         ofile.write("<OPTION>"+HTMLUtils.CHI2LOW);
00654         ofile.write("<OPTION>"+HTMLUtils.CHI2CHARM);
00655         ofile.write("<OPTION>"+HTMLUtils.CHI2SHAPE);
00656         ofile.write("<OPTION>"+HTMLUtils.CHI2ALLEP);//Overall Chi2
00657         ofile.write("<OPTION>"+HTMLUtils.CHI2HIGHEP);
00658         ofile.write("<OPTION>"+HTMLUtils.CHI2LOWEP);
00659         ofile.write("<OPTION>"+HTMLUtils.CHI2CHARMEP);
00660         ofile.write("<OPTION>"+HTMLUtils.CHI2SHAPEEP);
00661         ofile.write("<OPTION>"+HTMLUtils.CHI2ALLEE);//Overall Chi2
00662         ofile.write("<OPTION>"+HTMLUtils.CHI2HIGHEE);
00663         ofile.write("<OPTION>"+HTMLUtils.CHI2LOWEE);
00664         ofile.write("<OPTION>"+HTMLUtils.CHI2CHARMEE);
00665         ofile.write("<OPTION>"+HTMLUtils.CHI2SHAPEEE);
00666         ofile.write("<OPTION>"+HTMLUtils.CHI2ALLPP);//Overall Chi2
00667         ofile.write("<OPTION>"+HTMLUtils.CHI2HIGHPP);
00668         ofile.write("<OPTION>"+HTMLUtils.CHI2LOWPP);
00669         ofile.write("<OPTION>"+HTMLUtils.CHI2CHARMPP);
00670         ofile.write("<OPTION>"+HTMLUtils.CHI2SHAPEPP);
00671         ofile.write("<OPTION>"+HTMLUtils.DATE);
00672         ofile.write("</SELECT></P>");
00673         ofile.newLine();
00674 
00675 
00676         //ofile.write("<TD><P>Only show me fits with data from:");
00677         //ofile.newLine();
00678         //ofile.write("<SELECT NAME=REQUIREDATA SIZE=1>");
00679         //ofile.write("<OPTION>"+DONTCARE);
00680         //ofile.write("<OPTION>"+LATEST);
00681         //ofile.write("<OPTION>"+LATESTEP);
00682         //ofile.write("<OPTION>"+LATESTEE);
00683         //ofile.write("<OPTION>"+LATESTPP);
00684         //Enumeration paperlist = PaperBank.getAll();
00685         //while (paperlist.hasMoreElements()){
00686         //  ofile.write("<OPTION>"+ ((Paper)paperlist.nextElement()).getDirName());
00687         //}
00688         //ofile.write("</SELECT></P>");
00689         ofile.newLine();
00690 
00691         ofile.write("</div>");
00692         */
00693     }
00694 
00695 
00699     public void display(Object object) throws JetWebException {
00700     
00701     if (object instanceof Fit){
00702         display((Fit)object);
00703     } else {
00704         throw new JetWebException("Attempt to display "+object,"Using "+this);
00705     }
00706     }
00707 
00708 }
00709 
00710 
00711 
00712 
00713 
00714 
00715 
00716 
00717 
00718 

Generated Wed Jan 17 09:14:27 GMT 2007