Multiple TCut and TEntryList

Hi,

I try to create a TEntryList for my tree using a very long TCut.
Error in TTreeFormula::Compile: Too many operators

I followed this thread : Error in <TTreeFormula::Compile>: Too many operators
So I used "TFormula::SetMaxima(10000, 10000, 10000);"
But nevertheless I can’t make it work… Then I get the following error:

[code] *** Break *** segmentation violation

===========================================================
There was a crash.
This is the entire stack trace of all threads:

Thread 9 (Thread 0x7f0fd1d05700 (LWP 6706)):
#0 0x00007f0fd4c2c7fd in waitpid () from /lib64/libc.so.6
#1 0x00007f0fd4bbe5c9 in do_system () from /lib64/libc.so.6
#2 0x00007f0fd4bbe900 in system () from /lib64/libc.so.6
#3 0x00007f0fd98e2c5a in TUnixSystem::StackTrace() () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libCore.so
#4 0x00007f0fd98e4c2c in TUnixSystem::DispatchSignals(ESignals) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libCore.so
#5
#6 0x00007f0fd066d81a in TTreeFormula::IsLeafString(int) const () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#7 0x00007f0fd067b91f in TTreeFormula::ParseWithLeaf(TLeaf*, char const*, bool, unsigned int, TObjArray&, bool, char const*) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#8 0x00007f0fd0683f19 in TTreeFormula::DefinedVariable(TString&, int&) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#9 0x00007f0fd81899c6 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#10 0x00007f0fd8188699 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#11 0x00007f0fd8187e47 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#12 0x00007f0fd8187eea in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#13 0x00007f0fd818808a in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#14 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#15 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#16 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#17 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#18 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#19 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#20 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#21 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#22 0x00007f0fd8187fe7 in TFormula::Analyze(char const*, int&, int) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#23 0x00007f0fd8192695 in TFormula::Compile(char const*) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libHist.so
#24 0x00007f0fd0678834 in TTreeFormula::Init(char const*, char const*) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#25 0x00007f0fd0678ded in TTreeFormula::TTreeFormula(char const*, char const*, TTree*) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#26 0x00007f0fd064f203 in TSelectorDraw::CompileVariables(char const*, char const*) () from /afs/cern.ch/sw/lcg/app/releases/ROOT/5.34.36/x86_64-slc6-gcc49-opt/root/lib/libTreePlayer.so
#27 0x00007f0fd064b453[/code]

I think I reach most probably a hardcoded limit. because when I am dealing with only 50 OR it’s perfectly fine…
Here I have roughly 200 OR operators.

Do you have any solution in order to generate entrylist with a lot of operator ?
Like looping manualy over events of the tree and work with smaller TCut ? If I could access event by event, I could create smaller TCut removing the conditions spill==1,…N

I found the TProofDrawEntryList class. I am using Proof most of the time.
Do you have maybe an example ? I was not able to make it run

Hi,

I recommend you look at (and use) the result of using TTree::MakeSelector where you will be able to manually create the TEntryList in the ‘Process’ method.

Cheers,
Philippe.