\HeaderA{getNumberTrees}{Get Number of Trees}{getNumberTrees}
\keyword{manip}{getNumberTrees}
\begin{Description}\relax
Get number of trees stored in a ROOT file.
\end{Description}
\begin{Usage}
\begin{verbatim}
getNumberTrees(rootfile, treetype = "*", setname = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{rootfile}] name of ROOT file, including full path.
\item[\code{treetype}] tree type.
\item[\code{setname}] name of ROOT subdirectory containing trees.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Extracts the number of trees of \code{treetype} stored in \code{\LinkA{ROOT}{ROOT}} file \code{rootfile}. \\
Valid tree types are listed in \code{\LinkA{validTreetype}{validTreetype}}. For \code{treetype="*"} the total number of trees in \code{rootfile}
are returned. \\
If \code{setname} is provided, only trees in subdirectory \code{setname} are counted.
\end{Details}
\begin{Value}
Number of trees.
\end{Value}
\begin{Author}\relax
Christian Stratowa
\end{Author}
\begin{Examples}
\begin{ExampleCode}
getNumberTrees(paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/"))
getNumberTrees(paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/"))
\end{ExampleCode}
\end{Examples}

