title: Reading a TTree branch using PyROOT
body: <p>I like to read the content of a branch in TTree using PyROOT. I look for a possible solution to my problem here: <a href="https://stackoverflow.com/questions/38819098/reading-a-ttree-in-root-using-pyroot">Reading a TTree in root using PyRoot</a>. However, the answer doesn't help me, because probabaly PyROOT doesn't know the structure of a branch. Please see the bottom output snippet, and suggest a solution. </p>
  
  <p>Thanks,
  Sadia</p>
  
  <pre><code>&gt;&gt;&gt; import ROOT
  &gt;&gt;&gt; f = ROOT.TFile("../Ntuple/v0406_default_1012p2_101X_dataRun2_Express_v7_Fill6573_Ntuple.root")
  &gt;&gt;&gt; f.ls()
      TFile**        ../Ntuples/v0406_default_1012p2_101X_dataRun2_Express_v7_Fill6573_Ntuple.root
      TFile*        ../Ntuples/v0406_default_1012p2_101X_dataRun2_Express_v7_Fill6573_Ntuple.root
      KEY: TTree    trajTree;1    Trajectory measurements in the Pixel detector.
      KEY: TTree    eventTree;1    The event.
      KEY: TTree    clustTree;1    Pixel clusters.
      KEY: TTree    trajROCEfficiencyTree;1    ROC and module efficiencies.
      &gt;&gt;&gt; t = f.Get("trajTree")
      &gt;&gt;&gt; t.Print()
      ******************************************************************************
      *Tree    :trajTree  : Trajectory measurements in the Pixel detector.         *
      *Entries : 42180482 : Total =     31858466801 bytes  File  Size = 8076610485 *
      *        :          : Tree compression factor =   3.94                              *
      ******************************************************************************
      *............................................................................*
      *Br    5 :clust_pix : pix[size][2]/F                                         *
      *Entries : 42180482 : Total  Size= 1597865089 bytes  File Size  =  569202378 *
      *Baskets :    12058 : Basket Size=    2175488 bytes  Compression=   2.81     *
      *............................................................................*
      *Br    7 :traj      : validhit/I:missing:lx/F:ly:lz:glx:gly:glz:clust_near/I:*
      *         | hit_near:pass_effcuts:alpha/F:beta:norm_charge:d_tr:dx_tr:dy_tr: *
      *         | d_cl:dx_cl:dy_cl:dx_hit:dy_hit:onedge/I:lx_err/F:ly_err/F        *
      *Entries :42180482 : Total  Size= 4220749516 bytes  File Size  = 2508894561 *
      *Baskets :    28411 : Basket Size=    2275840 bytes  Compression=   1.68     *
      *............................................................................*
  
  &gt;&gt;&gt; t.clust_pix
  &lt;read-write buffer ptr 0x7fba04428200, size 514 at 0x115e5ecf0&gt;
  
  &gt;&gt;&gt; t.traj
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'TTree' object has no attribute 'traj'
  
  &gt;&gt;&gt; t.traj.beta
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  AttributeError: 'TTree' object has no attribute 'traj'
  </code></pre>