Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Histogramming Package in Java CHEP 2000 February 10, 2000 Teatro Antonianum, Padova Naomi Takashimizu/Shimane University Takashi Sasaki/KEK.

Similar presentations


Presentation on theme: "A Histogramming Package in Java CHEP 2000 February 10, 2000 Teatro Antonianum, Padova Naomi Takashimizu/Shimane University Takashi Sasaki/KEK."— Presentation transcript:

1 A Histogramming Package in Java CHEP 2000 February 10, 2000 Teatro Antonianum, Padova Naomi Takashimizu/Shimane University Takashi Sasaki/KEK

2 A Simple Histogramming Package We have developed a prototype of software package for histogramming. –creating, filling, and several operations Histogram objects stored in the OODB can be shared by C++ and Java applications. The package also includes a histogram visualizer –browsing and modifying histograms interactively. OODB C++ Java

3 Software Development in Java Java is suited for developing physics analysis program or tools. –A simple language designed to be object oriented. –Pointer and garbage collection are excluded. –Architecture-neutral bytecode can be transported to any platform. –Provides a variety of GUI components. –etc However software development in C++ is still dominant in HEP. If it is possible to share object between C++ and Java one can choose language suited for one’s purpose.

4 Interoperability of persistent objects C++ and Java objects which have different internal expression can be shared by using Objectivity/DB. To share objects you must make C++ and Java class compatible with the schema. Schema definition is done by defining a class derived from a persistent-capable class of Objectivity/DB. –DDL(Data Definition Language) files in C++ –normal source files in Java

5 C++ Java //Histo1D.ddl //Histo1D.java #include bin.h public class Histo1D typedef ooRef(Bin) BinR extends Histogram declare(ooVArray,BinR) { static int SIZE=100; class Histo1D:public private int _numberOfBins; :public Histogram private Bin[] _bin { = new Bin[SIZE]; private:... int32 _numberOfBins; ooVArray(BinR) _bin;... Schema definition

6 Limitations in defining compatible schema variable-length arrays in C++ are mapped to fixed- length arrays in Java Multiple inheritance is not supported in Java. Schema files cannot be shared.

7 Design Persistent class Database control class Visualizer

8 Design A Histogram object contains an collection of Bin objects as a member. In the current version of Objectivity/DB, the collection of Bin is implemented by –variable-length array in C++ –fixed-length array in Java  Histograms object is a container of Histogram objects. A new Histogram is created by a method in a container and clustered into the container.

9 Design  ooSession is the class for all purpose to establish a connection of an application with the database and control transactions.  MySession is the extended class of ooSession for accessing persistent histograms.  Jaws(Java Analysis WorkShop) is the core of the visualizer.

10 Sequence Diagram

11 An example of GUI

12 Summary We have implemented a prototype of software package for histogramming in a short period using Java. Objects were able to be shared by C++ and Java application without much difficulty.


Download ppt "A Histogramming Package in Java CHEP 2000 February 10, 2000 Teatro Antonianum, Padova Naomi Takashimizu/Shimane University Takashi Sasaki/KEK."

Similar presentations


Ads by Google