public class Tree extends java.lang.Object implements ITree
Constructor and Description |
---|
Tree(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addBranch(Branch br) |
void |
addBranch(java.lang.String name,
java.lang.String desc,
java.lang.String unit)
add Branch with name description and units
|
void |
configure() |
Branch |
getBranch(java.lang.String name) |
float[] |
getBranchData()
returns a float array containing branch data.
|
java.util.Map<java.lang.String,Branch> |
getBranches() |
DataVector |
getDataVector(java.lang.String expression,
java.lang.String tcut)
returns data vector filled with values evaluated with expression given
for entries that pass the given cut
|
DataVector |
getDataVector(java.lang.String expression,
java.lang.String tcut,
int limit)
returns data vector filled with values evaluated with expression given
for entries that pass the given cut.
|
DynamicTree |
getDynamicTree() |
int |
getEntries() |
java.util.List<java.lang.String> |
getListOfBranches()
returns list of branch names.
|
java.lang.String |
getName()
returns the name of the tree
|
javax.swing.tree.DefaultMutableTreeNode |
getRootNode() |
java.util.List<DataVector> |
getScanResults()
returns a list of data vectors stores after the last scan was done.
|
TreeSelector |
getSelector()
returns default tree selector.
|
static java.util.Map<java.lang.String,javax.swing.ImageIcon> |
getTreeIcons()
returns icons for the tree
|
boolean |
hasBranch(java.lang.String name)
check for branch name.
|
static java.util.Map<java.lang.String,javax.swing.ImageIcon> |
initTreeIcons()
initializes UI
|
void |
print() |
int |
readEntry(int entry) |
boolean |
readNext() |
void |
reset() |
void |
resetBranches(double number) |
void |
scanTree(java.lang.String expression,
java.lang.String tcut,
int limit,
boolean bothSides)
Scan a tree with expressions defined in expression string, multiple
expressions are separated by ":".
|
void |
setBranchData(float[] data)
Fills branches with values from the array.
|
void |
show() |
java.lang.String |
toString() |
public java.lang.String getName()
public void addBranch(Branch br)
public void addBranch(java.lang.String name, java.lang.String desc, java.lang.String unit)
name
- name of the branchdesc
- description of the branchunit
- units of the branchpublic java.util.List<java.lang.String> getListOfBranches()
getListOfBranches
in interface ITree
public static java.util.Map<java.lang.String,javax.swing.ImageIcon> getTreeIcons()
public static java.util.Map<java.lang.String,javax.swing.ImageIcon> initTreeIcons()
public void resetBranches(double number)
public float[] getBranchData()
public void setBranchData(float[] data)
data
- float array to fill branchespublic java.util.Map<java.lang.String,Branch> getBranches()
public void print()
public java.lang.String toString()
toString
in class java.lang.Object
public void show()
public TreeSelector getSelector()
public DataVector getDataVector(java.lang.String expression, java.lang.String tcut)
expression
- variables expressiontcut
- cut stringpublic DataVector getDataVector(java.lang.String expression, java.lang.String tcut, int limit)
expression
- variables expressiontcut
- cut stringlimit
- limit the number of events to run through -1 for all eventspublic void scanTree(java.lang.String expression, java.lang.String tcut, int limit, boolean bothSides)
expression
- expression list ":" separatedtcut
- cut expressionlimit
- number of events to run overbothSides
- flag indicating that start and end of the tree have to be sampled.public java.util.List<DataVector> getScanResults()
public boolean hasBranch(java.lang.String name)
name
- name of the branchpublic javax.swing.tree.DefaultMutableTreeNode getRootNode()
public int getEntries()
getEntries
in interface ITree
public DynamicTree getDynamicTree()
JHepSim. A part of HSTOOLS. version-1.2