public class FileRoot
extends java.lang.Object
key1 = rr.getKey("dir1")
dir1=key1.getObject()
key2=dir1.getKey("dir2")
dir2=key2.getObject()
key3=dir2.getKey("Histogram")
h1d=H1D( key3.getObject() )
Constructor and Description |
---|
FileRoot(java.lang.String file)
Main constructor to build root file reader.
|
FileRoot(java.net.URL url)
Open file from URL
|
Modifier and Type | Method and Description |
---|---|
TDirectory |
cd(java.lang.String dir)
Navigate to a directory inside the ROOT file.
|
void |
doc()
Show online documentation.
|
java.lang.Object |
get(java.lang.String skey)
Get object associated with the key name in the current directory.
|
H1D |
getH1D(java.lang.String skey)
Get H1D histogram associated with the key name.
|
H2D |
getH2D(java.lang.String skey)
Get H2D histogram associated with the key name.
|
java.util.List |
getInfo()
Get the StreamerInfo
|
TKey |
getKey(int i)
Get a key using its index.
|
TKey |
getKey(java.lang.String skey)
Get a key
|
java.util.ArrayList<java.lang.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.
|
java.lang.Object |
getObject(int i)
Get object associated with the key name in tthe current directory.
|
java.lang.Object |
getObject(java.lang.String skey)
Get object associated with the key name in the current directory.
|
P1D |
getP1D(java.lang.String skey)
Get P1D associated with the key name.
|
RootFileReader |
getReader()
Returns RootFileReader
|
java.lang.String |
getTitle()
Get ROOT title
|
int |
getVersion()
Get ROOT version
|
java.lang.String |
toString()
Return all root objects in form of a string.
|
public FileRoot(java.lang.String file)
file
- Input root filepublic FileRoot(java.net.URL url)
url
- Input URL filepublic TDirectory cd(java.lang.String dir)
directory
- inside the file. Use the standard unix path, i.e.
dir1/dir2/dir3public java.lang.String toString()
toString
in class java.lang.Object
public java.util.ArrayList<java.lang.String> getKeys()
public int getVersion()
public int getNKeys()
public java.lang.String getTitle()
public TKey getKey(int i)
i
- index of this keypublic java.util.List getInfo()
streamer
- infopublic TKey getKey(java.lang.String skey)
skey
- key namepublic RootFileReader getReader()
public H1D getH1D(java.lang.String skey)
skey
- key namepublic H2D getH2D(java.lang.String skey)
skey
- key namepublic P1D getP1D(java.lang.String skey)
skey
- key namepublic java.lang.Object get(java.lang.String skey)
skey
- key namepublic java.lang.Object getObject(java.lang.String skey)
skey
- key namepublic java.lang.Object getObject(int i)
i
- key indexpublic void doc()
JHepSim. A part of HSTOOLS. version-1.2