Hi Gene, I meant strstr and not strcmp. However, looking into the code, I see that I deactivated the logic in TTreeFormula where this logic is applied to TTree leaves. I have activated the logic again in my development version 2.24/06 and also modified the test program Event to give an example. With this version, you can do: T.Draw("event.GetNtrack()","strstr(fType,\"type3\")!=0"); or T.Draw("event.GetNtrack()","fType==\"type3\""); Rene Brun Gene Van Buren wrote: > > Hi - I realize my response to this is a bit late, but I decided I'd > try this too. > > Rene Brun wrote: > > Hi Steve, > > In the current implementation of TClonesArray, all objects must be of > > identical length. You can have something like > > char[20]; as data member of a class in a TClonesArray > > and then use the function strcmp in TTree::Draw expressions. > > This is incorrect. TFormula is used to compile the expression in > TTree::Draw() (both the drawn expressions and the selection > expressions), and TFormula does NOT recognize strcmp. > While I wish it would, I'm sure there are many other functions > people out there would like TFormula to interpret. Valery Fine > pointed out to me that by the time you're done, you'll have > written a full interpreter like CINT. Valery had the suggestion > that perhaps (somehow), one could pass interpretting to CINT. > Any ideas? > > -Gene Van Buren
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:26 MET