Hi Nicolas, Thanks for reporting this problem. In TFormula, as you noticed, the token " had the lowest priority instead of the highest. I have fixed this problem and the fix will appear shortly in the CVS repository. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Nicolas Produit Sent: Thursday, June 05, 2003 9:26 AM To: roottalk@pcroot.cern.ch Subject: [ROOT] char * in TTree Hi, I have a TTree with some char * member. I want to filter on the value of this char* according documentation page 263 case 25 and 26 I can use == and strstr and I have to escape the " as \" This work well most of the case. But I have sometimes character '+' '-' and ' ' inside the variable. The parser does not seem to like that. ( * Version 3.05/05 21 May 2003 * on solaris) Example root [7] t->Scan("name","strstr(name,\"4U2358\")") ************************ * Row * name * ************************ * 0 * 4U2358+21 * ************************ ==> 1 selected entry (Int_t)1 root [8] t->Scan("name","strstr(name,\"4U2358+\")") *ERROR 26 : Unknown name : ""4U2358" (Int_t)(-1) root [9] t->Scan("name","strstr(name,\"4U2358\+\")") *ERROR 26 : Unknown name : ""4U2358" (Int_t)(-1) root [10] t->Scan("name","strstr(name,\"XMMU\")") ************************ * Row * name * ************************ * 25 * XMMU J004 * * 26 * XMMU J004 * * 28 * XMMU J004 * * 29 * XMMU J004 * * 30 * XMMU J004 * ************************ ==> 5 selected entries (Int_t)5 root [11] t->Scan("name","strstr(name,\"XMMU J\")") ************************ * Row * name * ************************ ************************ ==> 0 selected entries (Int_t)0 Any way to achieve that? -- Nicolas Produit INTEGRAL Science Data Center Phone: +41 22 950 91 40 16, Chemin d'Ecogia Fax: +41 22 950 91 33 CH-1290 Versoix www: http://isdc.unige.ch/
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET