getNumberTrees {xps} | R Documentation

## Get Number of Trees

### Description

Get number of trees stored in a ROOT file.

### Usage

    getNumberTrees(rootfile, treetype = "*", setname = NULL)

### Arguments

`rootfile` | name of ROOT file, including full path.
`treetype` | tree type.
`setname` | name of ROOT subdirectory containing trees.

### Details

Extracts the number of trees of `treetype` stored in `ROOT` file `rootfile`.
Valid tree types are listed in `validTreetype`. For `treetype="*"` the total number of trees in `rootfile` are returned.
If `setname` is provided, only trees in subdirectory `setname` are counted.

### Value

Number of trees.

### Author(s)

Christian Stratowa

### Examples

    getNumberTrees(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
    getNumberTrees(paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

[Package xps version 1.2.10 Index]