jhplot.io
Class FileRoot

java.lang.Object
  extended by jhplot.io.FileRoot

public class FileRoot
extends java.lang.Object

Class to read ROOT files.


Constructor Summary
FileRoot(java.lang.String file)
          Main constructor to build root file reader.
 
Method Summary
 void doc()
          Show online documentation.
 H1D getH1D(int index)
          Get H1D histogram associated with the key index.
 H1D getH1D(java.lang.String skey)
          Get H1D histogram associated with the key name.
 hep.io.root.interfaces.TKey getKey(int i)
          Get a key
 hep.io.root.interfaces.TKey getKey(java.lang.String skey)
          Get a key
 int getNKeys()
          Get number of objects in ROOT file
 java.lang.Object getObject(int i)
          Get object associated with the key name.
 java.lang.Object getObject(java.lang.String skey)
          Get object associated with the key name
 P1D getP1D(int index)
          Get P1D object associated with the key index.
 P1D getP1D(java.lang.String skey)
          Get P1D object associated with the key index.
 P1D getP1D(java.lang.String skey, boolean ybin)
          Get P1D object associated with the key index.
 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileRoot

public FileRoot(java.lang.String file)
Main constructor to build root file reader.

Parameters:
file - Input root file
Method Detail

toString

public java.lang.String toString()
Return all root objects in form of a string

Overrides:
toString in class java.lang.Object
Returns:
a string showing all ROOT objects

getVersion

public int getVersion()
Get ROOT version

Returns:
ROOT version

getNKeys

public int getNKeys()
Get number of objects in ROOT file

Returns:
number of objects

getTitle

public java.lang.String getTitle()
Get ROOT title

Returns:
ROOT title

getKey

public hep.io.root.interfaces.TKey getKey(int i)
Get a key

Parameters:
i - index of this key
Returns:
TKey object.

getKey

public hep.io.root.interfaces.TKey getKey(java.lang.String skey)
Get a key

Parameters:
skey - key name
Returns:
TKey object.

getH1D

public H1D getH1D(java.lang.String skey)
Get H1D histogram associated with the key name. It is assumed that this ROOT key keeps histogram (TH1).

Parameters:
skey - key name
Returns:
H1D histogram

getH1D

public H1D getH1D(int index)
Get H1D histogram associated with the key index. It is assumed that this ROOT key keeps histogram (TH1).

Parameters:
index - key index
Returns:
H1D histogram

getP1D

public P1D getP1D(int index)
Get P1D object associated with the key index. It is assumed that this ROOT key keeps histogram (TH1), which is then transformed to P1D. Y values set to the bin height

Parameters:
index - index of the object
Returns:
output P1D

getP1D

public P1D getP1D(java.lang.String skey)
Get P1D object associated with the key index. It is assumed that this ROOT key keeps histogram (TH1), which is then transformed to P1D. Y values are set to the bin height.

Parameters:
skey - name of the object
Returns:
output P1D

getP1D

public P1D getP1D(java.lang.String skey,
                  boolean ybin)
Get P1D object associated with the key index. It is assumed that this ROOT key keeps histogram (TH1), which is then transformed to P1D. Y values are set to the bin height

Parameters:
skey - name of the object
ybin - if true, Y values are set to the mean in each bin. if false - to the bin height.
Returns:
output P1D

getObject

public java.lang.Object getObject(java.lang.String skey)
Get object associated with the key name

Parameters:
skey - key name
Returns:
Object

getObject

public java.lang.Object getObject(int i)
Get object associated with the key name.

Parameters:
i - key index
Returns:
Object

doc

public void doc()
Show online documentation.



jHepWork 2.8 (©) S.Chekanov