Re: [ROOT] Load data in a TTree from a raw file

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Jun 25 2003 - 15:44:21 MEST


Hi Matteo,

We give examples (see basic.C) in the tutorials showing how to read a file
and fill a Tree.

In the CVS version, I have added a new method to the classes TNtuple
and TNtupleD, such that you can do
 root [0] TNtuple nt("nt","test","x:y:z")
 root [1] nt.ReadFile("basic.dat")


Rene Brun

Matteo Alfonsi wrote:
> 
> Hi rooters,
> 
> Can I load data from a raw file in a TTree as easy as in PAW:
> 
>  NTUPLE/CREATE 1 '' NVAR ! ! VAR1 VAR2 ...
>  NTUPLE/READ 1 RAWFILE.DAT
> 
> Looking at HTML docs, I haven't found any method about
> 
> I know how I can fill a TTree, but I think it will be very useful a quick
> method that read the raw file, instead of reading with the C/C++ function
> that parses each row of the file and filling the struct that will file the
> entry of the TTree.
> 
> Thanks, Matteo.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET