pass
                Dly[0] = dlyValue
                vfatN[0] = vfat
                mspl[0] = msplvals[vfat]
                vth1[0] = vt1vals[vfat]
                vth2[0] = vt2vals[vfat]
                vth[0] = vthvals[vfat]
                writeRegister(ohboard,
                              "%s.VFAT%d_LAT_BX.RESET" % (baseNode, vfat), 0x1)
                myT.Fill()
                pass
            if (seenTriggers % 100 == 0):
                print "Saw %d triggers" % (seenTriggers)
                pass
            pass
        myT.AutoSave("SaveSelf")
        sys.stdout.flush()
        if seenTriggers > options.nevts:
            print "Saw %d triggers, exiting" % (seenTriggers)
            sys.stdout.flush()
            break

except Exception as e:
    myT.AutoSave("SaveSelf")
    print "An exception occurred", e
    sys.stdout.flush()
finally:
    myF.cd()
    myT.Write()
    myF.Close()
    "tau3_subsubleading": array('d', [0]),
    "pt_subsubleading": array('d', [0]),
    "eta_subsubleading": array('d', [0]),
    "phi_subsubleading": array('d', [0]),
    "mass_subsubleading": array('d', [0]),
    "flavor_subsubleading": array('d', [0]),
    "WJetMatchingRequirement": array('i', [0])
}

Tree = TTree("Tree", "Tree")
for v in treeVars.keys():
    if v == 'WJetMatchingRequirement':
        Tree.Branch(v, treeVars[v], v + "/I")
    else:
        Tree.Branch(v, treeVars[v], v + "/D")
Tree.AutoSave("Overwrite")

# Initialize some set specific branches
if options.set != 'data':
    treeVars['pileBin'] = array('i', [0])
    Tree.Branch('pileBin', treeVars['pileBin'], 'pileBin/I')

    if options.set.find("singletop_tW") == -1:
        treeVars['pdf_weightUp'] = array('d', [0])
        treeVars['pdf_weightDown'] = array('d', [0])
        Tree.Branch('pdf_weightUp', treeVars['pdf_weightUp'], 'pdf_weightUp/D')
        Tree.Branch('pdf_weightDown', treeVars['pdf_weightDown'],
                    'pdf_weightDown/D')

if options.set.find('ttbar') != -1:
    treeVars['pt_reweight'] = array('d', [0])