root.data {xps} | R Documentation

## Create class DataTreeSet accessing ROOT data file

### Description

Create class DataTreeSet accessing ROOT data file.

### Usage

    root.data(xps.scheme, rootfile = character(0), celnames = "*")

### Arguments

`xps.scheme` | A `SchemeTreeSet` containing the correct scheme for the ROOT data file.
`rootfile` | name of ROOT data file, including full path.
`celnames` | optional `character` vector of tree names to get only subset of trees.

### Details

An S4 class `DataTreeSet` will be created, serving as R wrapper to the existing `ROOT` data file `rootfile`.

If the `DataTreeSet` should only handle a subset of the trees stored in `rootfile`, the tree names must be supplied as vector `celnames`.

To get the names of all trees stored in `rootfile` you can call function `getTreeNames` first.

### Value

A `DataTreeSet` object.

### Note

Use `root.data` to access the ROOT data file from new R sessions to avoid creating a new `ROOT` data file for every R session.

### Author(s)

Christian Stratowa

### See Also

`import.data`, `DataTreeSet`

### Examples

    ## get scheme and import CEL-files from package
    scheme.test3 <- root.scheme(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
    data.test3 <- import.data(scheme.test3,"tmp_datatest3",celdir=paste(.path.package("xps"),"raw",sep="/"),verbose=FALSE)

    ## use subset of CEL-files
    subdata.test3 <- root.data(scheme.test3,"tmp_datatest3_cel.root", celnames=c("TestA1.cel","TestB2.cel"))

[Package xps version 1.4.10 Index]