160 likes | 345 Views
JODA. A Testbeam Online Display and Analysis Program in Java Dietrich Liko & Niko Neufeld. What is Joda. Online Monitoring of HPD data Visualization of the photosensor Various histograms Charge, Multiplicity, Noise Interface to PAW for more detailed analysis
E N D
JODA A Testbeam Online Display and Analysis Program in Java Dietrich Liko & Niko Neufeld
What is Joda • Online Monitoring of HPD data • Visualization of the photosensor • Various histograms • Charge, Multiplicity, Noise • Interface to PAW for more detailed analysis • Fitting, Extration of derived quantities (efficiencies etc.)
The task • Replace existing Fortran, Tcl, C program for the Pad-HPD testbeam by an integrated Java program • Learn as much as possible about Java • Write a clean, Object Oriented solution to the problem
Why Java? • Java is a viable alternative to C++ (or is it?) • Java has easy interfaces to the Web, graphics, CORBA, etc. • Java is more easy to handle and more “OO” in some respects • Java comes with a huge and powerful multipurpose Class Library, the JFC
Program features • Display in AWT using custom light-weight components • Read in of raw data files in compressed or uncompressed format, with flexible byte ordering • Flexible display of various detector related quantities, auto updating while following the mouse
Program features (contd.) • Uses multi-threading (easy and effective in Java) • Uses customized Listener, Multi-caster design-pattern for asynchronous communication (copy, adapt and extend Design Patterns from the book, or Java itself)
DesignpatternModel View Controller (MVC) • Well know pattern in GUI building • Widely used in SWING • Easy to understand From “Design Patterns” Gamma et al.
Prototype • One Detector only • No Histograms • No printing • Java 1.1.2 • Runs also as an applet in your browser
A screen shot Try it: http://~nikolaus/joda
Support display of many HPDs and Beam-Telescope planes JNI (Java Native Interface) to HBOOK (ready) Support access to Objectivity/DB (Mario Alemi’s Boss) Enable printing of detectors and screen shots Use Java native serialization for easy and rapid storage Features (to be) added for the new Version
Joda - the next step • Java is rapidly evolving - Sun is releasing JDK 1.2.3 very soon • Better GUIS and graphics with Java 2D and SWING • Java 2D: advanced 2D drawing concepts (different stroke widths and textures) • SWING: • modern GUI components like scrollbars, desktops, icons, etc. • Performance improvements: double buffering
Programming experiences • Slower (not a problem in this application) • Platform independence (somewhat) spoilt by different Java Virtual Machines and restrictions for Applets • AWT event handling and scheduling (for example of screen-repaints) can be somewhat cryptic
Programming experiences • Java is an excellent & powerful programming environment • Object orientation goes in much smoother than in C++ • Learning curve is steeper and debugging phase much less painful than in C++ (clear error messages!) • Platform independent (no more porting from Linux to HP to Windows to …)
Some thoughts • We should keep an eye on Java • Maybe we should do some “field tests” to see if and where Java is suitable for physicists tasks • Find out if “average” users feel more comfortable with it than C++ • A mixed C++/Java environment should be no problem (easier than C/Fortran was)
The last slide -An invitation • Although this is work in progress... • …try the display on your web-browser at http://home.cern.ch/~nikolaus/joda • …if you like it, come back when the SWING version goes WWW