Skip to content

flashggFinalFit/makeEffAcc.py uses python3 syntax #17

@andreh7

Description

@andreh7

There are some dict initializations in this file which rely on python3 syntax:

    slurpDic = { name : ws.data(name+suffix) for name in procs}
    # filter out histos that are null pointers
    return { k : v for k, v in slurpDic.iteritems() if v }

and

   integrals = { proc : h.sumEntries() for (proc, h) in histos.iteritems()}

it is not clear how to get python3 on lxplus other than installing it in one's home directory.

Can these be changed to python2 syntax:

    slurpDic = dict([ (name, ws.data(name+suffix)) for name in procs])

    # filter out histos that are null pointers
    return dict([ (k,v) for k, v in slurpDic.iteritems() if v ])

and

   integrals = dict([ (proc,h.sumEntries()) for (proc, h) in histos.iteritems()])

?

We can provide a pull request for these if wanted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions