60 likes | 222 Views
How Geant4 can go with the Java Environment H. Yoshida Naruto U.E. How C++ and Java can go together? Increasing demand for Java which is now stable and efficient (Java-2) Not an easy job but several tools are available JAS Connection with G4 was demonstrated by Tony at Naruto workshop
E N D
How Geant4 can go with the Java EnvironmentH. Yoshida Naruto U.E. • How C++ and Java can go together? • Increasing demand for Java which is now stable and efficient (Java-2) • Not an easy job but several tools are available • JAS • Connection with G4 was demonstrated by Tony at Naruto workshop • Integrated with GAG by a new class G4UIJAG • Glue is JNI (Java Native Interface)
GAG side Originally G4UIJAS developed by Tony Limited control over G4 Beam on/off capability => Exploit Java's thread to stop Geant4's run G4UIJAG class Complete control of G4 with GAG A new constructor, taking an instance of HistogramFactory Interface Layers • JAS side • AIDA C++ • JNI layer • HistogramFactory • Invoke JVM • AIDA Java • HistogramFactory • RMI connection • On-line histogramming
JAS + GAG working together • Run GAG => %java gag • Start Geant4 (GAG menu) • Invoke JAS from GAG (GAG menu) • Connect Geant4 with JAS (JAS menu) • /run/beamOn (GAG menu) • On-line histogramming (JAS) • End (GAG)
Demo - exampleN03 • Default gun values (0.03GeV) • 1,000,000 events to fill LAbs • Speed slow down by ~10%at on-line histogramming with JAS
TODO List • Complete (C++/JNI) AIDA • Unification of JAS and GAG • GAG as JAS's plugin • RMI GAG (prototype demonstrated at SLAC WS) • Unification with Visualization, e.g., VRML