BaBar - Java Analysis Studio FAQ
Maintained by Edward Chen;
last minor update : March 3, 2000.
last major update: March 11, 2001.
Introduction to JAS
- What is JAS?
- What features are provided by JAS?
- What BaBar online functionality is currently supported?
- What features can I expect to be added in the coming weeks?
Instructions for Running JAS
- How can I view my live histograms/scalers in JAS?
- How do I run JAS remotely so I can look at live data?
- How do I run JAS from a release?
- Which version of JAS am I running?
- How can I view my live socket DHP histograms in JAS?
- How can I view my live DOT (Distributed Object Tree, a.k.a
CORBA DHP) histograms in JAS?
- How can I tell whether my server is finding my histograms?
- OK, my server is running. Now how do I look at my histograms?
- I see my data, but it is not being updated.
General JAS questions
- If I start JAS and one of my histograms isn't
available yet, it shows up as blank. How can I see it
later?
- If I manually connect to a JAS data server, using the
"Reconnect..." menu item, the tab with my HTML page
disappears. How do I get it back?
- How can I specify multiple HTML pages on the command
line?
- How can I open another HTML page after I've started
JAS?
- How can I overlay two histograms in a single plot in
my HTML layout?
- How do I get live updates of my histograms?
- Can I use Netscape instead of JAS to view my histogram
layouts?
- How do I view PostScript, JPEG, GIF, etc. files within JAS?
- Can more than one JAS client be connected to a given
JAS data server?
- How do I take a closer look at a histogram I'm viewing in
an HTML page?
- How do I view more than one histogram/scaler at a time?
- I don't like how my histograms/scalers look. How can I change it
- How do I zoom in on my data?
Troubleshooting
- JAS keeps slowing down until it finally stops!
What do I do???
- My JasInterfaceServer is still running, but I cannot connect
to it any more. Where did it go?
- I keep getting "Remote Exception" error windows. What should
I do?
- When I try to print, I don't get any output.
- When I try to print, nothing looks like I want it to.
- JAS takes too long to (fill in the blank). How can I make it
go faster?
- It still doesn't work, and I'm mad. To whom should I
complain?
Babar-JAS related links
Introduction to JAS
- What is JAS?
Java Analysis Studio is an all-Java application for offline HEP
analysis originated by Tony Johnson. Because of its strong real-time
histogramming feature set, it is being adapted for online monitoring
use in BaBar.
JAS has a home page, at
http://jas.freehep.org.
- What features are provided by JAS?
JAS was originally developed for offline analysis, so its
current feature set is geared in that direction. It is able to
perform a variety of operations on n-tuples, including plots,
projections, fits, etc. See the JAS web page for more information
and a tutorial of basic JAS features.
There are several important features that are available with
the latest release of JAS:
- many pages, each containing numerous histograms
- printing
- functional fits
- HTML-based layouts
- What BaBar online functionality is currently supported?
JAS, in combination with the JAS data servers in the
JasInterface package, may be used to display the following data
types:
- 1D histograms
- 2D histograms
- profile histograms
- scalers
- What features can I expect to be added in the coming weeks?
We are currently working on:
- Usage of xml to specify plot attributes in HTML layouts.
- Overlaying of plots in HTML.
- Statistics boxes.
- Display of ambient data with JAS.
Please follow the "Online GUIs" HyperNews group for updates on
JAS functionality. Bugs are removed and improvements made almost
daily.
Instructions for running JAS
- How can I view my live histograms/scalers in JAS?
Online histograms and scalers are made available to JAS using
special servers. These programs, written in Java, act as clients
to BaBar's online histogramming systems (DHP and DOT) and as data
servers to JAS.
- How do I run JAS remotely so I can look at live data?
Execute the RemoteBabarJas shell script from a SLAC machine.
This script automatically starts up the most current version of jas,
connects it to the live data servers in IR2, and has it display the
production DQM pages. Running Jas in this way is as close as you can get
to being a real live DQM in IR2 without actually being on shift. To run
the script, type
-
setenv NO_AWT_MITSHM true
-
/nfs/bbr-srv02/bfdist/Production/
-
srtpath
-
RemoteBabarJas
and you're ready to go. If there are no data servers running in IR2, Jas will
hurl some angry error messages your way. Kill the script and try again later. When
you're done looking at data, please shut down Jas.
- How do I run JAS from a release?
In a BaBar release, JAS is invoked with the BabarJas command,
which is a shell script created by the JasExtensions package. This
command will automatically run the correct version of JAS for your
release.
The JAS releases themselves are located in
/afs/slac.stanford.edu/package/jas/release/ .
- Which version of JAS am I using?
The version of JAS which you build against is determined by the
JASVER environment variable. If this variable is not set, the
default version for your BaBar release will be used. The default
release is set in SoftRelTools/arch_spec_JAS.mk.
The shell script BabarJas is created in the bin stage
of the JasExtensions package, and is used for invoking the correct
version of JAS. To regenerate this script with a new version of
JAS, setenv JASVER to the desired version and gmake
JasExtensions.bin
- How can I view my live socket DHP histograms in JAS?
Socket-based DHP is no longer supported, either by the DHP
infrastructure or by JAS. Please use CORBA DHP instead.
- How can I view my live DOT (Distributed Object Tree, a.k.a
CORBA DHP) histograms in JAS?
You must run an additional server, called
JasInterfaceServer. The required arguments are
JasInterfaceJasServer -n <corba-name>
where corba-name is the full CORBA name of your DOT
server. The name takes the form
<context>/<name>, where context is
the CORBA naming context (typically Dot), and
name is the name itself.
The histograms from this DHP server will be placed in the JAS
tree in a folder named name; to override this, specify a
folder name before the corba-name, separated by @.
For instance, to load histograms from the DHP server named
ReferenceHist in the CORBA naming context Dot,
and place them in a JAS folder named Monitoring, use
JasInterfaceServer -n Monitoring@Dot/ReferenceHist
- How can I tell whether my server is finding my histograms?
Invoke either server with the --very-verbose option,
and each registered histogram will be listed on the screen.
- OK, my server is running. Now how do I look at my histograms?
Start JAS. Select File | Reconnect. Enter the name of
the host running your JasInterfaceServer, and click
Next. The name of your server should appear in the table on
top. Select it and click Finish.
A folder with the title "Histograms" should appear in the
left-hand tree panel of JAS. Expand the folder by single-clicking
on the handle next to it. Your histograms/scalers should be
arranged beneath this folder. To expand folders, single-click on
their handles. To display an histograms/scalers, double-click on
their names.
JAS can connect at startup to a JasInterfaceServer, if
it is started with the following command line argument:
BabarJas --connect <host>/Histograms
where host is the host on which
JasInterfaceServer is running. If the connection fails
or subsequently goes down, the program will attempt to reconnect
periodically.
- I see my data, but it is not being updated.
Start your JasInterfaceServer with the additional
command-line argument -u <time>, where
time is an update time, in seconds. This will cause all
histograms and scalers to be refreshed continually with that
update period. Only histograms currently being displayed will
actually be sent from the DHP or DOT server to JAS; however,
what's on the screen will always be up-to-date, within your
specified update interval.
See the command line option summary (JasInterfaceServer
--help) for information on options to set time intervals for
rescanning the histogram tree and the reconnecting to missing DHP
servers.
General JAS questions
- If I start JAS and one of my histograms isn't
available yet, it shows up as blank. How can I see it
later?
If a histogram specified in an HTML file is not available
when JAS starts up, it will be displayed as blank. Once it is
available, simply press the reload button in the toolbar
(circular green arrows) to reload the HTML page and show the
histogram.
- If I manually connect to a JAS data server, using the
"Reconnect..." menu item, the tab with my HTML page
disappears. How do I get it back?
Press the home button (the little house) on the toolbar. This
will always restore the HTML page you specified on the command
line, even if its tab has disappeared.
- How can I specify multiple HTML pages on the command
line?
This is not currently supported. Instead, create a "table of
contents" page with hyperlinks to all the pages you need.
- How can I open another HTML page after I've started
JAS?
From within JAS, select 'Web page' from the 'View' menu. It will
pop up a dialog box allowing you to type in the full url of the html
page you wish to display.
- How can I overlay two histograms in a single plot in
my HTML layout?
You may overlay multiple histograms in a single plot using
XML. This is the only supported way of using overlays. The
old method of using a vertical bar in the 'data' parameter tag
in an HTML object is no longer supported and will not work.
- How do I get live updates of my histograms?
If the JAS data server is configured to provide live updates
(with the -u flag), histogram data should be updated
automatically.
- Can I use Netscape instead of JAS to view my histogram
layouts?
No. You would see everything but the plots.
- How do I view PostScript, JPEG, GIF, etc. files within JAS?
JAS does not support external viewer applications for file
types (for instancing, using gv to display PostScript
files). Additionally, bitmap images (GIFs, JPGs) can be embedded in
an HTML page but may not be linked to directly. If you encounter a
hyperlink in the Fast Monitoring HTML pages that takes you directly
to a PostScript, bitmap, or other non-HTML file, you'll probably see
a screen full of garbage. Use Netscape instead to view these
files.
- Can more than one JAS client be connected to a given
JAS data server?
Yes. This can be useful, for instance, for remote viewing of Fast
Monitoring from elsewhere at SLAC or even outside SLAC. However, the
"2.0XMAS-Babar2" version of JAS is required for this. Soon there
will be an automatically generated script to start JAS remotely, but
for now start JAS with the following command line (this assumes
that you are running out of a release 8.5.0 or greater, or running
out of the correct LiveFastMonitoring release:
BabarJas --connect bbr-srv05.slac.stanford.edu/Histograms
--startPage file:/nfs/bbr-srv02/bfdist/LiveFastMon/workdir/LiveFastMon-html/index.html
- How do I take a closer look at a histogram I'm viewing in
an HTML page?
Experts or the curious can inspect any of the histograms and
scalers in Fast Monitoring modules. First select an option from the
menu File, New, Histogram Page to create a blank histogram
page. Click on a blank plot area to select it. Then navigate to the
desired histogram (to expand a folder, single click on the
dot or cross next to its name). Double-click on the histogram name
to view it.
When a histogram in the tree is highlighted, summary statistics
will appear in the toolbar, at the bottom of the JAS window.
- How do I view more than one histogram/scaler at a time?
Select File | New | Histogram Page and choose one of the layout
options. A new tabbed page will be created with empty
histograms. Click on a histogram to highlight it, and then
double-click on a histogram in the tree to display that histogram
in the selected area.
- I don't like how my histograms/scalers look. How can I
change it?
Right-click on the item and select Properties, or choose
Histogram | Properties from the menu. Click on the data tab
and choose the options you wish. Note that for histograms, there
are shortcuts to some of these items on the right-click popup
menu.
Changes will apply to the current histogram
only. Double-clicking on a different histogram/scaler in the tree
will cause changes to be lost. To keep formatting changes, create
a new histogram page as described above, select one of the empty
histograms, and place the new data there.
- How do I zoom in on my data?
Bring up the properties dialog box as described above, select
the X Axis or Y Axis tabs, and specify a reduced
range.
Troubleshooting
- JAS keeps slowing down until it finally stops!
What do I do???
In previous releases of JAS there was a known problem that the
JAS client would sometimes start to slow down gradually, eventually becoming
unusable. This problem is believe to be fixed. If you experience this
behavior, it may be necessary to kill and
restart JAS. Use the cleanup command LiveFastMonJasCleanup
to kill existing JAS and JAS data server processes. Once both the
JAS client and the JAS data server have exited, restart them by
issuing the LiveFastMonJas command. PLEASE SEND
Edward Chen A BUG REPORT.
There is no need to restart the Fast Monitoring framework process
when JAS is restarted; the new JAS data servers should locate and
connect to a running Fast Monitoring process automatically.
Similarly, there is no need to restart the JAS client or data server
when a Fast Monitoring job ends and is restarted (for instance, at
the end of a run); the JAS data server should detect and connect to
the new Fast Monitoring job. It may be necessary to press the
reload button, though, to cause the histograms to be displayed.
- My JasInterfaceServer is still running, but I cannot connect
to it any more. Where did it go?
Currently, due to a limitation in JAS, only one JAS server may
run on a given host at one time. When another is started on the
same host (by the same or a different user), it registers itself
under the same RMI name as the previous instance, thereby making
the first instance unavailable.
To work around this, run your server on a host not being used
by anyone else (for instance, one of the bbr-dev*
machines). Remember that this server doesn't need to run on the
same host as the DHP requestor or DOT server, or the JAS client.
- I keep getting "Remote Exception" error windows. What should
I do?
A variety of circumstances can cause this error. If you kill
your JasInterfaceServer, JAS will report this error the next time
it tries to communicate with it. The connection to the server will
be lost, but you can continue to use JAS to connect to other
server instances. Occasionally, this error will occur when
connecting to a data server. Sometimes pressing OK, waiting a few
seconds, and trying again will resolve the problem.
- When I try to print, I don't get any output.
In the "print" dialog box, enter only the name of the printer
to which you wish to print. Do not use any other commands (such
as "lpr -P").
- When I try to print, nothing looks like I want it to.
This is a known problem with the version of Java we are running.
Better print support is provided in
newer versions of Java, but currently the version of Java we need
has not been released yet for Solaris. The new Java release from Sun is
expected 'soon', but in the meantime we are exploring other
workarounds.
- JAS takes too long to (fill in the blank). How can I make it
go faster?
The Java runtime environment is large and sometimes slow. Try not
to run JAS on a shared machine (shire, percheron). Instead, run it
on an unused machine, such as one of the bbr-dev machines if
available. Remember, JAS doesn't need to run on the same host as
the DHP requestor, DOT server, or JasInterface*JasServer program.
The startup time for Java applications can be large, since Java
is always linked dynamically, with most of the code coming from
compressed archive files ("jar" files). Once all the relevant code
is loaded, the application will usually function smoothly, as long
as it is not swapped out very aggressively.
Also, consider running JAS on your desktop computer. A mediocre
PC running Linux or Windows NT may provide much more responsive
performance than one of the shared development servers,
particularly since remote X11 windows will not be used. UNIX and
Windows NT installation instructions will be forthcoming; consult
Alex Samuel in the meanwhile if you are interested.
- It still doesn't work, and I'm mad. To whom should I
complain?
The only person currently working on JAS support in BaBar is:
Java Analysis Studio is created and maintaned by Tony Johnson
(tonyj@slac).
|