entry = tree.GetEntries() for j in range(entry) : tree.GetEntry(j) print 'entry = %s' %j if tree.PH17 < 9.279 and tree.PH18 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 \ and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH32 < 9.279 and tree.PH33 < 9.279 : my.Arg = tree.Arg my.Frame = tree.Frame my.Event_th = tree.Event_th my.Split_th = 9.279 my.X = tree.X my.Y = tree.Y my.Xray = tree.PH25 my.PH17 = tree.PH17 my.PH18 = tree.PH18 my.PH19 = tree.PH19 my.PH24 = tree.PH24 my.PH25 = tree.PH25 my.PH26 = tree.PH26 my.PH31 = tree.PH31 my.PH32 = tree.PH32 my.PH33 = tree.PH33 tr.Fill() f.Write() f.Close() '''
#grade2 if tree.PH32 > 9.279 and tree.PH17 < 9.279 and tree.PH18 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH33 < 9.279 \ and tree.PH38 < 9.279 and tree.PH39 < 9.279 and tree.PH40 < 9.279 : Xray2 = tree.PH25 + tree.PH32 if Xray2 > 3400: print "(Arg,frame,x,y,Xray) = (%s,%s,%s,%s,%s)" % ( tree.Arg, tree.Frame, tree.X, tree.Y, Xray2) my2.Arg = tree.Arg my2.Frame = tree.Frame my2.Event_th = tree.Event_th my2.Split_th = 9.279 my2.X = tree.X my2.Y = tree.Y my2.Xray = Xray2 my2.PH17 = tree.PH17 my2.PH18 = tree.PH18 my2.PH19 = tree.PH19 my2.PH24 = tree.PH24 my2.PH25 = tree.PH25 my2.PH26 = tree.PH26 my2.PH31 = tree.PH31 my2.PH32 = tree.PH32 my2.PH33 = tree.PH33 tr2.Fill() elif tree.PH18 > 9.279 and tree.PH17 < 9.279 and tree.PH19 < 9.279 and tree.PH24 < 9.279 and tree.PH26 < 9.279 and tree.PH31 < 9.279 and tree.PH32 < 9.279 and tree.PH33 < 9.279 \ and tree.PH10 < 9.279 and tree.PH11 < 9.279 and tree.PH12 < 9.279 : Xray2 = tree.PH25 + tree.PH18 if Xray2 > 3400: