Groff and TTree.Draw() in PyROOT

I am trying to use the TTree.Draw() shortcut to fill a histogram, but the groof option does not seem to work (i.e. c1 gets created and displayed). Also, it takes about 10 seconds to load TH1,TTree,gDirectory, and TDateTime using
from ROOT import TH1,TTree,gDirectory, TDateTime; is that normal?

In [20]: tree.Draw('rodBCID>>hist','groff')
Error in <TTreeFormula::Compile>:  Bad numerical expression : "groff"
Out[20]: -1L

In [21]: tree.Draw('rodBCID>>hist',option='groff')
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1

In [23]: tree.Draw('rodBCID>>hist','','groff')
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Out[23]: 10089L

Hi,

isn’t the option “goff” instead of “groff” or “groof”? I can find plenty of instances in the code of the former, none of the latter two.

Cheers,
Wim

Wow. I am embarrassed.
option= doesnt work, but why would it!
Thank a lot.

Hi,

keyword support is on the “TODO” list. :slight_smile:

Cheers,
Wim