RE: [ROOT] TTree::Draw selection with Char_t

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Dec 04 2001 - 23:15:49 MET


Hi Ingo,

We upgraded TTree::Draw to more properly handled string and array of chars.
Now, given the context, the array is treated appropriately as a string or
as an array of number.

In particular, you test case should now work as you were expecting even with
a Char_t.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Ingo Strauch
Sent: Friday, November 23, 2001 11:18 AM
To: Roottalk
Subject: [ROOT] TTree::Draw selection with Char_t


Hi ROOTers!

I have the following problem with ROOT version 3.00/06 on linux:

I have a TTree with a branch "Ivtyp" that contains a Char_t to store
small numbers (0 to 2).

If I do

  mytree->Draw("Ivtyp")

for a given file I get a histogram that contains about 50% zeros and 50%
rest.

I now want to select e.g. only entries where the variable equals one. So
I do

  mytree->Draw("Ivtyp","Ivtyp==1")

but this gives the same result as the above command.

To me it seems that Char_t variables cannot be used to select if they
are treated as numbers. Is there a workaround? Can it be fixed? Or is
the only way to use Short_t instead?

Many thanks,
Ingo

-- 
"What're quantum mechanics?"
"I don't know. People who repair quantums I suppose."
                                     --Rincewind, Terry Pratchett "Eric"



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:11 MET