analysis fds | outage schedule | locked fds| data mgmt | server assignments

Search | Site Map .

Getting Started With the BaBar Database Browser

The database browser allows you to view event collections in BaBar databases. It interfaces the Event Store API so users do not need to know about the underlying database technology (Objectivity/DB). Most physicists who read/write events during analysis should find this tool easy to use, relatively fast, and extremely useful. You can run the browser GUI directly on your desktop since it doesn't require a local database environment, just a web browser. A recent version of Internet Explorer, or Netscape for Windows, Solaris, or Linux should be fine.

How does the browser system work?

Browser Servers handle all access to BaBar databases. The server code is written in C++ using the Event Store to retrieve all information about events and collections. The servers are physically located close to where the data resides (at the same institution). The client GUI is implemented in 100% Java and contains no BaBar or Objectivity code. Clients can run remotely on any host machine with Java and an Internet connection. The link between a client and server(s) is a Naming Service resource whose location is globally accessible. We intend to maintain services for the main production databases at SLAC (analysis, simulation, and so on) so most users shouldn't be concerned about servers. 

The client is available in the form of an applet (a Java application that runs inside a web browser), which means that launching the GUI is a simple as following a hyperlink. The only key requirement is that you have the Java plug-in installed (version 1.3 or later).  

Installing the Java plug-in

You can determine whether you have the plug-in installed by launching the applet. If you do not have the Java 1.3 plug-in installed, you will be automatically redirected to the plug-in download site. This is a one-time installation and should not take longer than a few minutes. Before doing so, please read the notes below since some sites may already have the plug-in. Setting an environment variable may be sufficient.

Solaris users

If you already have Java 1.3 on your file system (this includes SLAC AFS machines), there's no need for any further installation! Locate the path to the Java 1.3 distribution and set the NPX_PLUGIN_PATH environment variable. It probably makes sense if you add this to your shell startup file.

For example, on a SLAC Solaris machine with AFS, do the following:

setenv NPX_PLUGIN_PATH /afs/slac/package/java/@sys/jdk1.3/jre/plugin/sparc

For other sites, you need to alter the base of the path (/afs/slac/package/java/@sys/jdk1.3) accordingly.

Restart Netscape and launch the applet.

Linux users

Currently only Sun's (not IBM's) Java 1.3 plug-in is supported. If you already have the Sun Java 1.3 distribution installed (this includes SLAC AFS machines), simply set the NPX_PLUGIN_PATH variable accordingly.

For example, on a SLAC Linux machine with AFS, do the following:

setenv NPX_PLUGIN_PATH   /afs/slac/package/java/@sys/jdk1.3-sun/jre/plugin/i386/ns4

For other sites, you need to alter the base of the path (/afs/slac/package/java/@sys/jdk1.3) accordingly.

Restart Netscape and launch the applet.

Windows users

Launch the applet, and if necessary, follow the on-screen Java 1.3 plug-in installation instructions.

Using the Applet

Security

The applet code has been digitally signed with a code signing certificate obtained from Verisign, a well recognized computing security agency. Code signing prevents unauthorized parties from tampering with code, in addition to verifying  the code signer's identity. Granting permissions to signed applets allows to the code to bypass the default applet security restrictions related to network connections and local file system access. If you are satisfied with the certificate details, you need to grant permissions; otherwise the applet will not work.

Choosing a server

Once the browser is running, a dialog window displays the list of currently active servers. Select a server by highlighting a bootfile entry. You can then choose to browse a server or shut it down (careful!)

   

Simple browsing

The main GUI contains two tree widgets. One is for browsing database files and the other is for browsing event collections.  The collection tree (right-hand side) presents the same directory-like structure used in the Event store and should be understood by most BaBar users. The folder sub-levels correspond to the strings that form a collection pathname. Descend through the folders to reach the collection. The database tree allows you to browse database files according to the logical BaBar view or a physical file system. The default is the logical arrangement where database files are grouped according to domains, streams, components, and so on. The physical view will show file servers, the directory path, and the databases files they contain.  Use the pop-up menu mouse button to switch database tree views.

 

Pop-up menus

Both the Database tree and Event Collection tree have pop-up menus that you access by clicking the right-hand mouse button. You can hide the database/collection icons if you're browsing a large federation. Also, you can display the number of events by default. Use this option with care since database access is required in order to retrieve the number of events.

The Database tree presents either a logical or physical abstraction of the database hierarchy. The logical view is a BaBar-oriented structure of domains and authorization levels. The physical view shows the placement of databases according to file hosts and file system paths.

You can save an ASCII (text) snapshot of the Database and Event Collection trees to a file. Invoke the command through the tree pop-up menus. NOTE: When you specify a filename that already exists, it will be appended!! A timestamp is also included in the output so the file will resemble a log.

Browsing Event Collections

The ability to browse event collections is a high priority in the list of requirements. Double-clicking on a collection allows you to view the list of event IDs and any subcollections. Double-clicking an event entry opens a new window displaying event information. The list of event stages is shown. If the Event contains a tag, the tag data is listed. Please use this with caution especially, if other users are writing to a federation.

Tags and Filters

In the case of collections that contain descriptions of tag attributes, you can make simple tag queries. The Event browser (shown above) displays an Event Filter button. If the button is active, the collection contains tag descriptions. Double-clicking an Event entry displays its tag attributes. These attributes can be used as a means of selection.

Use the "Event Filter" button to open the Filter dialog window. Select an attribute and a value. Apply your selection and the Event browser will only display events that match the selection.

Viewing Event Contents

If you double-click an event listed in the collection GUI, a separate window will open displaying the components stored in the event header. Each component is represented as diamond shaped folder.  If the diamond is gray, the component is off-line and currently unavailable. If the diamond is yellow, it is accessible. Opening a yellow colored component will reveal the persistent event objects it references. Grayed-out objects are off-line and solid black objects are available.

Double-click an available object  and an Active Schema object viewer window will open. You can then examine the contents of the persistent objects, including attribute information and traverse persistent references to other objects.

 

Scanning collections

As an aid to data distribution, you can scan an event collection to obtain the list of associated databases. Place the mouse pointer on a collection in the event collection tree and click the right-hand button. Select the database scan command. When the scan is complete (be patient), the list of corresponding databases will be shown in place of the database tree (left side of the window). The pull-down menu above the tree pane allows you to switch between the database tree and scanned collections. If you now view the database tree and display its pop-up menu you'll notice a change:

In addition to these commands you'll notice that the scanned collections are also present. Select one or more collections and when you browse the database tree any databases that belong to the list of scans will be highlighted.

 


BaBar Public Site | SLAC | News | Links | Who's Who | Contact Us

Page Owner: Jacek Becla
Last Update: June 13, 2002