Learn R Programming

xps (version 1.32.0)

getTreeNames: Get Tree Names

Description

Get tree names stored in a ROOT file.

Usage

getTreeNames(rootfile, treetype = "*", setname = NULL, gettitle = FALSE)

Arguments

rootfile
name of ROOT file, including full path.
treetype
tree type.
setname
name of ROOT subdirectory containing trees.
gettitle
If TRUE the titles of the trees will be returned.

Value

A vector of tree names. For gettitle=TRUE a vector of tree titles.

Details

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

Examples

Run this code
getTreeNames(paste(path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
getTreeNames(paste(path.package("xps"),"schemes/SchemeTest3.root",sep="/"), "scm")
getTreeNames(paste(path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))

Run the code above in your browser using DataLab