SLAC PEP-II
BABAR
SLAC<->RAL
Babar logo
HEPIC E,S & H Databases PDG HEP preprints
Organization Detector Computing Physics Documentation
Personnel Glossary Sitemap Search Hypernews
Unwrap page!
Comp. Search
Who's who?
Meetings
FAQ Homepage
Archive
Environment
Administration
New User Info.
Web Info/Tools
Monitoring
Training
Tools & Utils
Programming
C++ Standard
SRT, AFS, CVS
QA and QC
Remedy
Histogramming
Operations
PromptReco
Simulation Production
Online SW
Dataflow
Detector Control
Evt Processing
Run Control
Calibration
Databases
Offline
Workbook
Coding Standards
Simulation
Reconstruction
Prompt Reco.
BaBar Grid
Data Distribution
Beta & BetaTools
Kanga & Root
Analysis Tools
RooFit Toolkit
Data Management
Data Quality
Event display
Event Browser
Code releases
Databases
Check this page for HTML 4.01 Transitional compliance with the
W3C Validator
(More checks...)

Feb. 2, 2000 --
The methods described in this document can still be used to display histograms with HTML in Jas, but the preferred way to do so is to use XML. Please look at the Babar-Jas XML How-To for instructions on how to use XML.

HTML Layout with JAS


This page describes and demonstrated the use of HTML pages to preformat arrangements of histograms in JAS. See jas-html-demo.html for instructions on how to run a demonstration of this feature.


Instructions

  1. Create a normal HTML file. Stick to basic HTML tags, such as:

    • paragraphs, breaks, and rules
    • character formatting tags
    • logical formatting tags, such as headers
    • hyperlinks
    • images
    • tables

  2. Determine the full paths to your histograms in JAS. Run JAS and connect to your data server, and note the names of folders above your histograms, starting from the "Histograms" folder. These folder names, separated by slashes, form the path to your histogram, for instance "Histograms/test/Reference Histograms/2D Gaussian". Note that the first path component is always "Histograms", and the second is the CORBA name service name of your DOT requestor.

  3. Add an OBJECT tag for each histogram plot you wish to display. The class IDs for 1D and 2D plots are hep.babar.JasExtensions.Plot1D and hep.babar.JasExtensions.Plot2D, respectively. The class ID for scalers is hep.babar.JasExtensions.ScalerPlot

    Note that the Scaler plot is only fully functional in JAS versions 2.0XMAS-Babar2 and later. The 1D and 2D plots are not quite as new and are available in JAS versions BabarBeta4 and later. The old jas.bean.Plot (for either 1D or 2D histograms) may still be used, but it does not provide any of the formatting configuration options described below.

    For instance, for a 1D histogram, a simple object tag would look like this:

    	<OBJECT classid="hep.babar.JasExtensions.Plot1D">
    	  <PARAM name="data" value="Histograms/path/to/your/histogram">
    	</OBJECT>
          

    For a scaler, a simple object tag would look like:

    	<OBJECT classid="hep.babar.JasExtensions.ScalerPlot">
    	  <PARAM name="data" value="Histograms/path/to/your/scaler">
    	</OBJECT>
          

  4. Start JAS specifying both your JAS server and the HTML page. The syntax is:

    /afs/slac/package/jas/release/2.0XMAS-Babar2/jas --connect <host>/Histograms --startPage <URL>

    where <host> is the host on which you are running your JAS data server, and <URL> is the full URL to your HTML layout page. Note that --connect may be abbreviated -c, and --startPage may be abbreviated -s.


Specifying histogram formatting

Formatting options are specified with <PARAM> tags within the <OBJECT> tag. Each option requires a separate <PARAM> tag, with the name property set to the option name, and the value property set to the tag value. Note that both the option name and value are case-sensitive.

For instance, to create a plot of a 1D histogram colored blue with a logarithmic Y axis, the complete object tag would look like this:

      <OBJECT classid="hep.babar.JasExensions.Plot1D">
	<PARAM name="data" value="Histograms/path/to/your/histogram">
	<PARAM name="YAxisLogarithmic" value="true">
	<PARAM name="histogramBarColor" value="0x0000ff">
      </OBJECT>
    

These options are available for all plot types (allowed values listed in parentheses):

  • backgroundColor (24-bit RGB color value in hex)
    Specifies the background color for the plot. The color is a 24-bit RGB value in hex (6 digits), preceded by "0x". For instance, the default color, white, would be represented "0xffffff".

  • plotHeight (height in pixels)
    The height of the plot. The default is 200 pixels.

  • plotWidth (width in pixels)
    The width of the plot. The default is 200 pixels. Note that if the plot is placed in a table cell, the specified width is ignored, and the cell width is used instead.

These options are available for 1D plots:

  • YAxisLogarithmic (true or false)
    Selects a logarithmic vertical axis.

  • YAxisAllowSupressedZero (true or false)
    If this option is true, the range chosen for the vertical axis will always include zero.

  • showHistogramBars (true or false)
    Causes histogram bars (outlines, and optionally filled) to be drawn.

  • showErrorBars (true or false)
    Causes error bars to be drawn.

  • showDataPoints (true or false)
    Draws bin contents with a shape centered in the bin at the value height.

  • showLinesBetweenPoints (true or false)
    Enables "connect-the-dots" between successive bins.

  • histogramFill (true or false)
    Fills histogram bars with a solid color.

  • dataPointStyle (shape name)
    Selects a shape for drawing data points. Valid values are dot, box, triangle, diamond, star, cross, circle, or square.

  • dataPointSize (integer value)
    Controls the size of the data point shapes.

  • dataPointColor (24-bit RGB color in hex)
    Sets the color of data points.

  • histogramBarColor (24-bit RGB color in hex)
    Sets the histogram bar outline color, if filling is off, or the fill color, if it's on.

  • lineColor (24-bit RGB color in hex)
    Selets the "connect-the-dots" line color.

  • errorBarColor (24-bit RGB color in hex)
    Sets the color of the error bars.

These options are available for 2D plots:

  • histStyle (style name)
    Sets the style used to plot the 2D histogram. Valid values are:
    • box: draw a box plot
    • ellipse: draws an ellipse plot
    • colormap: draws a color density plot

  • colorMapScheme (scheme name)
    For density plots, selects a color scheme. Options are warm, cool, thermal, rainbow, greyscale, or userdefined. The last option allows the start and end colors for the density plot color blend to be specified.

  • startDataColor (24-bit RGB color in hex)
    Specifies the low-value color for a density plot with a user-defined color scheme.

  • endDataColor (24-bit RGB color in hex)
    Specifies the high-value color for a density plot with a user-defined color scheme.

  • shapeColor (24-bit RGB color in hex)
    Sets the data color for box and ellipse plots.

No extra formatting options are available for the scaler plots.

Limitations and FAQs

Please see the BaBar-Jas FAQ.


Maintained by Kevin Rennert, rennert@slac.stanford.edu
Last Modified Jan 20, 2000