Exemplo n.º 1
0
                    # Ignore it
                    pass
            maskA  = job['mask']

            # Have to transform this because JSON is too stupid to understand ints
            # Also for some reason we're getting a strange problem where the mask
            # isn't being loaded at all.  I'm not sure what to do there except drop it.
            try:
                for key in maskA['runAndLumis'].keys():
                    maskA['runAndLumis'][int(key)] = maskA['runAndLumis'][key]
                    del maskA['runAndLumis'][key]
            except KeyError:
                # We don't have a mask.  Not much we can do about this
                maskA = Mask()
            mask   = Mask()
            mask.update(maskA)
            runs   = []
            # Turn arbitrary format into real runs
            for r in runsA:
                run = Run(runNumber = r['run_number'])
                run.lumis = r.get('lumis', [])
                runs.append(run)
            # Get rid of runs that aren't in the mask
            runs = mask.filterRunLumisByMask(runs = runs)
            for err in errorCouch:
                task   = err['value']['task']
                step   = err['value']['step']
                errors = err['value']['error']
                logs   = err['value']['logs']
                start  = err['value']['start']
                stop   = err['value']['stop']