Error in <TTreeFormula::Compile>: Too many operators

What is

Error in TTreeFormula::Compile: Too many operators !

how to solve it?

[quote=“wiso”]What is

Error in TTreeFormula::Compile: Too many operators !

how to solve it?[/quote]

What are you doing when you get the answer. (In other words, post as short as possible but complete example of how you are getting this error).

Cheers,
Charles

[quote=“cplager”][quote=“wiso”]What is

Error in TTreeFormula::Compile: Too many operators !

how to solve it?[/quote]

What are you doing when you get the answer. (In other words, post as short as possible but complete example of how you are getting this error).

Cheers,
Charles[/quote]

I’m creating TEntryList from TCut

TTree::Draw(">>myentrylist",TCut,“entrylist”)

where TCut is a very long concatenation of conditions with &&.

[quote]where TCut is a very long concatenation of conditions with &&.

Error in TTreeFormula::Compile: Too many operators ! [/quote]You reach a hard coded limit (necessary for performance reasons) in TTreeFormula. You will need to use a TSelector, either created by MakeProxy or MakeSelector in order to process your use case.

Cheers,
Philippe.

It’s not hard coded.
you can change the limits with TFormular::SetMaxima since root 5.18.00
root.cern.ch/root/html522/TFormu … :SetMaxima

Dear ROOT developers,

I am experiencing this error now with ROOT 6.06/01.

And it seems that the SetMaxima function is not available anymore in the new implementation of TFormula.
I am experiencing this while doing a “Draw” of a TTree.

Do you have any suggestion?

Best regards,
Andrea

Hi Andrea,

In v6, you can use ROOT::v5::TFormula::SetMaxima instead to steer TTreeFormula.

Cheers,
Philippe.

Hi, I’m seeing errors though in ROOT6.06 as well:

(Pdb) ROOT.v5.TFormula.SetMaxima(300)
(Pdb) form = ROOT.TTreeFormula("test", run_filter, in_t)
Error in <TTreeFormula::Compile>:  Too many operators !

where I’m trying to extract a subset of a tree, but the CopyTree call is complaining about this, so it was suggested to use a TTreeFormula instead, but this also complains and then crashes.

How many operands is there in your filter?