Re: a huge time

From: Amhis Yasmine <amhis_at_lal.in2p3.fr>
Date: Mon, 23 Jul 2007 18:18:44 +0200


Thanks :-)

Yasmine

Philippe Canal a écrit :
> Hi,
>
> I think you loop curly brace is out of place. Try:
>
> TTree* NewTree = new ("NewTree","NexTree");
> NewTree->Branch("NewVar",NewVar, "NewVar[6016]/F")
> for(Int_t i = 0; i< OldTree->GetEntries(); i++)
> {
> OldTree->GetEntry(i);
> for( Int_t p = 0; p<6016; p++){
> NewVar[p]= OldVar[p];
> }
> NewTree->Fill();//
> }
>
> Cheers,
> Philippe
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch]
> On Behalf Of Amhis Yasmine
> Sent: Monday, July 23, 2007 10:29 AM
> To: roottalk_at_pcroot.cern.ch
> Subject: [ROOT] a huge time
>
> Hello,
> I want to write arrays in a new tree...
> Basically for each entry of the old and the new tree I have an array of
> 6016 entries
> ....
> Float_t OldVar[6016];
>
> .....
> Float_t NewVar[6016];
> TTree* NewTree = new ("NewTree","NexTree");
> NewTree->Branch("NewVar",NewVar, "NewVar[6016]/F")
> for(Int_t i = 0; i< OldTree->GetEntries(); i++){
> OldTree->GetEntry(i);
> for( Int_t p = 0; p<6016; p++){
> NewVar[p]= OldVar[p];
> NewTree->Fill();//
> }
> }
>
> This method seems to work, but I think I am obvisouly doing something
> wrong because it's taking a really huge time....
> AnyIdeas?
>
> Thanks,
> Yasmine
>
>
>
Received on Mon Jul 23 2007 - 18:18:51 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 23 2007 - 23:50:02 CEST