root.merge.data: Create class DataTreeSet by merging ROOT data files

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Create class DataTreeSet by merging different ROOT data files.

Usage

1
root.merge.data(xps.scheme, rootfiles = list(), celnames = "*")

Arguments

xps.scheme

A SchemeTreeSet containing the correct scheme for the ROOT data file.

rootfiles

list of ROOT data file(s), including full path.

celnames

optional character vector of tree names to get only subset of trees.

Details

This function allows to merge data trees from different existing ROOT data files.

An S4 class DataTreeSet will be created, serving as R wrapper to the existing ROOT data file(s) rootfiles.

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

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

Value

A DataTreeSet object.

Author(s)

Christian Stratowa

See Also

root.data, DataTreeSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

## get subset of CEL-files
subdataA <- root.data(scheme.test3,"tmp_datatest3_cel.root", celnames=c("TestA1.cel","TestA2.cel"))
subdataB <- root.data(scheme.test3,"tmp_datatest3_cel.root", celnames=c("TestB1.cel","TestB2.cel"))

## merge data
dataAB <- root.merge.data(scheme.test3,c(rootFile(subdataA),rootFile(subdataB)), celnames=c("TestB1.cel","TestA2.cel","TestB2.cel"))

xps documentation built on Nov. 8, 2020, 6 p.m.