Documentation of 'org.jlab.groot.tree.Tree' Java class
Tree
org.jlab.groot.tree

Class Tree

    • Constructor Summary

      Constructors 
      Constructor and Description
      Tree(java.lang.String name) 
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      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() 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Tree

        public Tree(java.lang.String name)
    • Method Detail

      • getName

        public java.lang.String getName()
        returns the name of the tree
        Specified by:
        getName in interface ITree
        Returns:
      • addBranch

        public void addBranch(Branch br)
      • addBranch

        public void addBranch(java.lang.String name,
                              java.lang.String desc,
                              java.lang.String unit)
        add Branch with name description and units
        Parameters:
        name - name of the branch
        desc - description of the branch
        unit - units of the branch
      • getListOfBranches

        public java.util.List<java.lang.String> getListOfBranches()
        returns list of branch names. User to define cuts and expressions
        Specified by:
        getListOfBranches in interface ITree
        Returns:
      • getTreeIcons

        public static java.util.Map<java.lang.String,javax.swing.ImageIcon> getTreeIcons()
        returns icons for the tree
        Returns:
      • initTreeIcons

        public static java.util.Map<java.lang.String,javax.swing.ImageIcon> initTreeIcons()
        initializes UI
        Returns:
      • resetBranches

        public void resetBranches(double number)
      • getBranchData

        public float[] getBranchData()
        returns a float array containing branch data.
        Returns:
        float array
      • setBranchData

        public void setBranchData(float[] data)
        Fills branches with values from the array.
        Parameters:
        data - float array to fill branches
      • getBranch

        public Branch getBranch(java.lang.String name)
        Specified by:
        getBranch in interface ITree
      • reset

        public void reset()
        Specified by:
        reset in interface ITree
      • readNext

        public boolean readNext()
        Specified by:
        readNext in interface ITree
      • getBranches

        public java.util.Map<java.lang.String,Branch> getBranches()
      • print

        public void print()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • show

        public void show()
      • configure

        public void configure()
        Specified by:
        configure in interface ITree
      • getSelector

        public TreeSelector getSelector()
        returns default tree selector. cuts can be added to internal selector
        Returns:
      • getDataVector

        public 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
        Parameters:
        expression - variables expression
        tcut - cut string
        Returns:
        DataVector with expression values
      • getDataVector

        public 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. The limit is set on variables.
        Parameters:
        expression - variables expression
        tcut - cut string
        limit - limit the number of events to run through -1 for all events
        Returns:
      • scanTree

        public 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 ":". The results are stored in internal array, and can be accessed through getScanResults() method. Number of Data vectors in the result is equal to number of expressions. If bothSides flag is ture then the tree is parsed limit/2 events from the start of the tree and last limit/2 event. This is useful to determine the limits of the variable, scanning the end portion of the tree will ensure that monotonically changing variables like indicies return boundaries that are correct.
        Parameters:
        expression - expression list ":" separated
        tcut - cut expression
        limit - number of events to run over
        bothSides - flag indicating that start and end of the tree have to be sampled.
      • getScanResults

        public java.util.List<DataVector> getScanResults()
        returns a list of data vectors stores after the last scan was done.
        Returns:
        DataVector list
      • hasBranch

        public boolean hasBranch(java.lang.String name)
        check for branch name.
        Parameters:
        name - name of the branch
        Returns:
        true if branch with name exists, false otherwise
      • getRootNode

        public javax.swing.tree.DefaultMutableTreeNode getRootNode()
      • getEntries

        public int getEntries()
        Specified by:
        getEntries in interface ITree
      • readEntry

        public int readEntry(int entry)
        Specified by:
        readEntry in interface ITree

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.