16
JODA JODA A Testbeam Online Display A Testbeam Online Display and and Analysis Program in Java Analysis Program in Java Dietrich Liko & Niko Neufeld Dietrich Liko & Niko Neufeld

JODA

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: JODA

JODAJODA

A Testbeam Online Display andA Testbeam Online Display and

Analysis Program in JavaAnalysis Program in JavaDietrich Liko & Niko NeufeldDietrich Liko & Niko Neufeld

Page 2: JODA

What is JodaWhat is Joda

Online Monitoring of HPD dataOnline Monitoring of HPD data Visualization of the photosensor Visualization of the photosensor Various histogramsVarious histograms

Charge, Multiplicity, NoiseCharge, Multiplicity, Noise Interface to PAW for more detailed Interface to PAW for more detailed

analysisanalysis Fitting, Extration of derived quantities Fitting, Extration of derived quantities

(efficiencies etc.)(efficiencies etc.)

Page 3: JODA

The taskThe task

Replace existing Fortran, Tcl, C Replace existing Fortran, Tcl, C program for the Pad-HPD testbeam by program for the Pad-HPD testbeam by an integrated Java programan integrated Java program

Learn as much as possible about JavaLearn as much as possible about Java Write a clean, Object Oriented solution Write a clean, Object Oriented solution

to the problemto the problem

Page 4: JODA

Why Java?Why Java?

Java is a viable alternative to C++ (or is Java is a viable alternative to C++ (or is it?)it?)

Java has easy interfaces to the Web, Java has easy interfaces to the Web, graphics, CORBA, etc.graphics, CORBA, etc.

Java is more easy to handle and more Java is more easy to handle and more “OO” in some respects“OO” in some respects

Java comes with a huge and powerful Java comes with a huge and powerful multipurpose Class Library, the JFCmultipurpose Class Library, the JFC

Page 5: JODA

Program featuresProgram features

Display in AWT using custom light-Display in AWT using custom light-weight componentsweight components

Read in of raw data files in compressed Read in of raw data files in compressed or uncompressed format, with flexible or uncompressed format, with flexible byte orderingbyte ordering

Flexible display of various detector Flexible display of various detector related quantities, auto updating while related quantities, auto updating while following the mousefollowing the mouse

Page 6: JODA

Program features (contd.)Program features (contd.)

Uses multi-threading (easy and effective Uses multi-threading (easy and effective in Java)in Java)

Uses customized Listener, Multi-caster Uses customized Listener, Multi-caster design-pattern for asynchronous design-pattern for asynchronous communication (copy, adapt and extend communication (copy, adapt and extend Design Patterns from Design Patterns from the bookthe book, or , or Java Java itself)itself)

Page 7: JODA

DesignpatternDesignpatternModel View Controller (MVC)Model View Controller (MVC)

Well know pattern in Well know pattern in GUI buildingGUI building

Widely used in Widely used in SWINGSWING

Easy to understandEasy to understand

From “Design Patterns” Gamma et al.

Page 8: JODA

PrototypePrototype

One Detector onlyOne Detector only No HistogramsNo Histograms No printingNo printing Java 1.1.2Java 1.1.2 Runs also as an applet in your browserRuns also as an applet in your browser

Page 9: JODA
Page 10: JODA

Features (to be) added for the Features (to be) added for the new Versionnew Version

Support display of Support display of many HPDs and Beam-many HPDs and Beam-Telescope planesTelescope planes

JNI (Java Native JNI (Java Native Interface) to HBOOK Interface) to HBOOK (ready) (ready)

Support access to Support access to Objectivity/DB (Mario Objectivity/DB (Mario Alemi’s Alemi’s BossBoss))

Enable printing of Enable printing of detectors and detectors and screen shotsscreen shots

Use Java native Use Java native serialization for easy serialization for easy and rapid storageand rapid storage

Page 11: JODA

Joda - the next stepJoda - the next step Java is rapidly evolving - Sun is releasing Java is rapidly evolving - Sun is releasing

JDK 1.2.3 very soonJDK 1.2.3 very soon Better GUIS and graphics with Java 2D Better GUIS and graphics with Java 2D

and SWINGand SWING Java 2D: advanced 2D drawing concepts Java 2D: advanced 2D drawing concepts

(different stroke widths and textures)(different stroke widths and textures) SWING:SWING:

modern GUI components like scrollbars, modern GUI components like scrollbars, desktops, icons, etc.desktops, icons, etc.

Performance improvements: double bufferingPerformance improvements: double buffering

Page 12: JODA

Joda goes SwingJoda goes Swing

Page 13: JODA

Programming experiences Programming experiences

Slower (not a problem in this Slower (not a problem in this application)application)

Platform independence (somewhat) Platform independence (somewhat) spoilt by different Java Virtual Machines spoilt by different Java Virtual Machines and restrictions for Appletsand restrictions for Applets

AWT event handling and scheduling (for AWT event handling and scheduling (for example of screen-repaints) can be example of screen-repaints) can be somewhat crypticsomewhat cryptic

Page 14: JODA

Programming experiences Programming experiences Java is an excellent & powerful Java is an excellent & powerful

programming environmentprogramming environment Object orientation goes in much Object orientation goes in much

smoother than in C++smoother than in C++ Learning curve is steeper and Learning curve is steeper and

debugging phase much less painful debugging phase much less painful than in C++ (than in C++ (clear error messages!)clear error messages!)

Platform independent (no more porting Platform independent (no more porting from Linux to HP to Windows to …)from Linux to HP to Windows to …)

Page 15: JODA

Some thoughtsSome thoughts

We should keep an eye on JavaWe should keep an eye on Java Maybe we should do some “field tests” to Maybe we should do some “field tests” to

see if and where Java is suitable for see if and where Java is suitable for physicists tasksphysicists tasks

Find out if “average” users feel more Find out if “average” users feel more comfortable with it than C++comfortable with it than C++

A mixed C++/Java environment should be A mixed C++/Java environment should be no problem (easier than C/Fortran was)no problem (easier than C/Fortran was)

Page 16: JODA

The last slide -The last slide -An invitationAn invitation

Although this is work in progress...Although this is work in progress... ……try the display on your web-browser try the display on your web-browser

at http://home.cern.ch/~nikolaus/jodaat http://home.cern.ch/~nikolaus/joda ……if you like it, come back when the if you like it, come back when the

SWING version goes WWWSWING version goes WWW