Re: pyROOT : TTree help

From: <WLavrijsen_at_lbl.gov>
Date: Tue, 30 Jun 2009 11:36:37 -0700


Anil,

> //===================================================
> int event;
> float char_array[n];
> Zee=new TTree("Zee","Zee");
> Zee->Branch("event", &event, "event/I");
> Zee->Branch("char_array", char_array, "char_array[n]/F");
> //================================================

even for a single int, one would have to use a python array (of size 1) if the int is not part of a struct (on which AddressOf can be applied). See an example "Writing a tree" here:

  http://cern.ch/wlav/pyroot/tpytree.html

HTH,
  Wim

-- 
WLavrijsen_at_lbl.gov    --    +1 (510) 486 6411    --    www.lavrijsen.net
Received on Tue Jun 30 2009 - 20:34:10 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 30 2009 - 23:50:02 CEST