public class Tree extends Object implements ITree
Modifier and Type | Method and Description |
---|---|
void |
addBranch(Branch br) |
void |
addBranch(String name,
String desc,
String unit)
add Branch with name description and units
|
void |
configure() |
Branch |
getBranch(String name) |
float[] |
getBranchData()
returns a float array containing branch data.
|
Map<String,Branch> |
getBranches() |
DataVector |
getDataVector(String expression,
String tcut)
returns data vector filled with values evaluated with expression given
for entries that pass the given cut
|
DataVector |
getDataVector(String expression,
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() |
List<String> |
getListOfBranches()
returns list of branch names.
|
String |
getName()
returns the name of the tree
|
DefaultMutableTreeNode |
getRootNode() |
List<DataVector> |
getScanResults()
returns a list of data vectors stores after the last scan was done.
|
TreeSelector |
getSelector()
returns default tree selector.
|
static Map<String,ImageIcon> |
getTreeIcons()
returns icons for the tree
|
boolean |
hasBranch(String name)
check for branch name.
|
static Map<String,ImageIcon> |
initTreeIcons()
initializes UI
|
void |
print() |
int |
readEntry(int entry) |
boolean |
readNext() |
void |
reset() |
void |
resetBranches(double number) |
void |
scanTree(String expression,
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() |
String |
toString() |
public Tree(String name)
public String getName()
public void addBranch(Branch br)
public void addBranch(String name, String desc, String unit)
name
- name of the branchdesc
- description of the branchunit
- units of the branchpublic List<String> getListOfBranches()
getListOfBranches
in interface ITree
public void resetBranches(double number)
public float[] getBranchData()
public void setBranchData(float[] data)
data
- float array to fill branchespublic void print()
public void show()
public TreeSelector getSelector()
public DataVector getDataVector(String expression, String tcut)
expression
- variables expressiontcut
- cut stringpublic DataVector getDataVector(String expression, String tcut, int limit)
expression
- variables expressiontcut
- cut stringlimit
- limit the number of events to run through -1 for all eventspublic void scanTree(String expression, 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 List<DataVector> getScanResults()
public boolean hasBranch(String name)
name
- name of the branchpublic DefaultMutableTreeNode getRootNode()
public int getEntries()
getEntries
in interface ITree
public DynamicTree getDynamicTree()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics