spyGUI: A User Interface to the Online Monitoring of the Silicon Vertex Tracker in CDF II

Marco Rescigno, Subir Sarkar

Abstract

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.

1. Introduction

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].



Figure 1: SPYMON components and interaction.

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.



Figure 2: spyGUI components, their interrelation and package hierarchy. The direction of flow of information and consequently the depth upto which information can be accessed are also indicated.

2. Design and Implementation

2.1 Tools and Usage

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 ComponentsTools 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

Table 1: SPYMON tasks and available tools. spyGUI implements most of the functionalities. Tools exclusive to spyGUI are indicated in colour.

spyGUI can be used in two logically distinct ways as described below.

2.2 Architecture

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.



Figure 3: Inheritance hierarchy of the graphic widgets. spyGUI and the individual applications are marked with coloured filled boxes.

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.



Figure 4: Hierarchical structure of the Physics classes which provides flexibility to spyGUI analysis. The figure also show how the raw data are stored in hierarchical structures, from a single SvtBufferData to an SvtCrateData.

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.



Figure 5: Implementation of the interface, \emph{SvtObject} which provides the concrete classes required pluggability in various places, i.e Spy Buffer analysis, interactive histogramming and various display classes.



Figure 6: Inheritance hierarchy of the abstract class, SvtEvent.



Figure 7: Implementation of the interface, SvtEvents. The concrete classes implements additional interfaces (e.g SvtHistogrammer) for greater flexibility

3. Description

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.



Figure 8: spyGUI main window. The upper half of the window changes color as SmartSockets connection is established and messages are received from crates. The bottom part contains a number of notebook pages to show Beam Positions, raw Spy Buffer dump etc.

At startup, one can choose the subject areas the application should subscribe to from a dialog box as shown in Figure 9.



Figure 9: Subscription dialog. spyGUI can choose to initially subscribe to a certain type of SmartSockets messages from the list.

One can also subscribe to or unsubscribe from different kinds of messages dynamically at run time from the Subscriptions menu in the main application window as shown in Figure 10.



Figure 10: Subscription menu. spyGUI can dynamically subscribe to/unsubscribe from a certain type of SmartSockets message.

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.

3.1 SVT Status Display

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.



Figure 11: SVT status window, gives an up-todate summary of SVT status. Individual board panels as well as the buttons with a label above the Crate panels can be picked to access more information. Separate indicators for all the 8 crates notify if crates are sending data (online).

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.



Figure 12: Explanation of status error indicated in each Board panel.

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.

3.2 Board Error Display

One can navigate through summary informations about different SVT Errors as described below briefly using a single window as shown in Figure 13,



Figure 13: SVT Board error details. Information for all the Boards can be browsed from a single window.

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.

3.3 Analysis Error Display

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.



Figure 14: Spy Buffer Analysis Error Summary Window. We use the 'SlideShow' option here such that the controls cycles through all the crates (implemented as notebook pages) with a delay. Error indicator icons are associated with buttons which can be used to pick a certain buffer for detailed information (as in Figure 21).

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.

3.4 Configuration

spyGUI can be used to configure Spy Monitoring analysis at various levels.

3.4.1 Sending Commands to Crate Processes

We can send application specific commands to the selected destination(s) using the following predefined commands as shown in Figure 15,



Figure 15: SVT Command Sending Tool. Simple commands, a brief configuration message with predefined length, configuration message of arbitrary length using files can be sent using this utility.

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.

3.4.2 Spy Buffer Analysis Configuration

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.



Figure 16: SVT Crate Configuration. Detailed configuration of the SPYMON analysis can be performed using this tool. The default configuration is loaded from file at startup which is modified and sent as SmartSockets messages. The modification can be saved as new default.

The configuration options are described in detail below,

3.5 Database Browser

A tiny SVT Database Browser has been added which displays the SVT hardware configuration as stored in the Database.



Figure 17: SVT Database Browser.

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.

3.6 Histogramming

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].



Figure 18: Histogram Browser window.

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,
  1. a list view which displays the histogram list as a tree structure
  2. a plot canvas.

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,

3.7 Beam Position Monitor

spyGUI displays the results of the Beam Position measurement online in a tabular format in the main application window as shown in Figure 19.



Figure 19: Beam Positions for the 6 SVX barrels.

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.



Figure 20: Beam Positions for the 6 SVX barrels as well as for each of the 12 phi wedges for the 6 barrels.

4 Analysis

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,

4.1 Svt Word Decoder



Figure 25: SVT Word Decoder, transforms data from raw hexadecimal format to interpreted format.

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,

  1. End Event Words
  2. Hit words
  3. Roads
  4. Road-Hit Packets
  5. Tracks words into the corresponding board/physics format. A simple example is shown in Figure 25.

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.

5 Conclusion

spyGUI is maturing into a useful application. Individual components of spyGUI can be used as independent applications. This has vastly simplified the usage of spyGUI. This scheme is realistic too since much of what spyGUI does are alternative to already existing tools. A full-featured, matured version of spyGUI will be a realization of the concept of The SVT Workstation.

References

  1. S. Belforte et. al, IEEE Trans. Buck. Sci. 46, 933(1999) W. Ashmanskas et. al, Nucl. Instr. Meth. A447, 218 (2002)
  2. R. Blair et. al [CDF Collaboration], MILAN-PUB-96-390-E
  3. M. Rescigno, S. Sarkar and L. Zanello, CDF Note CDF/PUB/ONLINE/PUBLIC/7188, 2004.
  4. http://www-cdfonline.fnal.gov/svt/beam
  5. http://www-cdfonline.fnal.gov/svt
  6. A. Barchiesi and S. Sarkar, CDF Note CDF/PUB/ONLINE/PUBLIC/6504.
  7. http://jas.freehep.org

Last Modified:
Sat Sep 6 03:45:00 CDT 2004