public class FileRoot extends 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(String file)
Main constructor to build root file reader.
|
FileRoot(URL url)
Open file from URL
|
Modifier and Type | Method and Description |
---|---|
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.
|
public FileRoot(String file)
file
- Input root filepublic FileRoot(URL url)
url
- Input URL filepublic hep.io.root.interfaces.TDirectory cd(String dir)
directory
- inside the file. Use the standard unix path, i.e.
dir1/dir2/dir3public String toString()
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 keypublic List getInfo()
streamer
- infopublic hep.io.root.interfaces.TKey getKey(String skey)
skey
- key namepublic hep.io.root.RootFileReader getReader()
public H1D getH1D(String skey)
skey
- key namepublic H2D getH2D(String skey)
skey
- key namepublic P1D getP1D(String skey)
skey
- key namepublic Object get(String skey)
skey
- key namepublic Object getObject(String skey)
skey
- key namepublic Object getObject(int i)
i
- key indexpublic void doc()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics