RE: Scan a TTree and put the output on a file

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Tue, 20 Mar 2007 10:32:37 -0500


Hi Pietro,

See http://root.cern.ch/root/html/TTreePlayer.html#TTreePlayer:Scan Form the ROOT command line:

   tree->SetScanField(0);
   tree->Scan(...); >tree.log
Or

((TTreePlayer*)(T->GetPlayer()))->SetScanRedirect(true);
((TTreePlayer*)(T->GetPlayer()))->SetScanFileName("toto.txt");
   tree->Scan(...);
however the later __always__ replace the file while the former can be used to append to the file (tree->Scan(...); >>tree.log)

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-roottalk_at_pcroot.cern.ch] On Behalf Of Pietro Govoni
Sent: Tuesday, March 20, 2007 9:13 AM
To: roottalk_at_cern.ch
Subject: [ROOT] Scan a TTree and put the output on a file

Dear ROOTers,

is there a way to apply the TTree::Scan method and sending its output to a text file?

Thank you very much, kind regards

pietro Received on Tue Mar 20 2007 - 16:32:53 CET

This archive was generated by hypermail 2.2.0 : Wed Mar 21 2007 - 11:50:01 CET