Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. #Setup
    1. #Environment
    2. #Dependencies
    3. #Test inside Eclipse
  2. #Development
    1. #Overview
    2. #Classes and Functions
      1. #Model
      2. #Controllers
      3. #Panels
      4. #XYPlots
      5. #Renderers
      6. #Other
  3. #Release with Eclipse

Setup

...

  • Select $ZPLOT_ROOT/src/edu.stanford.slac.util.zplot.example/SimpleExampleApplication
  • Right-click => select Run As... => Java Application

Development

Overview

Image RemovedImage Added

Classes and Functions

Model

edu.stanford.slac

...

.util.zplot.cartoon.model.CartoonDevice
edu.stanford.slac.util.zplot.cartoon.model.widget.CartoonWidget
edu.stanford.slac.util.zplot.model.Beamline
  • Has namze, start z position, and end z position
edu.stanford.slac.util.zplot.model.Device
edu.stanford.slac.util.zplot.model.Widget
  • Has color, shape, and stroke

Controllers

edu.stanford.slac.util.zplot.ZPlotController
  • Adds functionality to the right-click menu and the PropertiesDialog
edu.stanford.slac.util.zplot.ZPlotEvent, edu.stanford.slac.util.zplot.ZPlotListener
  • Provide support for processing events after a tooltip is shown, or zoom is completed

Panels

...

edu.stanford.slac.util.

...

zplot.

...

ui.

...

AbstractPanel
  • Loads all data from Config/Logic DB
    • Config DB URL prefix: jdbc:sqlite:/usr/local/lcls/epics/iocTop/MachineProtection/mpsConfiguration/database/
    • Logic DB URL prefix: jdbc:sqlite:/usr/local/lcls/epics/iocTop/MachineProtection/mpsConfiguration/algorithm/
  • Checks periodically for new versions
    • Current Config DB version is stored in IOC:BSY0:MP01:DBVERS
    • Current Logic DB version is stored in IOC:BSY0:MP01:ALGRNAME
edu.stanford.slac.mps.jdbc.config.ConfigDB
  • Singleton
  • Serves as a facade to information about faults
  • SQL queries are in the file sqlite.properties in the package edu.stanford.slac.mps.jdbc.config
edu.stanford.slac.mps.jdbc.logic.LogicDB
  • Parent of all beamlineZplot panels
edu.stanford.slac.util.zplot.ui.CartoonFilterPanel
edu.stanford.slac.util.zplot.ui.DevicePlotsPanel
edu.stanford.slac.util.zplot.ui.DeviceRangePanel
edu.stanford.slac.util.zplot.ui.DevicesPanel
  • Panel for configuring Devices (as well as CartoonDevices)
  • Located on the Devices tab of the PropertiesDialog
edu.stanford.slac.util.zplot.ui.PropertiesDialog
  • Dialog that pops up when you right-click on the plot and select "Properties..."

XYPlots

edu.stanford.slac.util.zplot.ZPlot
  • Main plot for Devices; includes up to three subplots (X, Y, and Cartoon); can draw device labels
edu.stanford.slac.util.zplot.cartoon.BeamlineCartoon
org.jfree.chart.plot.XYPlot
  • Modified JFreeChart XYPlot
    • Fixed bugs; needed access to some private methods

Renderers

edu.stanford.slac.util.zplot.ZPlotFeatherRenderer
  • Draws Devices as feathers (sticks)
edu.stanford.slac.util.zplot.ZPlotLineAndShapeRenderer
  • Draws devices as shapes; optionally connects lines between them
edu.stanford.slac.util.zplot.cartoon.CartoonRenderer
  • Draws CartoonDevices as shapes

Other

edu.stanford.slac.util.zplot.DevicesDataset
  • Adapts an array of Devices into a JFreeChart-specific dataset class
edu.stanford.slac.util.zplot.MatlabUtil
  • Utility methods for access from Matlab
edu.stanford.slac.util.zplot.ZPlotUtil
  • Contains useful methods, mostly related to Java2D
edu.stanford.slac.util.zplot.cartoon.CartoonWidgetIcon
  • Adopts a CartoonWidget as an instance of Icon
edu.stanford.slac.util.zplot.model.WidgetsRepository
  • A repository of widgets for different types of devices
  • Singleton
  • Serves as a facade to information about Macros (and states), ignore conditions, current MacroStates
  • SQL queries are in the file sqlite.properties in the package edu.stanford.slac.mps.jdbc.logic

Release with Eclipse

  • Add a note in $MPSGUI_ROOT/RELEASE_NOTES
    • Increment the tag version accordingly
  • Commit to CVS
  • Tag with mpsconfig-R#-#-#
  • Check out the tagged version into production
    Code Block
    cd $PHYSICS_TOP/release
    cvs co -r mpsconfig-R#-#-# -d mpsconfig-R#-#-# physics/mps/mpsconfig
    
  • Select File => New Java project => Create project from existing source
  • Select $PHYSICS_TOP/release/mpsconfig-R#-#-#
  • Name the project mpsconfig-R#-#-#
  • Press "Finish"
  • Right-click on the new project mpsconfig-R#-#-# => Export...
  • Select Java => JAR file
  • Check mpsconfig-R#-#-# in "Resources to export"
  • Check "Export generated class files and resources"
  • As the export destination, type (and/or select)
    Code Block
    $PHYSICS_TOP/release/mpsconfig-R#-#-#/jar/mpsconfig.jar
    
  • Press "Finish"
  • Move the symbolic link
    Code Block
    cd $PHYSICS_TOP/
    rm -rf mpsconfig; ln -s release/mpsconfig-R#-#-# mpsconfig
    
  • Launch MPS GUI from lclshome
    • MPS Global => MPS GUI...
    • MPS Global => MPS CUD...