MakeProxy limitations

I have exercised using proxy doing

where myComplexVariable.C has a myComplexVariable() function caculating stuff from the TTree variables. I also had it working where myComplexVariable is using an external class, which need to be declared in myComplexVariable.h, initialised (in myComplexVariable_SlaveBegin()) etc… It works fine. So far so good.

However, the following lines do not work, or maybe I do not use the right syntax, while naïvely it seems to be a natural extension. (in all cases I have a message like Error in TTreeFormula::Compile: Invalid Syntax “+”)
(I’m using Root 5.34.03)

[code]TH1F myhist=TH1F(“myhist”,“my title”,20, 0,10)
tree->Draw(“myComplexVariable.C+>>myhist”) # fill in a predefined histo
tree->Project(“myhist”,“myComplexVariable.C+”) # fill in a predefined histo

tree->Draw(“2*myComplexVariable.C+”) #make a calculation involving myComplexVariable.C

tree->Draw(“some_ttree_variable”,“myComplexVariable.C+>10”) # use in a cut (NB I’m aware that with MakeProxy one can define a myComplexVariableCut.C returning a bool)
tree->Draw(“myComplexVariable.C+”,"some cut ")
Error in TTreePlayer::DrawSelect: Drawing using a C++ file currently requires that both the expression and the selection are files
=>what would be the work around here ? Fill an event list, with “some cut”, then use it ?

tree->Draw(“myComplexVariable.C+:some_ttree_variable”) # 2D plot
tree->Scan(“myComplexVariable.C+:some_ttree_variable”) # scan
The most annoying thing right now, which prevent me to use MakeProxy completely, is that I just see no handy way to fill with myComplexVariable.C a predefined histogram. (I’m aware that one can hard code the booking of htemp in myComplexVariable_SlaveBegin() but this is not convenient at all)
Thanks in advance


Interesting ideas. Unfortunately I do not see any ‘easy’ way to implement those (both on the grammar level and on the implementation level). For now, I fear that you have to deal with having to customized your script to do what you need.