TChain::GetEntries strange error

Hello,

I’m writing a python module to create cut flow tables. It takes a list of TTrees or TChains, and a list of cuts, and uses GetEntries to calculate the cut flow. The problem is, occasionally it crashes with the following error:

Traceback (most recent call last):
  File "./do_CutFlow_Ztautau_EWBkg.py", line 25, in <module>
    CF = MetaROOT.CutFlow(Data.TreeList, Data.TreeTitlesLatex, CutList, Data.Scales)
  File "../python/MetaROOT.py", line 797, in __init__
    self.CalculateFlow()
  File "../python/MetaROOT.py", line 811, in CalculateFlow
    passed.append(t.GetEntries(cumCuts))
TypeError: none of the 2 overloaded methods succeeded. Full details:
  Long64_t TChain::GetEntries() =>
    takes at most 0 arguments (1 given)
  problem in C++; program state has been reset

This makes no sense to me because clearly GetEntries can take one argument that is the cut string.

Here is the code for my cut flow maker:

class Cut(object):
    def __init__(self, cut, latex, title=''):
        self.cut = cut
        self.latex = latex
        self.title = title
class CutFlow(object):
    def __init__(self, trees, treeTitles, cuts, scales=[]):
        self.Trees = trees
        self.TreeTitles = treeTitles
        self.Cuts = cuts
        self.Flow = []
        self.CalculateFlow()
        if len(scales) != 0:
            self.ScaleFlow(scales)
    def CalculateFlow(self):
        print 'MetaROOT.CutFlow: Calculating cut flow.'
        cumCuts = ''
        for c in self.Cuts:
            print 'MetaROOT.CutFlow: '+c.cut+' cut.'
            passed = []
            if cumCuts == '':
                cumCuts += '(' + c.cut + ')'
            else:
                cumCuts += '&&(' + c.cut + ')'
            for t in self.Trees:
                passed.append(t.GetEntries(cumCuts))
            self.Flow.append(passed)
    def WriteLatex(self, texFileName, minSigDigits=0, maxSigDigits=99):
        print 'MetaROOT.CutFlow: Writing LaTeX to '+texFileName+'.'
        f = file(texFileName, 'w')
        f.write('\\documentclass[12pt]{article}\n'
              + '\\begin{document}\n'
              + '\n'
              + '\\begin{table}\n'
              + '%    \\label{tab:put_label_here}\n'
              + '    \\begin{center}\n')
        f.write('        \\begin{tabular}{ l | ')
        for i in xrange(len(self.Trees)):
            f.write('r ')
        f.write('}\n')
        f.write('            \\hline\\hline\n')
        # titles
        f.write('            & ')
        f.write(self.TreeTitles[0])
        for tt in self.TreeTitles[1:]:
            f.write(' & ' + tt)
        f.write(' \\\\\n')
        f.write('            \\hline\n')
        # cut flow
        i = 0
        for r in self.Flow:
            f.write('            ' + self.Cuts[i].latex)
            for c in r:
                if c==0:
                    f.write(' & ' + '0')
                else:
                    digitsLeftOfDecimal = int(math.floor(math.log(c,10))+1)
                    digitsRightOfDecimal = int(minSigDigits - digitsLeftOfDecimal)
                    if digitsLeftOfDecimal >= minSigDigits:
                        if digitsLeftOfDecimal > maxSigDigits:
                            f.write(' & ' + SigDigs(c, maxSigDigits, True))
                        else:
                            f.write(' & ' + str(int(c)))
                    else:
                        f.write(' & ' + str(round(c, digitsRightOfDecimal)))
            f.write('\\\\\n')
            i += 1
        f.write('            \\hline\\hline\n')
        f.write('        \\end{tabular}\n'
              + '    \\end{center}\n'
              + '%    \\caption{Put a caption here.}\n'
              + '\\end{table}\n'
              + '\n'
              + '\\end{document}\n')
    def ScaleFlow(self, scales):
        for r in self.Flow:
            for i in xrange(len(r)):
                r[i] = r[i] * scales[i]

Thanks for any help. And thank you to the developer(s) of PyROOT. I love it.

I think a couple of additional pieces of information would be useful to diagnose the problem.

For one, is this the complete traceback? Does anything else go wrong just before hand, such as a segmentation violation?

Which version of ROOT are you using?

It would be useful to see how you make the self.Trees list, as this is possibly where the problem originates.

I see nothing wrong with what you are doing, exactly, (It works for me) which suggests to me that there is a problem with your tree or chain (or your version of ROOT).

Regards,

  • Peter

Hi,

There are two overloads: one taking no arguments (which fails b/c there is an argument and yields the first error message) and another taking a const char* (which yielded the second error message about a problem in C++, a segfault in this case).

Sometimes it happes that there is no stack trace, but there simply is no guarantee to have one, so the best thing to do now, is to run the script under gdb, like:

$ gdb python (gdb) run myscript.py
and using ‘where’ after the segfault to get more details. Somewhere in TTreePlayer::Process() there’s likely an issue with the trees loaded by the chain. Perhaps a missing dictionary for an object in the tree.

Thanks for the compliments.

Cheers,
Wim

You can find this python script at:
atlas-sw.cern.ch/cgi-bin/viewcvs … threv=MAIN
and the MetaROOT module it uses that contains my code for making the cut flow near the bottom at:
atlas-sw.cern.ch/cgi-bin/viewcvs … threv=MAIN

The complete output of the segfault is:

>> ./do_CutFlow_Ztautau_EWBkg.py
Using rootlogon.py
MetaROOT.CutFlow: Calculating cut flow.
MetaROOT.CutFlow: (1) cut.
TClass::TClass:0: RuntimeWarning: no dictionary for class AttributeListLayout is available
TClass::TClass:0: RuntimeWarning: no dictionary for class pair<string,string> is available
MetaROOT.CutFlow: (Sum$((Muon_p_T>10000)&&(abs(Muon_eta)<2.0))>0) cut.
MetaROOT.CutFlow: (Sum$((TauJet_p_T>15000)&&(abs(TauJet_eta)<2.0))>0) cut.
MetaROOT.CutFlow: (Sum$((Muon_p_T>10000)&&(abs(Muon_eta)<2.0))==1) cut.
MetaROOT.CutFlow: (Muon_bestMatch)&&(Muon_fitChi2OverDoF<1.7) cut.
MetaROOT.CutFlow: (Muon_etcone40<3000) cut.
MetaROOT.CutFlow: (TauJet_DiscCut==1) cut.
MetaROOT.CutFlow: ((TauJet_ElectronFlag==0)&&(TauJet_MuonFlag==0)) cut.
MetaROOT.CutFlow: (abs(TauJet_charge)==1)&&((TauJet_numTrack==1)||(TauJet_numTrack==3)) cut.
MetaROOT.CutFlow: (Sum$((TauJet_p_T>15000)&&(abs(TauJet_eta)<2.0)&&(TauJet_DiscCut==1)&&(TauJet_ElectronFlag==0)&&(TauJet_MuonFlag==0)&&(abs(TauJet_charge)==1)&&((TauJet_numTrack==1)||(TauJet_numTrack==3)))==1) cut.
MetaROOT.CutFlow: (TauJet_charge*Muon_charge<0) cut.
MetaROOT.CutFlow: (Muon_MET_TransM<20000) cut.
MetaROOT.CutFlow: (Sum$(Jet_p_T>45000)==0) cut.

 *** Break *** segmentation violation
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Attaching to program: /proc/23275/exe, process 23275
[Thread debugging using libthread_db enabled]
[New Thread -1208170816 (LWP 23275)]
0x007ac7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00850f13 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2  0x007fa7b9 in do_system () from /lib/tls/libc.so.6
#3  0x00a3698d in system () from /lib/tls/libpthread.so.0
#4  0x00fbd79f in TUnixSystem::Exec () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#5  0x00fc31ad in TUnixSystem::StackTrace () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#6  0x00fbfe6a in TUnixSystem::DispatchSignals () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#7  0x00fbfef8 in SigHandler () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#8  0x00fbf145 in sighandler () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#9  <signal handler called>
#10 0x02103b9d in TTreeFormula::ResetDimensions () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#11 0x0211108e in TTreeFormulaManager::Sync () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#12 0x020fd1d8 in TTreeFormula::Init () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#13 0x0210b329 in TTreeFormula::TTreeFormula () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#14 0x020fb2bb in TSelectorEntries::SlaveBegin () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#15 0x0211a41a in TTreePlayer::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#16 0x05535cdd in TTree::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#17 0x0550b2bf in TChain::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#18 0x02114cf5 in TTreePlayer::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#19 0x05534494 in TTree::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#20 0x0550c9f2 in TChain::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#21 0x0555bb9e in G__G__Tree_103_0_58 () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#22 0x018bdf14 in Cint::G__CallFunc::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCint.so
#23 0x0074d202 in PyROOT::TLongLongExecutor::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#24 0x00752690 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::CallSafe ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#25 0x00752864 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::Execute ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#26 0x00755cb3 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::operator() ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#27 0x0075a3c7 in PyROOT::(anonymous namespace)::mp_call () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#28 0x0030869c in PyObject_Call (func=0x11, arg=0xb7f5dccc, kw=0x0) at Objects/abstract.c:1860
#29 0x0037c654 in PyEval_EvalFrameEx (f=0x9c229e4, throwflag=0) at Python/ceval.c:3777
#30 0x00382125 in PyEval_EvalFrameEx (f=0x95760f4, throwflag=0) at Python/ceval.c:3652
#31 0x00382865 in PyEval_EvalCodeEx (co=0xb7c130b0, globals=0xb7c0a824, locals=0x0, args=0xb7c19a88, argcount=5, kws=0x0, kwcount=0, defs=0xb7c20a18, defcount=1, 
    closure=0x0) at Python/ceval.c:2833
#32 0x00326a70 in function_call (func=0xb7c1f6f4, arg=0xb7c19a7c, kw=0x0) at Objects/funcobject.c:517
#33 0x0030869c in PyObject_Call (func=0x11, arg=0xb7c19a7c, kw=0x0) at Objects/abstract.c:1860
#34 0x003128ad in instancemethod_call (func=0xb7f7a9dc, arg=0xb7c19a7c, kw=0x0) at Objects/classobject.c:2493
#35 0x0030869c in PyObject_Call (func=0x11, arg=0xb7fa1c0c, kw=0x0) at Objects/abstract.c:1860
#36 0x003524e4 in slot_tp_init (self=0xb7c20bcc, args=0xb7fa1c0c, kwds=0x0) at Objects/typeobject.c:4819
#37 0x0034b57f in type_call (type=Variable "type" is not available.
) at Objects/typeobject.c:436
#38 0x0030869c in PyObject_Call (func=0x11, arg=0xb7fa1c0c, kw=0x0) at Objects/abstract.c:1860
#39 0x0037c654 in PyEval_EvalFrameEx (f=0x95739a4, throwflag=0) at Python/ceval.c:3777
#40 0x00382865 in PyEval_EvalCodeEx (co=0xb7f56800, globals=0xb7fa5a44, locals=0xb7fa5a44, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at Python/ceval.c:2833
#41 0x003829f3 in PyEval_EvalCode (co=0xb7f56800, globals=0xb7fa5a44, locals=0xb7fa5a44) at Python/ceval.c:494
#42 0x003a26a0 in PyRun_FileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", start=257, globals=0xb7fa5a44, locals=0xb7fa5a44, closeit=1, 
    flags=0xbfec4abc) at Python/pythonrun.c:1264
#43 0x003a320e in PyRun_SimpleFileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbfec4abc) at Python/pythonrun.c:870
#44 0x003a3ca1 in PyRun_AnyFileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbfec4abc) at Python/pythonrun.c:689
#45 0x003aec24 in Py_Main (argc=2, argv=0xbfec4bf4) at Modules/main.c:496
#46 0x080485aa in main (argc=3, argv=0xbfec4bf4) at ./Modules/python.c:23

 *** Break *** segmentation violation
Using host libthread_db library "/lib/tls/libthread_db.so.1".
Attaching to program: /proc/23275/exe, process 23275
[Thread debugging using libthread_db enabled]
[New Thread -1208170816 (LWP 23275)]
0x007ac7a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00850f13 in __waitpid_nocancel () from /lib/tls/libc.so.6
#2  0x007fa7b9 in do_system () from /lib/tls/libc.so.6
#3  0x00a3698d in system () from /lib/tls/libpthread.so.0
#4  0x00fbd79f in TUnixSystem::Exec () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#5  0x00fc31ad in TUnixSystem::StackTrace () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#6  0x00fbfe6a in TUnixSystem::DispatchSignals () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#7  0x00fbfef8 in SigHandler () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#8  0x00fbf145 in sighandler () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCore.so
#9  <signal handler called>
#10 0x02103b9d in TTreeFormula::ResetDimensions () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#11 0x0211108e in TTreeFormulaManager::Sync () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#12 0x020fd1d8 in TTreeFormula::Init () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#13 0x0210b329 in TTreeFormula::TTreeFormula () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#14 0x020fb2bb in TSelectorEntries::SlaveBegin () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#15 0x0211a41a in TTreePlayer::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#16 0x05535cdd in TTree::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#17 0x0550b2bf in TChain::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#18 0x02114cf5 in TTreePlayer::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#19 0x05534494 in TTree::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#20 0x0550c9f2 in TChain::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#21 0x0555bb9e in G__G__Tree_103_0_58 () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#22 0x018bdf14 in Cint::G__CallFunc::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCint.so
#23 0x0074d202 in PyROOT::TLongLongExecutor::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#24 0x00752690 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::CallSafe ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#25 0x00752864 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::Execute ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#26 0x00755cb3 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::operator() ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#27 0x0075a303 in PyROOT::(anonymous namespace)::mp_call () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#28 0x0030869c in PyObject_Call (func=0x11, arg=0xb7f5dccc, kw=0x0) at Objects/abstract.c:1860
#29 0x0037c654 in PyEval_EvalFrameEx (f=0x9c229e4, throwflag=0) at Python/ceval.c:3777
#30 0x00382125 in PyEval_EvalFrameEx (f=0x95760f4, throwflag=0) at Python/ceval.c:3652
#31 0x00382865 in PyEval_EvalCodeEx (co=0xb7c130b0, globals=0xb7c0a824, locals=0x0, args=0xb7c19a88, argcount=5, kws=0x0, kwcount=0, defs=0xb7c20a18, defcount=1, 
    closure=0x0) at Python/ceval.c:2833
#32 0x00326a70 in function_call (func=0xb7c1f6f4, arg=0xb7c19a7c, kw=0x0) at Objects/funcobject.c:517
#33 0x0030869c in PyObject_Call (func=0x11, arg=0xb7c19a7c, kw=0x0) at Objects/abstract.c:1860
#34 0x003128ad in instancemethod_call (func=0xb7f7a9dc, arg=0xb7c19a7c, kw=0x0) at Objects/classobject.c:2493
#35 0x0030869c in PyObject_Call (func=0x11, arg=0xb7fa1c0c, kw=0x0) at Objects/abstract.c:1860
#36 0x003524e4 in slot_tp_init (self=0xb7c20bcc, args=0xb7fa1c0c, kwds=0x0) at Objects/typeobject.c:4819
#37 0x0034b57f in type_call (type=Variable "type" is not available.
) at Objects/typeobject.c:436
#38 0x0030869c in PyObject_Call (func=0x11, arg=0xb7fa1c0c, kw=0x0) at Objects/abstract.c:1860
#39 0x0037c654 in PyEval_EvalFrameEx (f=0x95739a4, throwflag=0) at Python/ceval.c:3777
#40 0x00382865 in PyEval_EvalCodeEx (co=0xb7f56800, globals=0xb7fa5a44, locals=0xb7fa5a44, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at Python/ceval.c:2833
#41 0x003829f3 in PyEval_EvalCode (co=0xb7f56800, globals=0xb7fa5a44, locals=0xb7fa5a44) at Python/ceval.c:494
#42 0x003a26a0 in PyRun_FileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", start=257, globals=0xb7fa5a44, locals=0xb7fa5a44, closeit=1, 
    flags=0xbfec4abc) at Python/pythonrun.c:1264
#43 0x003a320e in PyRun_SimpleFileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbfec4abc) at Python/pythonrun.c:870
#44 0x003a3ca1 in PyRun_AnyFileExFlags (fp=0x9564008, filename=0xbff6216e "./do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbfec4abc) at Python/pythonrun.c:689
#45 0x003aec24 in Py_Main (argc=2, argv=0xbfec4bf4) at Modules/main.c:496
#46 0x080485aa in main (argc=3, argv=0xbfec4bf4) at ./Modules/python.c:23
Traceback (most recent call last):
  File "./do_CutFlow_Ztautau_EWBkg.py", line 25, in <module>
    CF = MetaROOT.CutFlow(Data.TreeList, Data.TreeTitlesLatex, CutList, Data.Scales)
  File "../python/MetaROOT.py", line 797, in __init__
    self.CalculateFlow()
  File "../python/MetaROOT.py", line 811, in CalculateFlow
    passed.append(t.GetEntries(cumCuts))
TypeError: none of the 2 overloaded methods succeeded. Full details:
  Long64_t TChain::GetEntries() =>
    takes at most 0 arguments (1 given)
  problem in C++; program state has been reset

Hope this is informative. Thanks for the help.

>> gdb python
GNU gdb Red Hat Linux (6.3.0.0-1.159.el4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run do_CutFlow_Ztautau_EWBkg.py
Starting program: /afs/cern.ch/sw/lcg/external/Python/2.5/slc4_ia32_gcc34/bin/python do_CutFlow_Ztautau_EWBkg.py
[Thread debugging using libthread_db enabled]
[New Thread -1208748352 (LWP 23370)]
Detaching after fork from child process 23374.
[New Thread -1212978272 (LWP 23379)]
Using rootlogon.py
MetaROOT.CutFlow: Calculating cut flow.
MetaROOT.CutFlow: (1) cut.
TClass::TClass:0: RuntimeWarning: no dictionary for class AttributeListLayout is available
TClass::TClass:0: RuntimeWarning: no dictionary for class pair<string,string> is available
MetaROOT.CutFlow: (Sum$((Muon_p_T>10000)&&(abs(Muon_eta)<2.0))>0) cut.
MetaROOT.CutFlow: (Sum$((TauJet_p_T>15000)&&(abs(TauJet_eta)<2.0))>0) cut.
MetaROOT.CutFlow: (Sum$((Muon_p_T>10000)&&(abs(Muon_eta)<2.0))==1) cut.
MetaROOT.CutFlow: (Muon_bestMatch)&&(Muon_fitChi2OverDoF<1.7) cut.
MetaROOT.CutFlow: (Muon_etcone40<3000) cut.
MetaROOT.CutFlow: (TauJet_DiscCut==1) cut.
MetaROOT.CutFlow: ((TauJet_ElectronFlag==0)&&(TauJet_MuonFlag==0)) cut.
MetaROOT.CutFlow: (abs(TauJet_charge)==1)&&((TauJet_numTrack==1)||(TauJet_numTrack==3)) cut.
MetaROOT.CutFlow: (Sum$((TauJet_p_T>15000)&&(abs(TauJet_eta)<2.0)&&(TauJet_DiscCut==1)&&(TauJet_ElectronFlag==0)&&(TauJet_MuonFlag==0)&&(abs(TauJet_charge)==1)&&((TauJet_numTrack==1)||(TauJet_numTrack==3)))==1) cut.
MetaROOT.CutFlow: (TauJet_charge*Muon_charge<0) cut.
MetaROOT.CutFlow: (Muon_MET_TransM<20000) cut.
MetaROOT.CutFlow: (Sum$(Jet_p_T>45000)==0) cut.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208748352 (LWP 23370)]
0x03495b9d in TTreeFormula::ResetDimensions () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
(gdb) where
#0  0x03495b9d in TTreeFormula::ResetDimensions () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#1  0x034a308e in TTreeFormulaManager::Sync () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#2  0x0348f1d8 in TTreeFormula::Init () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#3  0x0349d329 in TTreeFormula::TTreeFormula () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#4  0x0348d2bb in TSelectorEntries::SlaveBegin () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#5  0x034ac41a in TTreePlayer::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#6  0x06a98cdd in TTree::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#7  0x06a6e2bf in TChain::Process () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#8  0x034a6cf5 in TTreePlayer::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTreePlayer.so
#9  0x06a97494 in TTree::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#10 0x06a6f9f2 in TChain::GetEntries () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#11 0x06abeb9e in G__G__Tree_103_0_58 () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libTree.so
#12 0x046d2f14 in Cint::G__CallFunc::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libCint.so
#13 0x009b7202 in PyROOT::TLongLongExecutor::Execute () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#14 0x009bc690 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::CallSafe ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#15 0x009bc864 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::Execute ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#16 0x009bfcb3 in PyROOT::TMethodHolder<PyROOT::TScopeAdapter, PyROOT::TMemberAdapter>::operator() ()
   from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#17 0x009c43c7 in PyROOT::(anonymous namespace)::mp_call () from /afs/cern.ch/sw/lcg/external/root/5.18.00a/slc4_ia32_gcc34/root/lib/libPyROOT.so
#18 0x0039f69c in PyObject_Call (func=0x11, arg=0xb7ed0d4c, kw=0x0) at Objects/abstract.c:1860
#19 0x00413654 in PyEval_EvalFrameEx (f=0xa6db1d4, throwflag=0) at Python/ceval.c:3777
#20 0x00419125 in PyEval_EvalFrameEx (f=0xa6a7fa4, throwflag=0) at Python/ceval.c:3652
#21 0x00419865 in PyEval_EvalCodeEx (co=0xb7b870b0, globals=0xb7b7d824, locals=0x0, args=0xb7b9e998, argcount=5, kws=0x0, kwcount=0, defs=0xb7ba1cd8, defcount=1, 
    closure=0x0) at Python/ceval.c:2833
#22 0x003bda70 in function_call (func=0xb7ba280c, arg=0xb7b9e98c, kw=0x0) at Objects/funcobject.c:517
#23 0x0039f69c in PyObject_Call (func=0x11, arg=0xb7b9e98c, kw=0x0) at Objects/abstract.c:1860
#24 0x003a98ad in instancemethod_call (func=0xb7b9b1bc, arg=0xb7b9e98c, kw=0x0) at Objects/classobject.c:2493
#25 0x0039f69c in PyObject_Call (func=0x11, arg=0xb7f14c0c, kw=0x0) at Objects/abstract.c:1860
#26 0x003e94e4 in slot_tp_init (self=0xb7ba1f0c, args=0xb7f14c0c, kwds=0x0) at Objects/typeobject.c:4819
#27 0x003e257f in type_call (type=Variable "type" is not available.
) at Objects/typeobject.c:436
#28 0x0039f69c in PyObject_Call (func=0x11, arg=0xb7f14c0c, kw=0x0) at Objects/abstract.c:1860
#29 0x00413654 in PyEval_EvalFrameEx (f=0x9f009a4, throwflag=0) at Python/ceval.c:3777
#30 0x00419865 in PyEval_EvalCodeEx (co=0xb7ec8800, globals=0xb7f18a44, locals=0xb7f18a44, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
    at Python/ceval.c:2833
#31 0x004199f3 in PyEval_EvalCode (co=0xb7ec8800, globals=0xb7f18a44, locals=0xb7f18a44) at Python/ceval.c:494
#32 0x004396a0 in PyRun_FileExFlags (fp=0x9ef1008, filename=0xbff9d12b "do_CutFlow_Ztautau_EWBkg.py", start=257, globals=0xb7f18a44, locals=0xb7f18a44, closeit=1, 
    flags=0xbff39e7c) at Python/pythonrun.c:1264
#33 0x0043a20e in PyRun_SimpleFileExFlags (fp=0x9ef1008, filename=0xbff9d12b "do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbff39e7c) at Python/pythonrun.c:870
#34 0x0043aca1 in PyRun_AnyFileExFlags (fp=0x9ef1008, filename=0xbff9d12b "do_CutFlow_Ztautau_EWBkg.py", closeit=1, flags=0xbff39e7c) at Python/pythonrun.c:689
#35 0x00445c24 in Py_Main (argc=1, argv=0xbff39fb4) at Modules/main.c:496
#36 0x080485aa in main (argc=2, argv=0xbff39fb4) at ./Modules/python.c:23