Hi, You should use: myTree.Draw("pullforce>>h_type031251_fm7(30,0,0)", "type==\"031251_\" && fm==7") Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Bernd Reinhold Sent: Thursday, June 10, 2004 7:47 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] TTree.Draw(), strings-problem 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