Dear ROOT,
I would like to draw the the result of a function I write in a macro, and takes as arguments objects that are in a tree.
Attached is a small macro that demonstrates my problem. In this example, I would like to draw the result of testor(ev), where ev is the class that is saved in the tree. Here’s what happens:
$ root -l
root [0] .L test.C+
Info in <TUnixSystem::ACLiC>: creating shared library /home/giraudpf/tmp/./test_C.so
root [1] TTree* tree = create_tree();
root [2] tree->Draw("ev->value()") // Works OK
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [3] tree->Draw("testor(ev)") // Fails
Error in <TTreeFormula::Compile>: Bad numerical expression : "testor(ev)"
Do you know how to solve this problem?
Thanks,
Pierre-François
test.C (634 Bytes)