![]() |
spyGUI is a user interface to the Online Monitoring system (SPYMON) for the CDF Silicon Vertex Tracker (SVT). spyGUI displays SVT hardware and analysis errors in detail, decodes raw data into physics quantities, provides interactive plotting facility, works as an Online Beam Position Monitor, works as a Histogram Producer and Viewer, configures SPYMON analysis options, works as an SVT Database Browser, and performs simple error recovery. In this document we'll discuss the architecture and design of spyGUI and describe the components of the system in detail.
spyGUI is a Java based graphical user interface to the Online Monitoring and analysis framework (SPYMON) for the CDF Silicon Vertex Tracker which is built to study the integrity and performance of SVT[1,2] in real time. The goals of SPYMON range from very simple statistical analysis at single board level to more complex ones such as multi-board event building and multi-crate checks; from simple error reporting to expert level diagnostics and possible error recovery. In order to achieve such diverse goals, SPYMON exploits several diagnostic devices integrated in the SVT design in order to provide several ways of verifying the integrity of data-flow through the entire system. SPYMON also calculates the Beam Position parameters in real time, from the measured track parameters. The entire SPYMON system comprises of a number of tools as shown in Figure 1 and described briefly in the following. For a detailed discussion of SPYMON refer to [3].
In addition to that, whenever the beam finding algorithm finds a new fit of beam position (in crate b0svt06), a special message is published with fit results, for the 6 different SVX barrels. For each barrel, the same results are published for each of the 12 phi wedges also. See Online Beam position monitor page[4] for detail.
The SpyManager can, in principle, be made part of a run (by including in the partition the ``pseudo-crate'' SVT\_MONITOR\_OO) though little is gained by doing so for the moment except for the fact that this way it will be able to communicate with the Run Control for special error condition/messages and act as an SVT error logger.
SVTSPYMON, a batch Unix process that receives SVT histogram messages from the SVT crates and converts them into Root histograms. The histograms are then shipped to the standard DisplayServer and can be browsed using the standard HistoDisplayMain program. SVTSPYMON is described in detail in [5].
spyGUI, a Workstation process which collects informations from the SVT Crate processes and displays them in real time after subsequent analysis. spyGUI has been designed to perform all the tasks using a single application that are individually carried out by different components of the entire SVT Online Monitoring and Analysis system. In particular, spyGUI is meant to,
spyGUI will be discussed in detail in this note.
spyGUI is a SmartSockets client which communicates with the SVT crate processes (and optionally with the Spy Manager). The left part of Figure 2 shows the source of spyGUI data whereas the right side represents schematically the main system blocks of the user interface and their interrelation. In particular, the arrows indicate direction of information flow and upto what level information can be browsed starting from the main window. The same figure also shows the package structure of spyGUI code.
In this section we'll discuss about the existing SPYMON tools and the scope of spyGUI as an integrated analysis framework. We'll describe as well the different ways spyGUI can be used and their respective merits and demerits. The various tasks SPYMON was originally designed to carry out are listed in the first column of Table 1. The second column lists the individual tools that perform the corresponding tasks. One notices that, although, SPYMON is quite rich in functionalities, the tools are scattered and require maintenance effort in order to synchronise the tools against any modification in the data structure. spyGUI integrates these scattered tools in a single application and provides the missing functionalities that makes SPYMON more powerful and easier to configure. It might be noted that spyGUI originated to provide a simple configuration tool for the SPYMON system. There are certain offline utilities which perform spy buffer analysis.
| spymon Components | Tools in use |
| 1. SVT Status Viewer | None |
| 2. SVT Board Error Viewer | Web Based Status Viewer |
| 3. Online Beam Position Monitor | Web Based Beam Monitor |
| 4. Histogram Producer and Viewer | SVTSPYMON |
| 5. SVT Analysis Configurator | spyGUI |
| 6. Command Interface | VxWorks Shell |
| 7. SVT Database Browser | Web Based Browser |
| 8. Spy Buffer Viewer, Analysis Error Viewer | spyGUI |
spyGUI can be used in two logically distinct ways as described below.
> setup svtmon -d
> spyGUI
This was the original design; although it makes usage of spyGUI
straight-forward, it also complicates navigation which is too many levels deep and makes
it rather heavy from the point of view of memory usage.
> setup svtmon -d
> java config.SendCommandFrame
> java config.SvtConfigurator
> java config.SvtStatusViewer
> java config.SvtBoardErrorViewer
> java config.SpyErrorViewer
> java config.svt.SpyBufferViewer
> java config.beam.BeamMonitor
> java config.hist.HistogramViewer
> java config.db.SvtDbBrowser
In the new scheme memory usage remains under control; more importantly, since one can freely use only the tools that are needed, browsing information becomes much simpler. Note that, a number of SmartSockets clients will be required in this scheme in the real situation. Fortunately, not all the clients need to be run at a time. Clearly, the new scheme is the preferred and recommended way to use spyGUI.
spyGUI is extremely dynamic in nature. Most of the graphic components and many important data structures are created at Runtime. As an application starts, it only sets up the required SmartSockets connections and waits for messages to be published by the SVT Crate processes. On receipt of messages from various crates, information is decoded, and subsequently graphic components are instantiated and data structures filled. This is true for the overall spyGUI as well as for all the individual components. This way the graphical representation of spyGUI is always validated.
spyGUI was not designed from ground up; the project followed an incremental development strategy. As a result, code had to be often retrofitted in order to implement certain design aspects which were found to be useful along the way. This include preferring interface and composition based development over inheritance, profiting from well known design patterns like Singletons, Observables and Observers etc. We'll briefly discuss below about some design related features which made development of spyGUI easier and increased modularity and pluggability of different components inside the framework.
Figure 3 shows the inheritance hierarchy of the graphics windows. DataFrame, which inherits from JFrame, the top level class representing a Frame in Java, implements a lot of common behaviour like, (1) Menu Bar (2) Tool Bar (3) Status Bar (4) Embedded Text Panel (5) Window closing strategy (6) Online Help etc. It also implements the a few basic Runtime configuration for windows. This provides a consistent look and feel for all the visible components.
The physics classes are needed by a number of components of spyGUI, for analysis as well as for display. Figure 4 shows how the physics classes are formed from raw Spy buffer data from an Svt crate to achieve required flexibility. Each raw event directly translates to a generic SvtEvent, an abstract class, which consists of an object that describes event data for a board spy buffer (SvtObject, an interface) and an End Event word. A number of such events form SvtEvents, an abstract class which is a collection of events. The concrete classes specific to a particular board buffer follow from the abstract classes and interfaces.
The following Figures 5,6,7 show simplified UML class diagrams for the abstract classes and interfaces and how they are extended and implemented in concrete classes.
In its present configuration, spyGUI runs outside the DAQ partition. It knows about the various Run Control state transitions from the crate processes. The application uses multiple threads of execution. The main thread manages all the user interactions, like navigating though error informations, histograms and modifying analysis configurations etc. A separate thread manages SmartSockets communications and accordingly updates informations on the client side.
Figure 8 shows a screen-shot of the main spyGUI window.
At startup, one can choose the subject areas the application should subscribe to from a dialog box as shown in Figure 9.
The bottom part of the main window contains a number of display windows to log various activities. The Beam Position tab displays updated Beam Positions in a table as described in a later section.
The window shown in Figure 11 roughly emulates the SVT hardware crate/board configuration (without cable connections). Standard colours for different elements, i.e board panels are used to simplify board identification without explicitly labeling them. For more information on board colour codes consult the images stored in the SVT page.
Boards which do not have Spy Buffers are passive elements. The crate CPU panel is a button which shows a summary of status of all the Spy Buffers which belong to that crate. Alternatively, one can click on the buttons which show the (logical) crate names to display the same informations.
Error Colour Codes:
This window should summarise all the relevant informations about the functioning of SVT and hence may be open all through. The LEDs on each board represent the following as explained graphically in Figure 12.
The LEDs are buttons as well and can be selected to display details of the occurrence of an error. By default a new frame is opened following a button click which contains error informations for the whole system. One can, alternatively, check Show Errors on Separate Windows to views informations only for a single element.
One can navigate through summary informations about different SVT Errors as described below briefly using a single window as shown in Figure 13,
The LEDs indicate occurrence of error during the most recent iteration. For Board Error registers total number of occurrences of error of each kind since the last reset is also shown.
As shown in Figure 14, Spy Buffer Error Window displays a summary informations of global (End Event) errors for all the Spy Buffers of all the boards present in a crate. If more than one crates send error messages, the crate panels are added as separate pages. One may click on individual buttons to navigate through relevant informations on the errors in a separate window.
Tool-tips are provided extensively as the buttons are small and the names are cryptic. When the mouse enters/rests on a button a brief description is displayed on the status area as well.
spyGUI can be used to configure Spy Monitoring analysis at various levels.
We can send application specific commands to the selected destination(s) using the following predefined commands as shown in Figure 15,
The Stop command can be used to stop the consumer processes as well. In future we may add a free text input area used to send the command name.
One can also send configuration messages from a file, either by sending
Sending configuration from file could be useful when the same configuration properties are altered time and again.
User as well as expert level analysis configurations can be performed using this tool. A single message may be created, either for one crate at a time or a common one valid for all the crates and published via SmartSockets.
The configuration options are described in detail below,
A tiny SVT Database Browser has been added which displays the SVT hardware configuration as stored in the Database.
By default the window displays the active configuration. The 'View' panel displays
One should also be able to display SVT configuration for an arbitrary Run Number for which the configuration exists. The 'Reload Active' once again restores the active configuration.
The 'Operation' panel allows one to
One can use a popup menu attached to the list in the 'Operations' panel to
Implementation of validating a DB entry validation (Calculating CRC) depends on Native C code.
A Histogram producer and viewer that is very close to the Root based Histogram producer (SVTSPYMON) in capabilities has been included in spyGUI. There are occasions when SVTSPYMON stops working for brief periods intermittently for technical reasons like Root version mismatch etc.; in such cases the Java based Histogram Producer we are discussing here may come handy. Figure 18 shows a screen-shot of the viewer window. The viewer is built upon Java Analysis Studio (JAS) developed by Tony Johnson[7].
Histograms are created/updated from histogram messages published by the SVT Crates. At present only 1- and 2-D histograms are supported. For two dimensional histograms only binned informations are available. This is enough for us since this functionality covers all kinds of histograms that are published by SVT crates as messages.
The application window is divided in two parts,One can divide the canvas into a number of zones as shown in Figure 18. Individual plotting panels are active and one can click the right button on various objects (data, axis, statistics box etc.) to popup self-explained menus which can be used to customise almost all the histogram attributes like, line, background and fill colours, statistics elements, error bars, axis titles, axis ranges etc. The histograms being displayed can also be printed in this way. However, if more than one histograms are displayed, saving/printing may be cumbersome. More work is required to implement a better printing method.
The application Toolbar contains the following buttons,
spyGUI displays the results of the Beam Position measurement online in a tabular format in the main application window as shown in Figure 19.
A new application, BeamMonitor(JAS version 2.2.5 or higher is required for BeamMonitor), was added for more information which is shown in Figure 20. The BeamMonitor can be used as a separate SmartSockets clients in order to display Beam Position values for the 6 SVX barrels as well as for each of the 12 SVX phi sectors (wedges) for all the 6 barrels. The Beam Positions are also presented graphically in the lower half of the BeamMonitor window.
One can browse through all the spy buffer data published during the most recent SPYMON iteration from a single window in Real time, limited only by the amount of information published by the crate processes. The buffers are automatically updated each time new data are received; however automatic update can be switched off/on at Runtime from the 'Option Menu'. One can choose to receive data only from a particular crate as well. The same tool can be used to analyse Spy dump files offline, e.g from earlier stores by loading them from the 'File Menu'. At present only one file can be analysed at a time.
The top-level window consists of a tree structure on the left which lists all the spy buffers which are read and analysed by SPYMON crate processes and marks the ones that receive data presently and a notebook with the following three pages,
A plotting widget for dynamic histogramming as shown in Figure 24 as well has been included as well. A Jython interpreter has been embedded in spyGUI for dynamic histogramming. This is still very experimental and not yet optimised for efficiency.
A tiny tool has been integrated in spyGUI to decode SVT words interactively from raw Hexadecimal format to relevant physics quantities. The window is divided into two parts. The upper part consists of an input text area where raw hexadecimal data should either be typed, copied from another Java window or imported from file(s) and a panel of options to choose the board format from. The bottom part displays the formatted output according to the board that will be selected. Presently, the decoder can transform,
The decoder output format is exactly the same as the one found in the Spy Buffer Viewer window; the same code was used for both. The Svt Word Decoder is a very handy tool for debugging.