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);
}
}