[ROOT] possible bug in TTree::Draw: can't draw array elements

From: Matthew D. Langston (langston@SLAC.stanford.edu)
Date: Thu Jun 01 2000 - 01:24:31 MEST


There seems to be a bug in the "Draw" mechanism of the TTree and TChain
classes when drawing elements of a multidimensional array.

The problem is that the "Draw" member function of both TTree and TChain
produce histograms filled with zeroes when one tries to Draw the
elements of an array.

For example, consider a tree with a branch of type "Float_t E[2][4]".
The command

  root [0] tree->Draw("E[0][0]")

produces a histogram filled with zeroes for all entries.  However, after
I then do this:

  root [1] tree->Draw("E")

(i.e. just "histogram the entire array"), then I can index the first
dimension of the array, but still not the second, i.e.  TTree::Draw()
can discriminate between different indices for the first dimension, but
seems to ignore the second index of an array.  For example, both
tree->Draw("E[0][0]") and tree->Draw("E[0][1]"), produce the same
histogram.

The situation is even worse for a TChain, as there doesn't seem to be
any way to index even the fist dimension of the array.

--
Matthew D. Langston
SLD, Stanford Linear Accelerator Center
langston@SLAC.Stanford.EDU
650.926.3279



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:27 MET