DepthDataPreparation.java

Go to the documentation of this file.
00001 package edu.rice.cs.hpc.traceviewer.depth;
00002 
00003 import org.eclipse.swt.graphics.Color;
00004 
00005 import edu.rice.cs.hpc.traceviewer.data.db.BaseDataVisualization;
00006 import edu.rice.cs.hpc.traceviewer.data.db.DataPreparation;
00007 import edu.rice.cs.hpc.traceviewer.data.db.TimelineDataSet;
00008 import edu.rice.cs.hpc.traceviewer.data.graph.ColorTable;
00009 import edu.rice.cs.hpc.traceviewer.data.timeline.ProcessTimeline;
00010 /*********************************************
00011  * 
00012  * Class to prepare data for depth view
00013  *
00014  *********************************************/
00015 public class DepthDataPreparation extends DataPreparation {
00016 
00017     /*****
00018      * list of data to be painted on the depth view
00019      */
00020     final private TimelineDataSet dataset;
00021     
00022     /****
00023      * Constructor to prepare data
00024      * 
00025      * @param _colorTable
00026      * @param _ptl
00027      * @param _begTime
00028      * @param _depth
00029      * @param _height
00030      * @param _pixelLength
00031      * @param _usingMidpoint
00032      */
00033     public DepthDataPreparation(ColorTable _colorTable, ProcessTimeline _ptl,
00034             long _begTime, int _depth, int _height, double _pixelLength,
00035             boolean _usingMidpoint) {
00036         
00037         super(_colorTable, _ptl, _begTime, _depth, _height, _pixelLength,
00038                 _usingMidpoint);
00039         dataset = new TimelineDataSet(_ptl.line(), ptl.size(), height);
00040     }
00041 
00042     @Override
00043     public void finishLine(int currSampleMidpoint, int succSampleMidpoint,
00044             int currDepth, Color color, int sampleCount) {
00045 
00046         BaseDataVisualization data = new BaseDataVisualization(currSampleMidpoint, 
00047                 succSampleMidpoint, currDepth, color);
00048         
00049         dataset.add(data);
00050     }
00051     
00052     /***
00053      * retrieve the list of data to be painted 
00054      * 
00055      * @return
00056      */
00057     public TimelineDataSet getList() {
00058         
00059         return dataset;
00060     }
00061 
00062 }

Generated on 5 May 2015 for HPCVIEWER by  doxygen 1.6.1