GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Reading a tree HELP!
Re: Reading a tree HELP! [message #17785 is a reply to message #17783] Thu, 22 January 2015 15:54 Go to previous messageGo to previous message
Ralf Kliemt is currently offline  Ralf Kliemt
Messages: 507
Registered: May 2007
Location: GSI, Darmstadt
first-grade participant

From: 106.2.197*
Hi Mamen,

TTree has the opportunity to directly plot distributions from either the root shell or the TreeViewer.

Here an example:

TFile* file0=new TFile("myfile.root","READ"); 
TTree* tree = (TTree*)file0->Get("myBranchName");
int nEntries;
nEntries = tree->Draw("myVariable","myCutVariable>3.5");


You can print several expressions and opt for combined (use &&) cuts. See
https://root.cern.ch/root/htmldoc/TTree.html#TTree:Draw@2
for more details.

Cheers
Ralf
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Howto for eventdisplay
Next Topic: simulation output; sge scripts in macro/prod
Goto Forum:
  


Current Time: Thu Apr 18 11:20:11 CEST 2024

Total time taken to generate the page: 0.00970 seconds