GraphEditorPlot.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.viewer.graph;
00002 
00003 import java.io.IOException;
00004 import java.text.DecimalFormat;
00005 
00006 import org.swtchart.IAxisSet;
00007 import org.swtchart.IAxisTick;
00008 
00009 import edu.rice.cs.hpc.data.experiment.metric.MetricRaw;
00010 import edu.rice.cs.hpc.data.experiment.scope.Scope;
00011 import edu.rice.cs.hpc.viewer.metric.ThreadLevelDataFile;
00012 import edu.rice.cs.hpc.viewer.metric.ThreadLevelDataManager;
00013 
00014 public class GraphEditorPlot extends GraphEditor {
00015 
00016     public static final String ID = "edu.rice.cs.hpc.viewer.graph.GraphEditorPlot";
00017     
00018     @Override
00019     protected double[] getValuesX(ThreadLevelDataManager objDataManager, 
00020             Scope scope, MetricRaw metric) 
00021     throws NumberFormatException {
00022 
00023         double []x_values = objDataManager.getProcessIDsDouble( metric.getID() );               
00024         return x_values;
00025     }
00026 
00027     @Override
00028     protected double[] getValuesY(ThreadLevelDataManager objDataManager, 
00029             Scope scope, MetricRaw metric) throws IOException {
00030 
00031         {
00032             double []y_values = objDataManager.getMetrics( metric, scope.getCCTIndex() );
00033             return y_values;
00034         }
00035     }
00036 
00037 
00038     @Override
00039     protected String getXAxisTitle(ThreadLevelDataFile data) {
00040         String axis_x;
00041         IAxisSet axisSet = this.getChart().getAxisSet();
00042         IAxisTick xTick = axisSet.getXAxis(0).getTick();
00043 
00044         axis_x = "Rank Sequence";
00045         xTick.setFormat(new DecimalFormat("##########"));
00046 
00047         if (data.isHybrid()) 
00048         {
00049             axis_x = "Process.Thread";
00050             xTick.setFormat(new DecimalFormat("######00.00##"));            
00051         } else if (data.isMultiThreading()) {
00052             axis_x = "Thread";
00053             xTick.setFormat(new DecimalFormat("##########"));
00054         } else if (data.isMultiProcess()) {
00055             axis_x = "Process";
00056         }
00057 
00058         return axis_x;
00059     }
00060 
00061 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1