Class | Description |
---|---|
Browser |
ROOT object browser.
|
Builder |
Builds a Java interface corresponding to a RootClass.
|
Delphes |
Get arrays of values from Delphes branches.
|
FileRoot |
Class to read ROOT files.
|
HBrowser |
ROOT Histogram browser implemented in Java.
|
Main |
Read ROOt files
|
Several tools to read and browser ROOT files. This package is modernized freehep-rootio project suitable for Java scripting. It also includes partial ROOT6 support. It includes:
import hep.io.root.*; import hep.io.root.interfaces.*; import java.io.IOException; public class RootTest { public static void main(String[] argv) throws IOException { RootFileReader rfr = new RootFileReader("Example.root"); TKey key = rfr.getKey("mainHistogram"); TH1 histogram = (TH1) key.getObject(); double entries= histogram.getEntries(); System.out.println("entries="+entries); } }
import hep.io.root.*; import hep.io.root.interfaces.*; import java.io.IOException; public class MoyTest { public static void main(String[] argv) throws IOException { RootFileReader rfr = new RootFileReader("Moy.root"); TKey key = rfr.getKey("MeanPedBF_0"); Moyennes moy = (Moyennes) key.getObject(); // Now we have the user define object we can call any method int size = moy.getSize(); System.out.println("Size="+size); } }
Jas4pp 1.5 © Java Analysis Studio for Particle Physics