Re: TTree::Draw() with expression and dynamic array problem

Rene Brun (Rene.Brun@cern.ch)
Thu, 20 Aug 1998 14:52:15 +0200


Hi Stefan,
I cannot reproduce your problem.
Could you send me your file framework.root as an attachment.
I will investigate.

Rene Brun

stefan kluth wrote:
>
> Hi,
>
> I have a tree with dynamic arrays of floats as branches and a basic float
> branch. I would like to plot a simple expression involving a dynamic
> array, but it doesn't work. Here is an example root session:
>
> *******************************************
> * *
> * W E L C O M E to R O O T *
> * *
> * Version 2.00/10 30 July 1998 *
> * *
> * You are welcome to visit our Web site *
> * http://root.cern.ch *
> * *
> *******************************************
>
> CINT/ROOT C/C++ Interpreter version 5.13.66, July 24 1998
> Type ? for help. Commands must be C++ statements.
> Enclose multiple statements between { }.
> root [0] TFile f1("framework.root");
> root [1] ntp1->Print();
> ******************************************************************************
> *Tree :ntp1 : yflips
> *
> *Entries : 100 : Total Size = 44566 bytes File Size =
> 44566 *
> * : : Tree compression factor = 1.00
> *
> ******************************************************************************
> *Branch :ievent : ievent/I
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :sume : sume/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :njets : njets/I
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :JE0yf : JE0yf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :Pyf : Pyf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :P0yf : P0yf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :Eyf : Eyf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :Dyf : Dyf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :Gyf : Gyf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :Lyf : Lyf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> *Branch :E0yf : E0yf[njets]/F
> *
> *Entries : 100 : Total Size = 0 bytes File Size =
> 0 *
> *Baskets : 0 : Basket Size = 8000 bytes Compression= 1.00
> *
> *............................................................................*
> root [2] ntp1->Draw("njets/sume");
> Warning in <MakeDefCanvas>: creating a default canvas with name c1
> root [3] ntp1->Draw("Lyf[1]/sume");
>
> Error: No symbol ntp1->Draw("Lyf[1]/sume") in current scope
> FILE:/tmp/faaaazuca LINE:1
> *** Interpreter error recovered ***
> root [5] ntp1->Draw("njets/sume");
> Error: No symbol ntp1->Draw("njets/sume") in current scope
> FILE:/tmp/gaaaazuca LINE:1
> *** Interpreter error recovered ***
>
> The first command "ntp1->Draw("njets/sume");" works as expected. The
> second command "ntp1->Draw("Lyf[1]/sume");" cocks up the interpreter, such
> that even the first command does not work anymore.
>
> Any ideas? cheers, Stefan
>
> ---Stefan Kluth---------------Lynen Fellow----------------|\--|\-------
> - LBNL, MS 50A 2160 - phone: +1 510 495 2376 - |/ |/ -
> - 1 Cyclotron Rd. - fax: +1 510 495 2957 - |\/\|\/\|' -
> ---Berkeley, CA94720, USA-----e-mail: SKluth@lbl.gov------|/\/|/\/|----