RE: write out a TNtuple

From: Rene Brun <brun_at_pcroot.cern.ch>
Date: Wed, 31 Aug 2005 07:21:25 +0200 (MEST)


Art,

Do something like

    TFile *f = new TFile("myntuple.root","recreate");     TNtuple *t = new TNtuple(...
    //loop on t->Fill

    t->Write();

    //that's all

Rene Brun

On Tue, 30 Aug 2005,
Arthur E. Snyder wrote:

>
>
> I'd like to write out a read back a simple TNtuple. This seems to be kind
> of compicated with "keys" and such. Isn't there a simple way to do it?
> Like t->Write("filename")?
>
> -Art S.
>
> A.E. Snyder, Group EC \!c*p?/
> SLAC Mail Stop #95 ((. .))
> Box 4349 |
> Stanford, Ca, USA, 94309 '\|/`
> e-mail:snyder_at_slac.stanford.edu o
> phone:650-926-2701 _
> http://www.slac.stanford.edu/~snyder BaBar
> FAX:650-926-2657 Collaboration
>
>
>
> On Thu, 25 Aug 2005, Philippe Canal wrote:
>
>>> the root reads it very slowly(Is it normal?).
>>
>> In general this should not be the case (i.e. reading an entry from the
>> original files
>> or from the merge files should be about the same).
>>
>>> I want to split again this file to smaller files, Is it possible?
>>
>> You can simply clone the large tree but setting the TTree maximum
>> size to a low number (see TTree::SetMaxTreeSize)
>> (see $ROOTSYS/tutorials/copytree*.C)
>>
>> Cheers,
>> Philippe.
>>
>> -----Original Message-----
>> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
>> On Behalf Of Saeid Paktinat Mehdiabadi
>> Sent: Thursday, August 25, 2005 8:58 AM
>> To: roottalk (Mailing list discussing all aspects of the ROOT system)
>> Subject: [ROOT] Split a root file!
>>
>> Hello ROOT developers,
>>
>> I had something like 100 root files with same structure,
>>
>> I used, TChain::Merge(), to merge them and make a single file, this file is
>> very big and the root reads it very slowly(Is it normal?).
>>
>> I want to split again this file to smaller files, Is it possible?
>>
>> What's the solution?
>>
>> Thank you,
>>
>> Saeid
>>
>>
>
Received on Wed Aug 31 2005 - 07:21:33 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:12 MET