|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjhplot.io.FileRoot
public class FileRoot
Class to read ROOT files. To get directory inside the file, use "cd()" method. You can get any objects inside a ROOT file as using keys as:
key1 = rr.getKey("dir1")
dir1=key1.getObject()
key2=dir1.getKey("dir2")
dir2=key2.getObject()
key3=dir2.getKey("Histogram")
h1d=H1D( key3.getObject() )
Constructor Summary | |
---|---|
FileRoot(String file)
Main constructor to build root file reader. |
|
FileRoot(URL url)
Open file from URL |
Method Summary | |
---|---|
hep.io.root.interfaces.TDirectory |
cd(String dir)
Navigate to a directory inside the ROOT file. |
void |
doc()
Show online documentation. |
Object |
get(String skey)
Get object associated with the key name in the current directory. |
H1D |
getH1D(String skey)
Get H1D histogram associated with the key name. |
H2D |
getH2D(String skey)
Get H2D histogram associated with the key name. |
List |
getInfo()
Get the StreamerInfo |
hep.io.root.interfaces.TKey |
getKey(int i)
Get a key using its index. |
hep.io.root.interfaces.TKey |
getKey(String skey)
Get a key |
ArrayList<String> |
getKeys()
Return all keys of the current directory as a list. |
int |
getNKeys()
Get number of objects in the current directory of a ROOT file. |
Object |
getObject(int i)
Get object associated with the key name in tthe current directory. |
Object |
getObject(String skey)
Get object associated with the key name in the current directory. |
P1D |
getP1D(String skey)
Get P1D associated with the key name. |
hep.io.root.RootFileReader |
getReader()
Returns RootFileReader |
String |
getTitle()
Get ROOT title |
int |
getVersion()
Get ROOT version |
String |
toString()
Return all root objects in form of a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FileRoot(String file)
file
- Input root filepublic FileRoot(URL url)
url
- Input URL fileMethod Detail |
---|
public hep.io.root.interfaces.TDirectory cd(String dir)
directory
- inside the file. Use the standard unix path, i.e.
dir1/dir2/dir3public String toString()
toString
in class Object
public ArrayList<String> getKeys()
public int getVersion()
public int getNKeys()
public String getTitle()
public hep.io.root.interfaces.TKey getKey(int i)
i
- index of this key
public List getInfo()
streamer
- infopublic hep.io.root.interfaces.TKey getKey(String skey)
skey
- key name
public hep.io.root.RootFileReader getReader()
public H1D getH1D(String skey)
skey
- key name
public H2D getH2D(String skey)
skey
- key name
public P1D getP1D(String skey)
skey
- key name
public Object get(String skey)
skey
- key name
public Object getObject(String skey)
skey
- key name
public Object getObject(int i)
i
- key index
public void doc()
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |