Unknown error using a TTreeFormula object


I’m new using ROOT so I don’t really know how to deal with a problem.
My code is like that:

formula = TTreeFormula("cut",cut.GetTitle(),input_tree)

h = TH1F("l1_P","l1_P",100,0,300000)
h1 = TH1F("l1_P_weighted","l1_P_weighted",100,0,300000)

norm1 = 0
for event in input_tree:
    if formula.EvalInstance():
        w = get_P_PT_CHI2_q2_reco_weight_from_event(event, run=1, decay="ee")
        norm1 += w

As you can see I am using python.
It seems to work for a while, then I get ‘*** Break *** segmentation violation’ and
‘Traceback (most recent call last):
File “weightcomparison.py”, line 27, in
print formula.EvalInstance()
TypeError: template method ‘EvalInstance’ with no arguments must be explicit’.
What can I do?


Dear Jacopo,

Can you find out the event at which the crash happens and check the variables used by cut for that event?

G Ganis

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.