[ROOT] TTree.Draw(), strings-problem

From: Bernd Reinhold (bernd.reinhold@cern.ch)
Date: Thu Jun 10 2004 - 14:47:15 MEST


Hi!

Root gives me the *ERROR 30 : Bad numerical expression: "031251_"
and the corresponding line in the code is: myTree.Draw("pullforce>>h_type031251_fm7(30,0,0)", "type==031251_ && fm==7") 
type is a Branch of type char*. The second error-message is:
Error in <TTreeFormula::Compile>: Both operands of the operator == have to be either numbers or strings
I tried to put the string in tickmarks, but received a similar error-message: "type=='0210708' && fm==7" but then it complained:
ERROR 30 : Bad numerical expression: "'0210708'"
Error in <TTreeFormula::Compile>: Both operands of the operator == have to be either numbers or strings

Is there a way to enclose the c-string (with something else than tickmarks), such that '_' is recognized as part of the string?
(I'm using 3.10/02 of 1 april 2004 on a CERN-RedHat)

Thank you, 
Bernd.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET