jetweb is hosted by Hepforge, IPPP Durham

cedar.jetweb.model.plots
Class PlotSelection

java.lang.Object
  extended by cedar.jetweb.model.plots.PlotSelection
All Implemented Interfaces:
java.lang.Cloneable

public class PlotSelection
extends java.lang.Object
implements java.lang.Cloneable

Container for a pair of lists of plots - required plots and summary plots.

Version:
$Date: 2006-06-20 11:01:14 +0100 (Tue, 20 Jun 2006) $ $Revision: 1194 $
Author:
S.Butterworth, UCL

Field Summary
protected  int cssId
           
 
Constructor Summary
PlotSelection()
          Instantiate an empty PlotSelection
PlotSelection(int newCssId)
          Instantiate a PlotSelection based on a cross section set ID
 
Method Summary
 void addFitPlot(DataPlot plot)
           
 void clearFitPlots()
           
 java.lang.Object clone()
          Shallow clone.
 boolean fitEquals(PlotSelection selection)
          Do these selections specify the same plots.
 boolean fitIsEmpty()
           
 java.util.ArrayList<DataPlot> getFitPlots()
          Return the List of plots that are required to be included in the chi2 sum.
 int getId()
          Gets the cross section set ID corresponding to this plotselection.
 java.util.ArrayList<DataPlot> getRequiredPlots()
          Return the List of plots that are required to be present before a Fit can be made.
 java.util.ArrayList<DataPlot> getSumPlots()
          Return the List of plots that are required to be included in the chi2 sum.
 boolean isAvailable(Model model)
          Check whether all the required plots are actually available for this model.
 boolean isDefault()
          Does this paper selection contain all & only the "recommended" data?
 boolean isDefaultFit()
          Does this paper selection contain all & only the "recommended" data?
 boolean isDefaultSum()
          Does this paper selection contain all & only the "recommended" data?
 void requireLatest()
          Require all the latest data.
 void requireLatest(MCProcessType proc)
          Require the latest data of MCProcessType proc.
 void requirePaper(java.lang.String identifier)
          Require a specific paper.
 void setFitDefault()
          Set the plots to be fit for this PlotSelection to be the default one
 void setFitPlots(java.util.ArrayList<DataPlot> fp)
           
 void setFitToBest(Model model)
          Set the fit plots to the best selection available for this model.
 void setRequiredPlots(java.util.ArrayList<DataPlot> rp)
           
 void setSumDefault()
          Set the chi2 summary plots for this PlotSelection to be the default one
 void setSumPlots(java.util.ArrayList<DataPlot> sp)
           
 void setSumToBest(Model model)
          Set the sum plots to the best selection available for this model.
 boolean sumEquals(PlotSelection selection)
          Do these selections specify the same plots.
 boolean sumIsEmpty()
           
 java.lang.String toString()
          Returns PlotSelection in a readable form, mainly for debugging.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cssId

protected int cssId
Constructor Detail

PlotSelection

public PlotSelection()
Instantiate an empty PlotSelection


PlotSelection

public PlotSelection(int newCssId)
              throws JetWebException
Instantiate a PlotSelection based on a cross section set ID

Throws:
JetWebException

Method Detail

getRequiredPlots

public java.util.ArrayList<DataPlot> getRequiredPlots()
                                               throws JetWebException
Return the List of plots that are required to be present before a Fit can be made.

Throws:
JetWebException


setRequiredPlots

public void setRequiredPlots(java.util.ArrayList<DataPlot> rp)
                      throws JetWebException
Throws:
JetWebException

getSumPlots

public java.util.ArrayList<DataPlot> getSumPlots()
                                          throws JetWebException
Return the List of plots that are required to be included in the chi2 sum.

Throws:
JetWebException


setSumPlots

public void setSumPlots(java.util.ArrayList<DataPlot> sp)
                 throws JetWebException
Throws:
JetWebException

getFitPlots

public java.util.ArrayList<DataPlot> getFitPlots()
                                          throws JetWebException
Return the List of plots that are required to be included in the chi2 sum.

Throws:
JetWebException


setFitPlots

public void setFitPlots(java.util.ArrayList<DataPlot> fp)
                 throws JetWebException
Throws:
JetWebException

isDefaultSum

public boolean isDefaultSum()
                     throws JetWebException
Does this paper selection contain all & only the "recommended" data?

Throws:
JetWebException


isDefaultFit

public boolean isDefaultFit()
                     throws JetWebException
Does this paper selection contain all & only the "recommended" data?

Throws:
JetWebException


isDefault

public boolean isDefault()
                  throws JetWebException
Does this paper selection contain all & only the "recommended" data?

Throws:
JetWebException


setFitDefault

public void setFitDefault()
                   throws JetWebException
Set the plots to be fit for this PlotSelection to be the default one

Throws:
JetWebException


setSumDefault

public void setSumDefault()
                   throws JetWebException
Set the chi2 summary plots for this PlotSelection to be the default one

Throws:
JetWebException


fitEquals

public boolean fitEquals(PlotSelection selection)
                  throws JetWebException
Do these selections specify the same plots.

Throws:
JetWebException


sumEquals

public boolean sumEquals(PlotSelection selection)
                  throws JetWebException
Do these selections specify the same plots.

Throws:
JetWebException


getId

public int getId()
          throws JetWebException
Gets the cross section set ID corresponding to this plotselection. If there isn't one, it makes one and adds it to the DB. (The fitPlotList determines the cross section set)

Returns:
cssId.
Throws:
JetWebException


setSumToBest

public void setSumToBest(Model model)
                  throws JetWebException
Set the sum plots to the best selection available for this model. That is, to the selection containing the most available data which is flagged as in the default requirement.

Parameters:
model -
Throws:
JetWebException


setFitToBest

public void setFitToBest(Model model)
                  throws JetWebException
Set the fit plots to the best selection available for this model. That is, to the selection containing the most available data which is flagged as in the default requirement.

Parameters:
model -
Throws:
JetWebException


isAvailable

public boolean isAvailable(Model model)
                    throws JetWebException
Check whether all the required plots are actually available for this model.

Returns:
true if isAvailable
Throws:
JetWebException


clone

public java.lang.Object clone()
Shallow clone.

Overrides:
clone in class java.lang.Object


requireLatest

public void requireLatest()
                   throws JetWebException
Require all the latest data.

Throws:
JetWebException


requireLatest

public void requireLatest(MCProcessType proc)
                   throws JetWebException
Require the latest data of MCProcessType proc.

Throws:
JetWebException


requirePaper

public void requirePaper(java.lang.String identifier)
                  throws JetWebException
Require a specific paper.

Throws:
JetWebException


fitIsEmpty

public boolean fitIsEmpty()
                   throws JetWebException
Throws:
JetWebException

sumIsEmpty

public boolean sumIsEmpty()
                   throws JetWebException
Throws:
JetWebException

toString

public java.lang.String toString()
Returns PlotSelection in a readable form, mainly for debugging.

Overrides:
toString in class java.lang.Object


addFitPlot

public void addFitPlot(DataPlot plot)

clearFitPlots

public void clearFitPlots()