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

RealPlot Class Reference

Inheritance diagram for RealPlot:

Inheritance graph
[legend]
Collaboration diagram for RealPlot:

Collaboration graph
[legend]
List of all members.

Detailed Description

Plot of a real data set.

Author:
S Butterworth, UCL.
Version:
Date
2006-11-23 19:07:42 +0000 (Thu, 23 Nov 2006)
Revision
1316

Definition at line 21 of file RealPlot.java.


Public Member Functions

 RealPlot (final int number, int paperIdIn) throws JetWebException
 RealPlot ()
void setScale (double newScale)
CutCollection getCutCollection ()
boolean retrieve () throws JetWebException
boolean store () throws JetWebException
MCProcessType getMCProcessType () throws JetWebException
boolean equals (RealPlot rp)
int getProcIdWanted () throws JetWebException
void delete () throws JetWebException
int getId ()
void setId (int newId)
int getNumber ()
void setNumber (int newnum)
DataPlot setCutCollection (CutCollection cuts)
double getSysScale ()
void setSysScale (double scale)
boolean isDefaultFit ()
void setDefaultFit (boolean isit)
boolean isDefaultSum ()
void setDefaultSum (boolean isit)
boolean isLogarithmic ()
void setLogarithmic (boolean b)
boolean isShape ()
void setShape (boolean isit)
String getTitle ()
void setTitle (String newtitle)
int getNDataSources ()
String getYLabel ()
void setYLabel (String newlabel)
String getXLabel ()
void setXLabel (String newlabel)
boolean hasData () throws JetWebException
void setHasData (boolean b)
Vector< DataPointgetDataPoints () throws JetWebException
void setDataPoints (Collection< DataPoint > newDataPoints)
double getYMin ()
double getYMinNonZero ()
double getYMax ()
void setFrom (DataPlot plot)
boolean populateDBData () throws JetWebException
void zero ()
boolean isPredictedBy (RunSeries rs)
Iterator< PlotSwitchgetSwitches () throws JetWebException
void addSwitch (PlotSwitch ps)
void deleteSwitch (PlotSwitch ps) throws JetWebException
double getCMEnergy ()
void setCMEnergy (double e)
void setPaperId (int newPaperId)
int getPaperId ()
void storeSwitches () throws JetWebException
double[] getChi2 ()
double[] getChi2 (int fitId)
void setChi2 (double[] newchi2)
int getCollisionId ()
void setCollisionId (int id)
int getProcIdWanted (Generator gen) throws JetWebException
int getId ()

Static Public Member Functions

double[] getChi2 (int plotId, int fitId)

Static Public Attributes

final String REAL = DBPlotManager.REAL
final String PREDICTED = DBPlotManager.PREDICTED
final String FITTED = DBPlotManager.FITTED

Protected Attributes

double sysScale = 1.0
int number
String title = "No title"
int collisionId
int procIdWanted
CutCollection cuts_
Vector< DataPointdataPoints
int paperId
double[] chi2 = new double[]{0,0}
double ecms
int csnId = -1
boolean hasdata = false
boolean shape
MCProcessType proc

Package Attributes

HashSet< PlotSwitchswitches

Private Member Functions

void insertCrossSection () throws JetWebException
void updateCrossSection () throws JetWebException

Constructor & Destructor Documentation

RealPlot final int  number,
int  paperIdIn
throws JetWebException
 

Instantiate a DataPlot based upon an plotML file.

Parameters:
number integer ID of this plot within the paper (not the csn_id!)
paperId integer ID of the paper to which this plot belongs. Warning: here the csnId is not set to a sensible value. This should be done externally using the setId method.

Definition at line 29 of file RealPlot.java.

00030                            {
00031     this.paperId = paperIdIn;
00032     this.number = number;
00033     hasdata=false;
00034     }

RealPlot  ) 
 

Instantiates an empty DataPlot (to be filled from DB).

Definition at line 39 of file RealPlot.java.

00039                      {
00040     }


Member Function Documentation

void addSwitch PlotSwitch  ps  )  [inherited]
 

Add this plotSwitch to the list for this plot.

Definition at line 358 of file DataPlot.java.

References DataPlot.switches.

Referenced by ServletUtils.addPlot(), DataPlot.getSwitches(), and ServletUtils.modifyPlots().

00358                                          {
00359 
00360     /*
00361     Iterator psl = switches.iterator();
00362     while (psl.hasNext()){
00363         if (ps.equals((PlotSwitch)psl.next())){
00364         return;
00365         }
00366     }
00367     */
00368     switches.add(ps);
00369     }

void delete  )  throws JetWebException
 

Delete this plot from the data base and remove all record of it from the paper. Also delete all predictions and fits for this plot.

Definition at line 187 of file RealPlot.java.

References MCProcessType.delete().

Referenced by Paper.delete(), and ServletUtils.deletePlots().

00187                                                 {
00188 
00189     DBPlotManager.delete(this);
00190 
00191     }

void deleteSwitch PlotSwitch  ps  )  throws JetWebException [inherited]
 

Delete this plotSwitch from the list and the DB.

Definition at line 374 of file DataPlot.java.

References DataPlot.switches.

Referenced by ServletUtils.modifyPlots().

00374                                                                    {
00375 
00376     if (switches.contains(ps)) {
00377         switches.remove(ps);
00378     }
00379     DBPlotManager.delete(ps);
00380 
00381     }

boolean equals RealPlot  rp  ) 
 

Override the Object equals method. Two RealPlots are equal if their id's are equal.

Definition at line 170 of file RealPlot.java.

References DataPlot.getId().

00170                                       {
00171     return (csnId==rp.getId());
00172     }

double [] getChi2 int  fitId  )  [inherited]
 

Return a double array [chi2,dof] for this fit.

Returns:
double[2] - [chi2,dof]

Definition at line 464 of file DataPlot.java.

References DataPlot.getId().

00464                                        {
00465     return DBPlotManager.getChi2(getId(),fitId);
00466      }

double [] getChi2 int  plotId,
int  fitId
[static, inherited]
 

Lightweight way of getting the chi2 for a plot without instantiating the plot.

Definition at line 456 of file DataPlot.java.

00456                                                          {
00457     return DBPlotManager.getChi2(plotId,fitId);
00458     }

double [] getChi2  )  [inherited]
 

Return a double array [chi2,dof]

  • comparison between this plot and another.

Returns:
double[2] - [chi2,dof]

Reimplemented in FittedPlot.

Definition at line 414 of file DataPlot.java.

Referenced by Paper.fit(), and DataPlot.setFrom().

00414                               {
00415      return chi2;
00416      }

double getCMEnergy  )  [inherited]
 

Definition at line 383 of file DataPlot.java.

00383 { return ecms; }

int getCollisionId  )  [inherited]
 

Definition at line 433 of file DataPlot.java.

Referenced by RealPlot.getMCProcessType(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00433 { return collisionId; }

CutCollection getCutCollection  ) 
 

Reimplemented from DataPlot.

Definition at line 50 of file RealPlot.java.

Referenced by ServletUtils.modifyPlots().

00050                                            {
00051     try{
00052         if(cuts_==null && csnId>0) DBPlotManager.fromDB(this);
00053     }catch(JetWebException err){
00054         System.out.println
00055         ("RealPlot: unable to retrieve cut collection for this plot");
00056         err.printStackTrace();
00057         System.out.println(err.getMessage());
00058     }
00059     return cuts_;
00060     }

Vector<DataPoint> getDataPoints  )  throws JetWebException [inherited]
 

Return an Vector of data point objects

See also:
cedar.jetweb.model.plots.DataPoint

Definition at line 192 of file DataPlot.java.

References DataPlot.dataPoints.

Referenced by PredictedPlot.add(), JetWebHist.buildHist(), Paper.fit(), FittedPlot.FittedPlot(), PredictedPlot.fixZeroErrors(), CombinedPaper.getFitChi2(), PredictedPlot.hasData(), DBPlotManager.insertData(), DataPlot.populateDBData(), and HTMLPlotWriter.writePlotText().

00192                                                                     {
00193     if (dataPoints==null){
00194         dataPoints = DBPlotManager.getDataPoints(this);
00195     }
00196     return dataPoints;
00197     }

int getId  )  [inherited]
 

Get the unique ID of the object

Implemented in Cut, CutCollection, LogFile, Collision, Fit, MCProcessType, Model, Paper, RealPaper, PlotSwitch, and RunSeriesCollection.

int getId  )  [inherited]
 

Get csnId (the unique identifier of this cross section)

Definition at line 100 of file DataPlot.java.

Referenced by MergedPlot.add(), ServletUtils.addPlot(), RealPaper.addPlot(), Paper.addPlot(), MergedPlot.addPlot(), CombinedPaper.CombinedPaper(), HTMLFitWriter.comparePlots(), RealPlot.equals(), Paper.fit(), Paper.fixFit(), Fit.getChi2(), DataPlot.getChi2(), DBPlotManager.getDeleteString(), RealPlot.getMCProcessType(), DataPlot.getProcIdWanted(), DBPlotManager.getQueryString(), ServletUtils.modifyPlots(), PredictedPlot.PredictedPlot(), DataPlot.setFrom(), and DataPlot.zero().

00100 { return csnId; }

MCProcessType getMCProcessType  )  throws JetWebException [virtual]
 

Return the default MCProcessType for this plot.

Implements DataPlot.

Definition at line 135 of file RealPlot.java.

References MCProcessType.getCollision(), DataPlot.getCollisionId(), PlotSwitch.getGeneratorName(), DataPlot.getId(), Collision.getId(), PlotSwitch.getMCProcessType(), PlotSwitch.getParameterName(), and DataPlot.getSwitches().

00135                                                                    {
00136 
00137     if (!(proc==null)) { 
00138         //System.out.println("RealPlot: not working it out");
00139         return proc; 
00140     } else {
00141 
00142         //System.out.println("RealPlot: working it out");
00143 
00144 
00145         // Work out the MCProcessType from the plotSwitches.
00146         Iterator list = getSwitches();
00147         while (list.hasNext()){
00148         PlotSwitch pSwitch = (PlotSwitch)list.next();
00149         if ((pSwitch.getGeneratorName()==null) && (pSwitch.getParameterName()==null)){
00150             proc = pSwitch.getMCProcessType();
00151     
00152             if (this.getCollisionId()!=proc.getCollision().getId()){
00153             throw new JetWebException("Inconsistent plot switch for for plotId="
00154                           +this.getId(),"collisionId:"
00155                           +proc.getCollision().getId());
00156             }
00157             return proc;
00158         }
00159         }
00160     }
00161     // If we get here, there is no default plotSwitch and no existing processType.
00162     proc = PlotSwitch.defaultProc(new Collision(getCollisionId()));
00163     return proc;
00164     }

int getNDataSources  )  [inherited]
 

Number of data sources associated with this plot.

Definition at line 161 of file DataPlot.java.

Referenced by JetWebHist.buildHist().

00161 {return nDataSources;}

int getNumber  )  [inherited]
 

Get plot number. The plot number identifies the plot within the paper, and corresponds to the ID within the generation package (HZTool or Rivet).

Definition at line 110 of file DataPlot.java.

Referenced by ServletUtils.addPlot(), LogFile.addPlots(), JetWebHist.buildHist(), Paper.fit(), ServletUtils.modifyPlots(), DataPlot.setFrom(), and JetWebHist.writeGraphics().

00110 { return number; }

int getPaperId  )  [inherited]
 

Definition at line 393 of file DataPlot.java.

Referenced by DataPlot.setFrom().

00393 { return paperId; }

int getProcIdWanted Generator  gen  )  throws JetWebException [inherited]
 

Return the Id of the MCProcessType which should be used to generate this plot for the model which was used.

Definition at line 473 of file DataPlot.java.

References DataPlot.collisionId, PlotSwitch.getId(), DataPlot.getId(), PlotSwitch.getMCProcessTypeId(), and DataPlot.procIdWanted.

00473                                                                      {
00474 
00475     if (procIdWanted==0){
00476 
00477         Vector<PlotSwitch> bestMatches = 
00478         DBPlotManager.getMatchedSwitches(this.getId(),gen);
00479 
00480         int procIdDefault = (PlotSwitch.defaultProc(new Collision(collisionId))).getId(); 
00481         
00482         if (bestMatches.size()!=0) { 
00483         
00484         // Apply the switches.
00485         for (PlotSwitch pSwitch : bestMatches) { 
00486 
00487             if ( (pSwitch.getParameterName()==null)){
00488             // This is the default for this plot.
00489             procIdDefault = pSwitch.getMCProcessTypeId();
00490             } else {
00491             if (pSwitch.getParameterName().equals("pthat")){
00492                 try {
00493 
00494                 Double genPthat = gen.getPthat();
00495 
00496                 if ((pSwitch.getParameterValueLow()==null||
00497                      genPthat>pSwitch.getParameterValueLow()) &&
00498                     (pSwitch.getParameterValueHigh()==null ||
00499                      genPthat<pSwitch.getParameterValueHigh())
00500                     ){
00501                     procIdWanted = pSwitch.getMCProcessTypeId();
00502                 }
00503                 //System.out.println("DataPlot: pthat="+genPthat+" "+pSwitch.getParameterValueLow()+" "+pSwitch.getParameterValueHigh());
00504 
00505                 } catch (NumberFormatException nfe) {
00506                 nfe.printStackTrace();
00507                 }
00508             }
00509             }
00510         }
00511         }
00512         
00513         if (procIdWanted==0) {procIdWanted=procIdDefault;}
00514 
00515     }
00516     return procIdWanted;
00517     }

int getProcIdWanted  )  throws JetWebException [virtual]
 

Not implemented for RealPlot.

Implements DataPlot.

Definition at line 177 of file RealPlot.java.

00177                                                         {
00178     throw new 
00179         JetWebException("RealPlot","getProcIdWanted() not implemented.");
00180     }

Iterator<PlotSwitch> getSwitches  )  throws JetWebException [inherited]
 

return all the plotSwitches relevant to this plot.

Definition at line 340 of file DataPlot.java.

References DataPlot.addSwitch(), DataPlot.csnId, and DataPlot.switches.

Referenced by RealPlot.getMCProcessType(), ServletUtils.modifyPlots(), and DataPlot.storeSwitches().

00340                                                                      {
00341 
00342     HashSet<PlotSwitch> tmp = DBPlotManager.getSwitches(csnId);
00343 
00344     if (switches==null) {
00345         switches = tmp;
00346     } else {
00347         Iterator<PlotSwitch> en = tmp.iterator();
00348         while (en.hasNext()){
00349         addSwitch(en.next());
00350         }
00351     }
00352     return switches.iterator();
00353 
00354     }

double getSysScale  )  [inherited]
 

Get systematic scaling applied to data in this plot

Definition at line 129 of file DataPlot.java.

Referenced by JetWebHist.buildHist(), HTMLPlotWriter.display(), Paper.fit(), CombinedPaper.getFitChi2(), DataPlot.getYMax(), DataPlot.getYMin(), DataPlot.getYMinNonZero(), and DataPlot.setFrom().

00129 { return sysScale; }

String getTitle  )  [inherited]
 

Return the histogram title

Definition at line 157 of file DataPlot.java.

Referenced by DataPlot.setFrom(), JetWebHist.writeGraphics(), and HTMLPlotWriter.writePlotComparison().

00157 { return title; }

String getXLabel  )  [inherited]
 

X Axis Label

Definition at line 173 of file DataPlot.java.

Referenced by DataPlot.setFrom(), and JetWebHist.writeGraphics().

00173                              {
00174     return xlabel;
00175     }

String getYLabel  )  [inherited]
 

Y Axis Label

Definition at line 165 of file DataPlot.java.

Referenced by LogFile.makePlots(), DataPlot.setFrom(), and JetWebHist.writeGraphics().

00165                              {
00166     return ylabel;
00167     }

double getYMax  )  [inherited]
 

Return the maximum Y value for this plot.

Definition at line 254 of file DataPlot.java.

References DataPlot.getSysScale().

Referenced by JetWebHist.writeGraphics().

00254                            {
00255     
00256     double max = -1000000;
00257     for (DataPoint point :  dataPoints){
00258         if (point.getY()>max) {max=point.getY();} 
00259     }
00260     return max*getSysScale();
00261     }

double getYMin  )  [inherited]
 

Return the minimum Y value for this plot.

Definition at line 229 of file DataPlot.java.

References DataPlot.getSysScale().

00229                            {
00230     
00231     double min = 1000000;
00232         for (DataPoint point : dataPoints) {
00233         if (point.getY()<min){min=point.getY();} 
00234     }
00235     return min*getSysScale();
00236     }

double getYMinNonZero  )  [inherited]
 

Return the minimum >0 Y value for this plot. (needed for log plot with empty bins)

Definition at line 242 of file DataPlot.java.

References DataPlot.getSysScale().

Referenced by JetWebHist.writeGraphics().

00242                                   {
00243     
00244     double min = 1000000;
00245     for (DataPoint point : dataPoints) {
00246         if (point.getY()<min && point.getY()>0){min=point.getY();} 
00247     }
00248     return min*getSysScale();
00249     }

boolean hasData  )  throws JetWebException [inherited]
 

Are there entries in the points table?

Reimplemented in PredictedPlot.

Definition at line 184 of file DataPlot.java.

00184 { return hasdata; }

void insertCrossSection  )  throws JetWebException [private]
 

Insert DB record for this data plot and its data

Parameters:
paperId - DB id for paper to which this plot belongs
Exceptions:
JetWebException 

Definition at line 101 of file RealPlot.java.

Referenced by RealPlot.store().

00101                                                              {
00102     // Add the title, axis info etc.
00103     DBPlotManager.insertCrossSection(this,paperId);
00104 
00105     // Now insert the data points.
00106     if (csnId>0){
00107         if (!dataPoints.isEmpty()){
00108         DBPlotManager.insertData(this);
00109         }
00110     } else {
00111         System.out.println("Failed to insert Data Plot");
00112     }
00113     }

boolean isDefaultFit  )  [inherited]
 

Is the plot used to determine normalisation of the fit by default?

Definition at line 134 of file DataPlot.java.

Referenced by DataPlot.setFrom().

00134 { return defFit; }

boolean isDefaultSum  )  [inherited]
 

Is the plot included in the chi2 sum by default?

Definition at line 139 of file DataPlot.java.

Referenced by DataPlot.setFrom().

00139 { return defSum; }

boolean isLogarithmic  )  [inherited]
 

logarithmic plot indicator

Definition at line 144 of file DataPlot.java.

Referenced by DataPlot.setFrom(), and JetWebHist.writeGraphics().

00144 { return logarithmic; }

boolean isPredictedBy RunSeries  rs  )  [inherited]
 

Return true if this plot is predicted by the input RunSeries.

Reimplemented in PredictedPlot.

Definition at line 328 of file DataPlot.java.

Referenced by RunSeriesCollection.contains(), and Fit.getChi2().

00328                                               {
00329     try {
00330         return (DBPlotManager.plotExists(this,rs));
00331     } catch (JetWebException j) {
00332         System.out.println(j);
00333         return false;
00334     }
00335     }

boolean isShape  )  [inherited]
 

Indicates whether the plot is a shape. (i.e. does not take the fitted scale factor)

Definition at line 150 of file DataPlot.java.

Referenced by Paper.fit(), FittedPlot.FittedPlot(), and DataPlot.setFrom().

00150 { return shape; }

boolean populateDBData  )  throws JetWebException [inherited]
 

Populate the dataPoints array of points with points for this crossection from the data_point table of the database

Returns:
hasData
Exceptions:
JetWebException 

Definition at line 300 of file DataPlot.java.

References DataPlot.dataPoints, DataPlot.getDataPoints(), DataPlot.hasdata, DataPlot.number, and DataPlot.title.

00300                                                            {
00301     dataPoints = DBPlotManager.getDataPoints(this);
00302     if (dataPoints.isEmpty()){
00303         hasdata = false;
00304         System.out.println("No data for plot " + number + ":" + title);
00305     } else {
00306         hasdata = true;
00307     }
00308     return hasdata;
00309     }

boolean retrieve  )  throws JetWebException
 

Populate the object in memory from the database. Return true if the information retrieved is up to date.

Implements Storeable.

Definition at line 62 of file RealPlot.java.

00062                                                      {
00063     if (csnId<=0) {
00064         csnId=DBPlotManager.getPlotId(paperId,number);
00065     }
00066     DBPlotManager.fromDB(this);
00067     return true;
00068     }

void setChi2 double[]  newchi2  )  [inherited]
 

A double array [chi2,dof]

  • comparison between this plot and another.

Definition at line 423 of file DataPlot.java.

References DataPlot.chi2.

Referenced by Paper.fit(), and DataPlot.setFrom().

00423                                          { 
00424     if (newchi2.length==2){
00425         chi2[0]=newchi2[0]; 
00426         chi2[1]=newchi2[1]; 
00427     } else {
00428         System.out.println("invalid Chi2 array - DataPlot.setChi2()");
00429     }
00430     }

void setCMEnergy double  e  )  [inherited]
 

Definition at line 384 of file DataPlot.java.

References DataPlot.ecms.

00384 { ecms = e; }

void setCollisionId int  id  )  [inherited]
 

Definition at line 435 of file DataPlot.java.

References DataPlot.collisionId.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00435 { collisionId = id; }

DataPlot setCutCollection CutCollection  cuts  )  [inherited]
 

Definition at line 123 of file DataPlot.java.

References DataPlot.cuts_.

Referenced by MergedPlot.addPlot().

00123                                                         {
00124     cuts_ = cuts;
00125     return this;
00126     }

void setDataPoints Collection< DataPoint newDataPoints  )  [inherited]
 

Sets data points vector.

Parameters:
newDataPoints must be a collection of DataPoint objects.
See also:
cedar.jetweb.model.plots.DataPoint DataPoint

Definition at line 204 of file DataPlot.java.

References DataPlot.dataPoints, DataPlot.hasdata, DataPlot.number, and DataPlot.title.

Referenced by Paper.setFrom().

00204                                                                   {
00205     
00206     dataPoints = new Vector<DataPoint>();
00207     
00208     for (DataPoint point : newDataPoints) {
00209 
00210         try{
00211         dataPoints.add((DataPoint)point.clone() );
00212         } catch (ClassCastException e){
00213         System.out.println("Invalid Point Data sent to DataPlot.setDataPoints");
00214         }
00215     }
00216 
00217     if (dataPoints.isEmpty()){
00218         System.out.println("No data for plot " + number + ":" + title);
00219         hasdata=false;
00220     } else {
00221         hasdata=true;
00222     }
00223     
00224     }

void setDefaultFit boolean  isit  )  [inherited]
 

Is the plot used to determine normalisation of the fit by default?

Definition at line 136 of file DataPlot.java.

References DataPlot.defFit.

Referenced by DataPlot.setFrom().

00136 { defFit = isit; }

void setDefaultSum boolean  isit  )  [inherited]
 

Is the plot included in the chi2 sum by default?

Definition at line 141 of file DataPlot.java.

References DataPlot.defSum.

Referenced by ServletUtils.addPlot(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00141 { defSum = isit; }

void setFrom DataPlot  plot  )  [inherited]
 

Set everything in this plot (except the processType and data) from DataPlot plot

Definition at line 267 of file DataPlot.java.

References DataPlot.getChi2(), DataPlot.getCollisionId(), DataPlot.getId(), DataPlot.getNumber(), DataPlot.getPaperId(), DataPlot.getSysScale(), DataPlot.getTitle(), DataPlot.getXLabel(), DataPlot.getYLabel(), DataPlot.isDefaultFit(), DataPlot.isDefaultSum(), DataPlot.isLogarithmic(), DataPlot.isShape(), DataPlot.setChi2(), DataPlot.setCollisionId(), DataPlot.setDefaultFit(), DataPlot.setDefaultSum(), DataPlot.setId(), DataPlot.setLogarithmic(), DataPlot.setNumber(), DataPlot.setPaperId(), DataPlot.setShape(), DataPlot.setSysScale(), DataPlot.setTitle(), DataPlot.setXLabel(), and DataPlot.setYLabel().

Referenced by FittedPlot.FittedPlot(), and PredictedPlot.PredictedPlot().

00267                                       {
00268 
00269     setDefaultFit(plot.isDefaultFit());
00270     setDefaultSum(plot.isDefaultSum());
00271     setLogarithmic(plot.isLogarithmic());
00272     setTitle(plot.getTitle());
00273     setYLabel(plot.getYLabel());
00274     setXLabel(plot.getXLabel());
00275     setId(plot.getId());
00276     setNumber(plot.getNumber());
00277     setSysScale(plot.getSysScale());
00278         setChi2(plot.getChi2());
00279         setShape(plot.isShape());
00280         setCollisionId(plot.getCollisionId());
00281         setPaperId(plot.getPaperId());
00282     /*
00283     try {
00284         proc=plot.getMCProcessType();
00285     } catch (JetWebException jwe) {
00286         System.out.println("ALARM!");
00287         jwe.printStackTrace(System.out);
00288     }
00289     */
00290     }

void setHasData boolean  b  )  [inherited]
 

Definition at line 185 of file DataPlot.java.

References DataPlot.hasdata.

Referenced by MergedPlot.mergePoints().

00185 { hasdata = b; }

void setId int  newId  )  [inherited]
 

Set csnId (the unique identifier of this cross section)

Definition at line 103 of file DataPlot.java.

References DataPlot.csnId.

Referenced by MergedPlot.addPlot(), and DataPlot.setFrom().

00103 { csnId = newId; }

void setLogarithmic boolean  b  )  [inherited]
 

logarithmic plot indicator

Definition at line 146 of file DataPlot.java.

References DataPlot.logarithmic.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00146 { logarithmic = b; }

void setNumber int  newnum  )  [inherited]
 

Set plot number. The plot number identifies the plot within the paper, and corresponds to the ID within the generation package (HZTool or Rivet).

Definition at line 117 of file DataPlot.java.

References DataPlot.number.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), and DataPlot.setFrom().

00117 { number = newnum; }

void setPaperId int  newPaperId  )  [inherited]
 

Set the Id of the paper with which this plot is associated.

Definition at line 389 of file DataPlot.java.

References DataPlot.paperId.

Referenced by MergedPlot.addPlot(), and DataPlot.setFrom().

00389                                           {
00390     paperId = newPaperId;
00391     }

void setScale double  newScale  ) 
 

Set real data scaling factor.

Parameters:
newScale the scale factor to apply.

Definition at line 46 of file RealPlot.java.

Referenced by ServletUtils.addPlot(), and ServletUtils.modifyPlots().

00046                                          { 
00047     sysScale = newScale;
00048     }

void setShape boolean  isit  )  [inherited]
 

Sets whether the plot is a shape. (i.e. does not take the fitted scale factor)

Definition at line 153 of file DataPlot.java.

References DataPlot.shape.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), MergedPlot.mergePoints(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00153 { shape = isit; }

void setSysScale double  scale  )  [inherited]
 

Set systematic scaling applied to data in this plot

Definition at line 131 of file DataPlot.java.

References DataPlot.sysScale.

Referenced by Paper.fit(), FittedPlot.FittedPlot(), and DataPlot.setFrom().

00131 { sysScale=scale; }

void setTitle String  newtitle  )  [inherited]
 

The histogram title

Definition at line 159 of file DataPlot.java.

References DataPlot.title.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), ServletUtils.modifyPlots(), DataPlot.setFrom(), and JetWebHist.writeGraphics().

00159 { title=newtitle; }

void setXLabel String  newlabel  )  [inherited]
 

X Axis Label

Definition at line 177 of file DataPlot.java.

References DataPlot.xlabel.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00177                                           {
00178     xlabel = newlabel;
00179     }

void setYLabel String  newlabel  )  [inherited]
 

Y Axis Label

Definition at line 169 of file DataPlot.java.

References DataPlot.ylabel.

Referenced by ServletUtils.addPlot(), MergedPlot.addPlot(), ServletUtils.modifyPlots(), and DataPlot.setFrom().

00169                                           {
00170     ylabel = newlabel;
00171     }

boolean store  )  throws JetWebException
 

Write the data plot to the DB.

Parameters:
paperId DB - id of the paper this plot belongs to
Exceptions:
JetWebException 

Implements Storeable.

Definition at line 76 of file RealPlot.java.

References RealPlot.insertCrossSection(), and RealPlot.updateCrossSection().

Referenced by ServletUtils.addPlot(), and ServletUtils.modifyPlots().

00076                                                   {
00077     // Check whether crossection with this plot id exists
00078     // if it does, update crossection record,otherwise create  
00079     // delete existing data plot (if exists)
00080     // insert new data plot records
00081     if (csnId<=0) {
00082         csnId=DBPlotManager.getPlotId(paperId,number);
00083     }
00084     if (csnId>0){
00085         updateCrossSection();
00086         return false;
00087     } else {
00088         insertCrossSection();
00089         return true;
00090     }
00091 
00092     }

void storeSwitches  )  throws JetWebException [inherited]
 

Update/add plot switches.

Definition at line 398 of file DataPlot.java.

References DataPlot.getSwitches(), and PlotSwitch.store().

00398                                                        {
00399 
00400     // Get all the switches for the plot in memory. 
00401     Iterator<PlotSwitch> psws = getSwitches();
00402     while (psws.hasNext()){
00403         PlotSwitch ps = (PlotSwitch)psws.next();
00404         ps.store();
00405     }
00406     }

void updateCrossSection  )  throws JetWebException [private]
 

Insert DB record for this data plot and its data

Parameters:
paperId - DB id for paper to which this plot belongs
Exceptions:
JetWebException 

Definition at line 122 of file RealPlot.java.

Referenced by RealPlot.store().

00122                                                              {
00123 
00124     // Update the title, axis info etc.
00125     DBPlotManager.updateCrossSectionLabels(this);
00126 
00127     // Update the data points
00128     DBPlotManager.updateCrossSectionPoints(this);
00129 
00130     }

void zero  )  [inherited]
 

zero the y values and errors of data points in local memory

Definition at line 312 of file DataPlot.java.

References DataPlot.getId().

Referenced by LogFile.makePlots().

00312                       {
00313 
00314     System.out.println("Called zero on plot "+getId());
00315 
00316     // loop over the dataPoints.
00317     for (DataPoint point : dataPoints){
00318         point.setYUp(0);
00319         point.setYDown(0);
00320         point.setY(0);
00321     }
00322     }


Member Data Documentation

double [] chi2 = new double[]{0,0} [protected, inherited]
 

Definition at line 73 of file DataPlot.java.

Referenced by Fit.getChi2(), Fit.setChi2(), and DataPlot.setChi2().

int collisionId [protected, inherited]
 

Definition at line 52 of file DataPlot.java.

Referenced by DataPlot.getProcIdWanted(), and DataPlot.setCollisionId().

int csnId = -1 [protected, inherited]
 

the DB identifier in the crossection DB table

Definition at line 82 of file DataPlot.java.

Referenced by DataPlot.getSwitches(), and DataPlot.setId().

CutCollection cuts_ [protected, inherited]
 

Definition at line 55 of file DataPlot.java.

Referenced by DataPlot.setCutCollection().

Vector<DataPoint> dataPoints [protected, inherited]
 

Vector of data point objects.

See also:
cedar.jetweb.model.plots.DataPoint DataPoint

Definition at line 62 of file DataPlot.java.

Referenced by DataPlot.getDataPoints(), DataPlot.populateDBData(), and DataPlot.setDataPoints().

double ecms [protected, inherited]
 

Centre of mass energy at which the measurement was made.

Definition at line 79 of file DataPlot.java.

Referenced by DataPlot.setCMEnergy().

final String FITTED = DBPlotManager.FITTED [static, inherited]
 

Fitted Data Tablename

Definition at line 42 of file DataPlot.java.

boolean hasdata = false [protected, inherited]
 

Indicates whether the plot has points

Definition at line 84 of file DataPlot.java.

Referenced by DataPlot.populateDBData(), DataPlot.setDataPoints(), and DataPlot.setHasData().

int number [protected, inherited]
 

The plot number within a Paper.

Definition at line 48 of file DataPlot.java.

Referenced by DataPlot.populateDBData(), DataPlot.setDataPoints(), and DataPlot.setNumber().

int paperId [protected, inherited]
 

Definition at line 71 of file DataPlot.java.

Referenced by DataPlot.setPaperId().

final String PREDICTED = DBPlotManager.PREDICTED [static, inherited]
 

Predicted Data Tablename

Definition at line 40 of file DataPlot.java.

MCProcessType proc [protected, inherited]
 

Definition at line 88 of file DataPlot.java.

int procIdWanted [protected, inherited]
 

Definition at line 53 of file DataPlot.java.

Referenced by DataPlot.getProcIdWanted().

final String REAL = DBPlotManager.REAL [static, inherited]
 

Real Data Tablename

Definition at line 38 of file DataPlot.java.

boolean shape [protected, inherited]
 

Indicates whether the plot is a shape. (i.e. does not take the fitted scale factor)

Definition at line 87 of file DataPlot.java.

Referenced by DataPlot.setShape().

HashSet<PlotSwitch> switches [package, inherited]
 

Initial value:

 
    new HashSet<PlotSwitch>(Collections.synchronizedSet(new HashSet<PlotSwitch>()))
HashSet of all the plot switches.

Definition at line 68 of file DataPlot.java.

Referenced by DataPlot.addSwitch(), DataPlot.deleteSwitch(), and DataPlot.getSwitches().

double sysScale = 1.0 [protected, inherited]
 

systematic scaling applied to data in this plot

Definition at line 46 of file DataPlot.java.

Referenced by DataPlot.setSysScale().

String title = "No title" [protected, inherited]
 

Plot title.

Definition at line 50 of file DataPlot.java.

Referenced by DataPlot.populateDBData(), DataPlot.setDataPoints(), and DataPlot.setTitle().


The documentation for this class was generated from the following file:

Generated Wed Jan 17 09:14:27 GMT 2007