The main data types and structures
can be divided into several categories:
- Data types and structures of the Python
programming language [1] such as
string, list, tuple, sets, maps,
dictionaries, etc.;
- Data types of the standard Java API.
For example, to import the Java random number generator, one should use:
>>> from java.util import Random
- Data types and structures from the Numeric package and jhplot.math.*
One should import them as:
>>> from Numeric import [class]
or
>>> from jhplot.math import [class]
where [class] is the corresponding imported class.
These packages should be used if one wants to have a short and highly-optimised
code, which is a factor 10 faster than the usual Jython code with big loops over
primitive data types.
- All FreeHEP data structures for histograming, fit etc.
Usually, to import JAIDA classes, the user should include:
>>> from hep.aida import [class]
- Finally, data structures of jHepWork itself which, in several
cases, are build on top of the JAIDA histogram classes.
Those include histogram classes (H1D, H2D) and data
containers P1D, P2D and P3D for scientific plots with 2-level errors (statistical
and systematical errors) and functions
F1D and F2D. All such classes are included to the jHPlot package [11].
You can import such classes as:
>>> from jhplot import [class1],[class2],[class3]
where [class] is the corresponding class for import.
The most important classes of jHPlot package, which is the core of
jHepWork, will be discussed below.
Also, below we will discuss only Jython scripting. Analogously,
one can write programs in BeanShell or Java.